parent
e840e0b504
commit
3e59662396
@ -0,0 +1,55 @@
|
||||
"""permissions and solar stuff
|
||||
|
||||
Revision ID: 7d6db184b8fc
|
||||
Revises: c6edf87b8bff
|
||||
Create Date: 2021-05-18 13:49:37.642465
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '7d6db184b8fc'
|
||||
down_revision = 'c6edf87b8bff'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.rename_table('stamps', 'stamps_solar')
|
||||
op.drop_column('upload_solar', 'corpus_name')
|
||||
op.create_table('corpus_access',
|
||||
sa.Column('id', sa.INTEGER(), server_default=sa.text("nextval('corpus_access_id_seq'::regclass)"), autoincrement=True, nullable=False),
|
||||
sa.Column('user_id', sa.INTEGER(), autoincrement=False, nullable=False),
|
||||
sa.Column('corpus', sa.TEXT(), autoincrement=False, nullable=False),
|
||||
sa.ForeignKeyConstraint(['user_id'], ['registered_user.id'], name='user_id_fkey'),
|
||||
sa.PrimaryKeyConstraint('id')
|
||||
)
|
||||
op.create_table('contracts_solar',
|
||||
sa.Column('id', sa.INTEGER(), server_default=sa.text("nextval('contracts_solar_id_seq'::regclass)"), autoincrement=True, nullable=False),
|
||||
sa.Column('institution', sa.INTEGER(), autoincrement=False, nullable=False),
|
||||
sa.Column('upload_user', sa.INTEGER(), autoincrement=False, nullable=True),
|
||||
sa.Column('timestamp', sa.DateTime(), nullable=False),
|
||||
sa.Column('file_contract', sa.TEXT(), autoincrement=False, nullable=False),
|
||||
sa.Column('contract_type', sa.TEXT(), autoincrement=False, nullable=False),
|
||||
sa.ForeignKeyConstraint(['institution'], ['institution.id'], name='institution_fkey'),
|
||||
sa.ForeignKeyConstraint(['upload_user'], ['registered_user.id'], name='upload_user_fkey'),
|
||||
sa.PrimaryKeyConstraint('id')
|
||||
)
|
||||
op.add_column('registered_user', sa.Column('institution_moderator', sa.BOOLEAN(), autoincrement=False, default=False))
|
||||
op.add_column('upload_predavanja', sa.Column('agree_publish_future', sa.TEXT(), nullable=False))
|
||||
op.add_column('upload_predavanja', sa.Column('agree_machine_translation', sa.BOOLEAN(), nullable=False))
|
||||
op.add_column('upload_predavanja', sa.Column('agree_news_cjvt', sa.BOOLEAN(), nullable=False))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column('upload_solar', sa.Column('corpus_name', sa.TEXT(), autoincrement=False, nullable=False))
|
||||
op.rename_table('stamps_solar', 'stamps')
|
||||
op.drop_table('corpus_access')
|
||||
op.drop_table('contracts_solar')
|
||||
op.drop_column('registered_user', 'institution_moderator')
|
||||
# ### end Alembic commands ###
|
@ -0,0 +1,58 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Portal za oddajanje besedil</title>
|
||||
<link rel="stylesheet" href="/static/style.css" type="text/css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="bg"></div>
|
||||
<div id="main-window">
|
||||
<div id="rect1">
|
||||
<div style="padding: 20px;">
|
||||
<div id="logo-container">
|
||||
<img src="/static/image/logo.svg" alt="logo"/>
|
||||
</div>
|
||||
<h1 id="title" style="font-size: 25px; position: relative;">Korpus ŠOLAR</h1>
|
||||
<div class="selection-tabs">
|
||||
<button onclick="window.location.replace('/solar/oddaja');" class="selection-tab-button">ODDAJA</button>
|
||||
<button onclick="window.location.replace('/solar/zgodovina');" class="selection-tab-button">ZGODOVINA</button>
|
||||
<button onclick="window.location.replace('/solar/pogodbe');" class="selection-tab-button selected">POGODBE</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="conract-container" style="padding: 20px;">
|
||||
{% if contract_school %}
|
||||
<div class="contract-item" style="background-color: #ccffcc;">
|
||||
<div class="contract-item-icon">...</div>
|
||||
<div class="contract-item-title">Pogodba o prenosu lastništva</div>
|
||||
<div class="contract-item-date">DODANO {{contract_school.date}}</div>
|
||||
<a href="/solar/pogodbe/{{ contract_school.file_hash }}.pdf" class="contract-item-button">PRENESI</div>
|
||||
</div>
|
||||
</br>
|
||||
{% endif %}
|
||||
{% for item in contracts_students %}
|
||||
<div class="contract-item">
|
||||
<div class="contract-item-icon">...</div>
|
||||
<div class="contract-item-title">Pogodba o prenosu lastništva</div>
|
||||
<div class="contract-item-date">DODANO {{item.date}}</div>
|
||||
<a href="/solar/pogodbe/{{ item.file_hash }}.pdf" class="contract-item-button">PRENESI</div>
|
||||
</div>
|
||||
</br>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% if show_upload_form %}
|
||||
<form action="/solar/pogodbe">
|
||||
<input type="radio" id="sola" name="tip-pogodbe" value="sola">
|
||||
<label for="sola">Pogodba s šolo</label><br>
|
||||
<input type="radio" id="ucenci-starsi" name="tip-pogodbe" value="ucenci-starsi">
|
||||
<label for="sola">Pogodba z učenci / starši</label><br>
|
||||
<input type="file" id="file-contract" name="filename">
|
||||
<input type="submit" text="Naloži pogodbo">
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div id="rect2" class="mock-side">
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,77 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Portal za oddajanje besedil</title>
|
||||
<link rel="stylesheet" href="/static/style.css" type="text/css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="bg"></div>
|
||||
<div id="main-window">
|
||||
<div id="rect1">
|
||||
<div style="padding: 20px;">
|
||||
<div id="logo-container">
|
||||
<img src="/static/image/logo.svg" alt="logo"/>
|
||||
</div>
|
||||
<h1 id="title" style="font-size: 25px; position: relative;">Korpus ŠOLAR</h1>
|
||||
<div class="selection-tabs">
|
||||
<button onclick="window.location.replace('/solar/oddaja');" class="selection-tab-button">ODDAJA</button>
|
||||
<button onclick="window.location.replace('/solar/zgodovina');" class="selection-tab-button selected">ZGODOVINA</button>
|
||||
<button onclick="window.location.replace('/solar/pogodbe');" class="selection-tab-button">POGODBE</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="history-container" style="padding: 20px;">
|
||||
{% for item in upload_history %}
|
||||
<div class="history-item">
|
||||
<div class="history-item-date">{{ item.timestamp }}</div>
|
||||
<div class="history-item-uploader">{{ uploader_names[loop.index - 1] }}</div>
|
||||
<div class="history-item-filecount">Št. datotek: {{ item.upload_file_hashes|length }}</div>
|
||||
<div class="history-item-desc">
|
||||
{% set began = False %}
|
||||
{% if institution_names[loop.index - 1] %}
|
||||
{% if began %}|{% endif %} {{ institution_names[loop.index - 1] }}
|
||||
{% set began = True %}
|
||||
{% endif %}
|
||||
{% if item.program %}
|
||||
{% if began %}|{% endif %} {{ item.program }}
|
||||
{% set began = True %}
|
||||
{% endif %}
|
||||
{% if item.subject %}
|
||||
{% if began %}|{% endif %} {{ item.subject }}
|
||||
{% set began = True %}
|
||||
{% endif %}
|
||||
{% if item.subject_custom %}
|
||||
{% if began %}|{% endif %} {{ item.subject_custom }}
|
||||
{% set began = True %}
|
||||
{% endif %}
|
||||
{% if item.grade %}
|
||||
{% if began %}|{% endif %} {{ item.grade }}
|
||||
{% set began = True %}
|
||||
{% endif %}
|
||||
{% if item.text_type %}
|
||||
{% if began %}|{% endif %} {{ item.text_type }}
|
||||
{% set began = True %}
|
||||
{% endif %}
|
||||
{% if item.text_type_custom %}
|
||||
{% if began %}|{% endif %} {{ item.text_type_custom }}
|
||||
{% set began = True %}
|
||||
{% endif %}
|
||||
{% if item.school_year %}
|
||||
{% if began %}|{% endif %} {{ item.school_year }}
|
||||
{% set began = True %}
|
||||
{% endif %}
|
||||
{% if item.grammar_corrections %}
|
||||
{% if began %}|{% endif %} {{ item.grammar_corrections }}
|
||||
{% set began = True %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</br>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div id="rect2" class="mock-side">
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in new issue