pogodbe, updates
This commit is contained in:
@@ -21,7 +21,6 @@
|
||||
{% endif %}
|
||||
<a href="mailto:email@example.com">Pomoč</a>
|
||||
</div>
|
||||
|
||||
</header>
|
||||
<div class="container" style="margin-top:8rem;">
|
||||
<div class="row">
|
||||
@@ -241,103 +240,7 @@
|
||||
</div>
|
||||
|
||||
|
||||
<!--
|
||||
<div id="main-window" style="margin-top:100px;">
|
||||
<div id="rect1">
|
||||
<div id="logo-container">
|
||||
<img src="/static/image/logo.svg" alt="logo"/>
|
||||
</div>
|
||||
<form id="my-dropzone" class="dropzone">
|
||||
<div style="position: relative; right: 390px;">
|
||||
<h1 id="title" style="font-size: 25px;">Korpus ŠOLAR</h1>
|
||||
|
||||
<div class="selection-tabs">
|
||||
<button id="button-oddaja" class="selection-tab-button selected">ODDAJA</button>
|
||||
<button id="button-zgodovina" class="selection-tab-button">ZGODOVINA</button>
|
||||
<button id="button-pogodbe" class="selection-tab-button">POGODBE</button>
|
||||
</div>
|
||||
|
||||
{% if not institution %}
|
||||
<div class="warning">Niste član nobene institucije!</div>
|
||||
{% elif not institution_contract %}
|
||||
<div class="warning">Pogodba s šolo še ni naložena!</div>
|
||||
{% endif %}
|
||||
<div id="data-confirm-notification" class="message-notification" style="display: none;">Prosimo, preverite in potrdite vnešene podatke.</div>
|
||||
|
||||
<label for="program">PROGRAM</label>
|
||||
<select id="program" name="program">
|
||||
<option value="OS" selected="selected">Osnovnošolski (OŠ)</option>
|
||||
<option value="SSG">Splošna in strokovna gimnazija (SGG)</option>
|
||||
<option value="MGP">Mednarodni gimnazijski programi (MGP)</option>
|
||||
<option value="ZG">Zasebne gimnazije (ZG)</option>
|
||||
<option value="NPI">Nižje poklicno izobraževanje (NPI)</option>
|
||||
<option value="SPI">Srednje poklicno izobraževanje (SPI)</option>
|
||||
<option value="SSI">Srednje strokovno izobraževanje (SSI)</option>
|
||||
<option value="PTI">Poklicno-tehnično izobraževanje (PTI)</option>
|
||||
</select>
|
||||
|
||||
<label for="predmet">PREDMET</label>
|
||||
<select id="predmet" name="predmet">
|
||||
<option value="slo" selected="selected">Slovenščina</option>
|
||||
<option value="drug-jez">Drugi jezikoslovni predmeti</option>
|
||||
<option value="drug-druz">Drugi družboslovni predmeti</option>
|
||||
<option value="drug-narav">Drugi naravoslovni predmeti</option>
|
||||
<option value="drug-strok">Drugi strokovni predmeti</option>
|
||||
<option value="drug-izb">Drugi izbirni ali dodatni predmeti</option>
|
||||
</select>
|
||||
<div id="predmet-custom-box" style="display: none;">
|
||||
<label for="predmet-custom">Ime predmeta:</label>
|
||||
<input type="text" id="predmet-custom" name="predmet-custom"/>
|
||||
</div>
|
||||
|
||||
<label for="letnik">LETNIK</label>
|
||||
<select id="letnik" name="letnik">
|
||||
<option value="1" selected="selected">1</option>
|
||||
<option value="2">2</option>
|
||||
<option value="3">3</option>
|
||||
<option value="4">4</option>
|
||||
<option value="5">5</option>
|
||||
<option value="6">6</option>
|
||||
<option value="7">7</option>
|
||||
<option value="8">8</option>
|
||||
<option value="9">9</option>
|
||||
</select>
|
||||
|
||||
<label for="vrsta">VRSTA BESEDILA</label>
|
||||
<select id="vrsta" name="vrsta">
|
||||
<option value="esej-spis" selected="selected">Esej ali spis</option>
|
||||
<option value="prakticno">Praktično besedilo (npr. vabila, prošnje ipd. pri pouku slovenščine), napisano za oceno</option>
|
||||
<option value="solski-test">Šolski test</option>
|
||||
<option value="delo-v-razredu">Delo v razredu, ne za oceno</option>
|
||||
</select>
|
||||
<div id="vrsta-custom-box" style="display: none;">
|
||||
<label for="vrsta-custom">Vtipkajte besedilno vrsto:</label>
|
||||
<input type="text" id="vrsta-custom" name="vrsta-custom"/>
|
||||
</div>
|
||||
|
||||
|
||||
<label for="solsko-leto">ŠOLSKO LETO</label>
|
||||
<select id="solsko-leto" name="solsko-leto">
|
||||
<option value="20-21" selected="selected">2020/21</option>
|
||||
<option value="21-22">2021/22</option>
|
||||
</select>
|
||||
|
||||
<label for="jezikovni-popravki">JEZIKOVNI POPRAVKI</label>
|
||||
<select id="jezikovni-popravki" name="jezikovni-popravki">
|
||||
<option value="popr-ne" selected="selected">Besedilo vsebuje učiteljske popravke in strinjam se z njihovo vključitvijo v korpus</option>
|
||||
<option value="brez-popr">Besedilo ne vsebuje učiteljskih popravkov</option>
|
||||
<option value="popr-da">Besedilo vsebuje učiteljske popravke in ne strinjam se z njihovo vključitvijo v korpus</option>
|
||||
</select>
|
||||
|
||||
<button id="button-submit" type="submit">Oddaj</button>
|
||||
</div>
|
||||
|
||||
<div class="dropzone-previews">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>-->
|
||||
|
||||
|
||||
<!--{{ dropzone.load_js() }}-->
|
||||
@@ -358,7 +261,7 @@
|
||||
var form = document.forms["form-oddaja"];
|
||||
|
||||
{% if not institution %}
|
||||
btnSubmit.disabled = true;
|
||||
btnSubmit.disabled = true;
|
||||
{% endif %}
|
||||
|
||||
function isEmptyOrSpaces(str){
|
||||
@@ -412,7 +315,7 @@
|
||||
acceptedFiles: ".txt, .csv, .pdf, .doc, .docx, .xls, .xlsx, .ppt, .pptx, .jpg, .jpeg, .png, .mkv",
|
||||
maxFiles: 20,
|
||||
previewsContainer: "#dropzone-previews",
|
||||
dictDefaultMessage: `Kliknite ali odložite datoteke sem.`,
|
||||
dictDefaultMessage: "Kliknite ali odložite datoteke sem.",
|
||||
dictFallbackMessage: "Vaš brskalnik ne podpira izbiranje datotek z odlaganjem (\"drag & drop\").",
|
||||
dictInvalidFileType: "Datoteka je napačnega formata.",
|
||||
dictFileTooBig: "Datoteke je prevelika {{filesize}}. Največja dovoljena velikost: {{maxFilesize}}MiB.",
|
||||
@@ -468,59 +371,24 @@
|
||||
btnSubmitFinal.addEventListener("click", function(e) {
|
||||
// Hand off data to dropzone
|
||||
dz.processQueue();
|
||||
|
||||
// Clear fields and hide popup agian
|
||||
/*btnSubmit.disabled = false;
|
||||
dataConfirmNotification.style.display = "none";
|
||||
btnSubmit.textContent = "Oddaj";
|
||||
form.reset();
|
||||
scrollboxTriggered = false;*/
|
||||
});
|
||||
|
||||
/*btnSubmitCancel.addEventListener("click", function(e) {
|
||||
btnSubmit.disabled = false;
|
||||
scrollboxTriggered = false;
|
||||
elemTermsPopup.style.display = "none";
|
||||
});*/
|
||||
|
||||
/*
|
||||
// Enable final submit button only if user scrolls to the end of the terms.
|
||||
function checkScrollboxTrigger(event) {
|
||||
var element = event.target;
|
||||
if (!scrollboxTriggered
|
||||
&& element.scrollHeight - element.scrollTop <= element.clientHeight + 50
|
||||
) {
|
||||
scrollboxTriggered = true;
|
||||
btnSubmitFinal.disabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
termsScrollbox.addEventListener('scroll', function(event) {
|
||||
checkScrollboxTrigger(event);
|
||||
});
|
||||
|
||||
termsScrollbox.addEventListener("mouseenter", function(event) {
|
||||
checkScrollboxTrigger(event);
|
||||
});*/
|
||||
|
||||
// Listen to the sendingmultiple event. In this case, it's the sendingmultiple event instead
|
||||
// Listen to the sendingmultiple event. In this case, it's the sendingmultiple event instead
|
||||
// of the sending event because uploadMultiple is set to true.
|
||||
/*this.on("sendingmultiple", function() {
|
||||
this.on("sendingmultiple", function() {
|
||||
// Gets triggered when the form is actually being sent.
|
||||
// Hide the success button or the complete form.
|
||||
});
|
||||
|
||||
this.on("successmultiple", function(files, response) {
|
||||
// Gets triggered when the files have successfully been sent.
|
||||
// Redirect user or notify of success.
|
||||
alert("Odgovor strežnika: " + response);
|
||||
location.reload();
|
||||
});
|
||||
|
||||
this.on("errormultiple", function(files, response) {
|
||||
// Gets triggered when there was an error sending the files.
|
||||
// Maybe show form again, and notify user of error
|
||||
});*/
|
||||
});
|
||||
|
||||
|
||||
this.on("sending", function(file, xhr, formData) {
|
||||
formData.append("program",form["program"].value);
|
||||
formData.append("predmet",form["predmet"].value);
|
||||
@@ -530,7 +398,6 @@
|
||||
formData.append("vrsta-custom",form["vrsta-custom"].value);
|
||||
formData.append("solsko-leto",form["solsko-leto"].value);
|
||||
formData.append("jezikovni-popravki",form["jezikovni-popravki"].value);
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -3,9 +3,170 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Portal za oddajanje besedil</title>
|
||||
<link rel="stylesheet" href="/static/style.css" type="text/css">
|
||||
<link rel="stylesheet" href="/static/css/header.css" type="text/css">
|
||||
<link rel="stylesheet" href="/static/css/form.css" type="text/css">
|
||||
<link rel="stylesheet" href="/static/css/simple-grid.css" type="text/css">
|
||||
<link rel="stylesheet" href="/static/css/contracts.css" type="text/css">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<div class="logo"><a href="/"><img src="/static/image/logo-white.svg"/></a></div>
|
||||
<div class="menu-items">
|
||||
<a href="../logout">Odjava</a>
|
||||
{% if is_institution_coordinator %}
|
||||
<a href="../manage-institution">Upravljaj z institucijo</a>
|
||||
{% endif %}
|
||||
{% if is_admin %}
|
||||
<a href="../admin">Administracijski meni</a>
|
||||
{% endif %}
|
||||
<a href="mailto:email@example.com">Pomoč</a>
|
||||
</div>
|
||||
</header>
|
||||
<div class="container" style="margin-top:8rem;">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h1 class="title">Koprus SOLAR</h1>
|
||||
<p class="subtitle">Zbiranje besedil za korpus Šolar poteka po naslednjem postopku, ki prinaša tudi točke za napredovanje.</p>
|
||||
|
||||
<div class="tab-nav">
|
||||
<a href="/oddaja">Oddaja</a>
|
||||
<a href="/zgodovina">Zgodovina</a>
|
||||
<a href="/pogodbe" class="active">Pogodbe</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h2>Oddaj pogodbo</h2>
|
||||
</div>
|
||||
</div>
|
||||
{% if show_upload_form %}
|
||||
<form action="" method="POST" id="form-pogodbe" enctype="multipart/form-data">
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<div class="form-wrapper">
|
||||
<input type="radio" id="sola" name="tip-pogodbe" value="sola" {% if enable_upload_school_contract %}disabled{%endif%}>
|
||||
<label for="sola">Pogodba s šolo</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<div class="form-wrapper">
|
||||
<input type="radio" id="ucenci-starsi" name="tip-pogodbe" value="ucenci-starsi" checked>
|
||||
<label for="ucenci-starsi">Pogodba z učenci / starši</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<div class="form-wrapper">
|
||||
<div id="dropzone-previews" class="dropzone-previews"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<div class="form-wrapper">
|
||||
<label for="my-dropzone">Datoteka</label>
|
||||
<div id="my-dropzone" class="dropzone"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<p>lalala</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<button class="btn" id="btn-submit" type="submit">Oddaj pogodbo</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h2>Oddane pogodbe</h2>
|
||||
</div>
|
||||
</div>
|
||||
{% if contract_school %}
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<div class="contract-item">
|
||||
<img src="/static/image/contract.png" alt="contract" class="contract-item-icon"/>
|
||||
<div class="contract-item-title">Pogodba s šolo</div>
|
||||
<div class="contract-item-date">DODANO: {{contract_school.timestamp.strftime('%d. %m. %Y')}}</div>
|
||||
<a href="../pogodbe-institucije/{{ contract_school.file_contract }}.pdf" class="contract-item-download">Prenesi</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
{% for item in contracts_students %}
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<div class="contract-item">
|
||||
<img src="/static/image/contract.svg" alt="contract" class="contract-item-icon"/>
|
||||
<div class="contract-item-title">Pogodba o prenosu lastništva</div>
|
||||
<div class="contract-item-date">DODANO: {{item.timestamp.strftime('%d. %m. %Y')}}</div>
|
||||
<a href="../pogodbe-ucencistarsi/{{ item.file_contract }}.pdf" class="contract-item-download">Prenesi</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h2>Sodelujoči</h2>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
{% for collaborator in collaborators %}
|
||||
|
||||
<div class="collaborators-item">
|
||||
<div class="collaborators-item-name">{{collaborator.name}}</div>
|
||||
{% if collaborator.id in cooperation_history %}
|
||||
{% if cooperation_history[collaborator.id]["coordinator"]|length > 0 %}
|
||||
<div class="collaborators-item-years"><b>Vodenje:</b> {% for item in cooperation_history[collaborator.id]["coordinator"] %}
|
||||
{% if loop.index != 1 %}, {% endif %}
|
||||
{{item[0]}}
|
||||
{% endfor %}</div>
|
||||
{% endif %}
|
||||
{% if cooperation_history[collaborator.id]["mentor"]|length > 0 %}
|
||||
<div class="collaborators-item-years"><b>Mentorstvo:</b> {% for item in cooperation_history[collaborator.id]["mentor"] %}
|
||||
{% if loop.index != 1 %}, {% endif %}
|
||||
{{item[0]}}
|
||||
{% endfor %}</div>
|
||||
{% endif %}
|
||||
{% if cooperation_history[collaborator.id]["other"]|length > 0 %}
|
||||
<div class="collaborators-item-years"><b>Drugo:</b> {% for item in cooperation_history[collaborator.id]["other"] %}
|
||||
{% if loop.index != 1 %}, {% endif %}
|
||||
{{item[0]}}
|
||||
{% endfor %}</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
|
||||
|
||||
|
||||
|
||||
|
||||
<!--
|
||||
<a href="../logout">Odjavi se</a>
|
||||
{% if is_institution_coordinator %}
|
||||
<br><a href="../manage-institution">Upravljaj z institucijo</a>
|
||||
@@ -17,17 +178,7 @@
|
||||
<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('../oddaja');" class="selection-tab-button">ODDAJA</button>
|
||||
<button onclick="window.location.replace('../zgodovina');" class="selection-tab-button">ZGODOVINA</button>
|
||||
<button onclick="window.location.replace('../pogodbe');" class="selection-tab-button selected">POGODBE</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% with messages = get_flashed_messages() %}
|
||||
{% if messages %}
|
||||
<div class="message-notification">
|
||||
@@ -167,6 +318,132 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>-->
|
||||
</body>
|
||||
<!--{{ dropzone.load_js() }}-->
|
||||
<script src="/static/dropzone.js"></script>
|
||||
<script>
|
||||
/////////////////////////
|
||||
// Dropzone //
|
||||
/////////////////////////
|
||||
var btnSubmit = document.getElementById("btn-submit");
|
||||
var errorMessage = document.getElementById("error-message");
|
||||
var form = document.forms["form-pogodbe"];
|
||||
|
||||
|
||||
function isEmptyOrSpaces(str){
|
||||
return str == null || str.match(/^ *$/) !== null;
|
||||
}
|
||||
|
||||
function showError(str) {
|
||||
errorMessage.querySelector("p").textContent = str;
|
||||
errorMessage.style.display = "block";
|
||||
window.scroll({
|
||||
top: 0,
|
||||
behavior: 'smooth'
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Dropzone.options.myDropzone = { // The camelized version of the ID of the form element
|
||||
url: "../pogodbe",
|
||||
autoProcessQueue: false,
|
||||
uploadMultiple: false,
|
||||
parallelUploads: 20,
|
||||
paramName: "file[]", // The name that will be used to transfer the file
|
||||
maxFilesize: 1000, // MB
|
||||
timeout: 5000000, // milliseconds
|
||||
acceptedFiles: ".txt, .csv, .pdf, .doc, .docx, .xls, .xlsx, .ppt, .pptx, .jpg, .jpeg, .png, .mkv",
|
||||
maxFiles: 20,
|
||||
previewsContainer: "#dropzone-previews",
|
||||
dictDefaultMessage: "Kliknite ali odložite datoteke sem.",
|
||||
dictFallbackMessage: "Vaš brskalnik ne podpira izbiranje datotek z odlaganjem (\"drag & drop\").",
|
||||
dictInvalidFileType: "Datoteka je napačnega formata.",
|
||||
dictFileTooBig: "Datoteke je prevelika {{filesize}}. Največja dovoljena velikost: {{maxFilesize}}MiB.",
|
||||
dictResponseError: "Napaka strežnika: {{statusCode}}",
|
||||
dictMaxFilesExceeded: "Ne morete naložiti več datotek.",
|
||||
dictCancelUpload: "Prekini prenos",
|
||||
dictRemoveFile: "Odstrani datoteko",
|
||||
dictCancelUploadConfirmation: "Ali res želite odstraniti to datoteko?",
|
||||
dictUploadCanceled: "Prenos prekinjen",
|
||||
|
||||
// The setting up of the dropzone
|
||||
init: function() {
|
||||
var dz = this;
|
||||
|
||||
/*btnSubmit.addEventListener("click", function(e) {
|
||||
// Make sure that the form isn't actually being sent.
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
// Check form validity.
|
||||
var program = form["program"].value;
|
||||
var predmet = form["predmet"].value;
|
||||
var predmetCustom = form["predmet-custom"].value;
|
||||
var letnik = form["letnik"].value;
|
||||
var vrsta = form["vrsta"].value;
|
||||
var vrstaCustom = form["vrsta-custom"].value;
|
||||
var solskoLeto = form["solsko-leto"].value;
|
||||
var jezikovniPopravki = form["jezikovni-popravki"].value;
|
||||
|
||||
/*if (predmet.startsWith("drug") && isEmptyOrSpaces(predmetCustom)) {
|
||||
showError("Polje za predmet ne more biti prazno!");
|
||||
} else if (vrsta === "delo-v-razredu" && isEmptyOrSpaces(vrstaCustom)) {
|
||||
showError("Polje za vrsto besedila ne more biti prazno!");
|
||||
} else if (dataConfirmNotification.style.display == "none") {
|
||||
dataConfirmNotification.style.display = "inherit";
|
||||
btnSubmit.style.display = "none";
|
||||
} else {*/
|
||||
|
||||
// Hand off data to dropzone
|
||||
/*dz.processQueue();
|
||||
|
||||
// Clear fields and hide popup agian
|
||||
dataConfirmNotification.style.display = "none";
|
||||
btnSubmit.textContent = "Oddaj";
|
||||
form.reset();*/
|
||||
//}
|
||||
//});
|
||||
|
||||
|
||||
// First change the button to actually tell dropzone to process the queue.
|
||||
btnSubmit.addEventListener("click", function(e) {
|
||||
// Make sure that the form isn't actually being sent.
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
// Hand off data to dropzone
|
||||
|
||||
dz.processQueue();
|
||||
console.log(dz.files);
|
||||
console.log(form["tip-pogodbe"].value);
|
||||
//form.submit();
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
this.on("sending", function(file, xhr, formData) {
|
||||
//alert("lalalala");
|
||||
formData.append("tip-pogodbe", form["tip-pogodbe"].value);
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
uploadprogress: function(file, progress, bytesSent) {
|
||||
if (file.previewElement) {
|
||||
console.log(progress);
|
||||
var progressElement = file.previewElement.querySelector("[data-dz-uploadprogress]");
|
||||
progressElement.style.width = progress + "%";
|
||||
//progressElement.querySelector(".progress-text").textContent = progress + "%";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
</html>
|
||||
|
||||
@@ -34,7 +34,67 @@
|
||||
<h2>Zgodovina naloženih datotek</h2>
|
||||
</div>
|
||||
</div>
|
||||
{% set map_program = {
|
||||
"OS" : "Osnovna šola (OŠ)",
|
||||
"SSG" : "Splošna in strokovna gimnazija (SGG)",
|
||||
"MGP" : "Mednarodni gimnazijski programi (MGP)",
|
||||
"ZG" : "Zasebne gimnazije (ZG)",
|
||||
"NPI" : "Nižje poklicno izobraževanje (NPI)",
|
||||
"SPI" : "Srednje poklicno izobraževanje (SPI)",
|
||||
"SSI" : "Srednje strokovno izobraževanje (SSI)",
|
||||
"PTI" : "Poklicno-tehnično izobraževanje (PTI)"
|
||||
}%}
|
||||
{% set map_subject = {
|
||||
"slo" : "Slovenščina",
|
||||
"drug-jez" : "Drugi jezikoslovni predmeti",
|
||||
"drug-druz" : "Drugi družboslovni predmeti",
|
||||
"drug-narav" : "Drugi naravoslovni predmeti",
|
||||
"drug-strok" : "Drugi strokovni predmeti",
|
||||
"drug-izb" : "Drugi izbirni ali dodatni predmeti",
|
||||
}%}
|
||||
{% set map_text_type = {
|
||||
"esej-spis" : "Esej ali spis",
|
||||
"prakticno" : "Praktično besedilo, napisano za oceno",
|
||||
"solski-test" : "Šolski test",
|
||||
"delo-v-razredu" : "Delo v razredu, ne za oceno",
|
||||
}%}
|
||||
{% set map_grammar_corrections = {
|
||||
"popr-ne" : "Besedilo vsebuje učiteljske popravke",
|
||||
"brez-popr" : "Besedilo ne vsebuje učiteljskih popravkov",
|
||||
"popr-da" : "Besedilo vsebuje učiteljske popravke in ne strinjam se z njihovo vključitvijo v korpus",
|
||||
}%}
|
||||
|
||||
|
||||
|
||||
{% for item in upload_history %}
|
||||
{% set item_values = [] %}
|
||||
{% if institution_names[loop.index - 1] %}
|
||||
{% set item_values = item_values + [institution_names[loop.index - 1]] %}
|
||||
{% endif %}
|
||||
{% if item.program %}
|
||||
{% set item_values = item_values + [map_program[item.program]] %}
|
||||
{% endif %}
|
||||
{% if item.subject %}
|
||||
{% set item_values = item_values + [map_subject[item.subject]] %}
|
||||
{% endif %}
|
||||
{% if item.subject_custom %}
|
||||
{% set item_values = item_values + [item.subject_custom] %}
|
||||
{% endif %}
|
||||
{% if item.grade %}
|
||||
{% set item_values = item_values + [item.grade ~ ". razred"] %}
|
||||
{% endif %}
|
||||
{% if item.text_type %}
|
||||
{% set item_values = item_values + [map_text_type[item.text_type]] %}
|
||||
{% endif %}
|
||||
{% if item.text_type_custom %}
|
||||
{% set item_values = item_values + [item.text_type_custom] %}
|
||||
{% endif %}
|
||||
{% if item.school_year %}
|
||||
{% set item_values = item_values + ['20' ~ item.school_year | replace("-", "/")] %}
|
||||
{% endif %}
|
||||
{% if item.grammar_corrections %}
|
||||
{% set item_values = item_values + [map_grammar_corrections[item.grammar_corrections]] %}
|
||||
{% endif %}
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="history-item">
|
||||
@@ -42,45 +102,12 @@
|
||||
<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 %}
|
||||
|
||||
{{ item_values | join(" | ") }}
|
||||
</div>
|
||||
<div class="history-item-desc-full">
|
||||
{% for v in item_values %}
|
||||
{{v}}<br>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -111,7 +138,7 @@
|
||||
<br><a href="../admin">Administracijski meni</a>
|
||||
{% endif %}
|
||||
<br><a href="mailto:email@example.com">Pomoč</a>
|
||||
<div class="bg"></div>
|
||||
<!--<div class="bg"></div>
|
||||
<div id="main-window">
|
||||
<div id="rect1">
|
||||
<div style="padding: 20px;">
|
||||
@@ -211,8 +238,18 @@
|
||||
}
|
||||
fetch('../topuploads').then(r => r.json()).then(j => drawChart(j));
|
||||
|
||||
</script>
|
||||
</script>-->
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
var toggleOpen = function() {
|
||||
this.classList.toggle("open");
|
||||
};
|
||||
var elements = document.getElementsByClassName("history-item");
|
||||
for (var i = 0; i < elements.length; i++) {
|
||||
elements[i].addEventListener('click', toggleOpen, false);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user