2021-05-24 08:15:54 +00:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
<title>Portal za oddajanje besedil</title>
|
2021-12-23 07:51:37 +00:00
|
|
|
<!--<link rel="stylesheet" href="../static/style.css" type="text/css">-->
|
|
|
|
<script src="../static/chart.js"></script>
|
|
|
|
<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/history.css" type="text/css">
|
2021-05-24 08:15:54 +00:00
|
|
|
</head>
|
|
|
|
<body>
|
2021-11-16 17:45:20 +00:00
|
|
|
<header>
|
2021-12-23 07:51:37 +00:00
|
|
|
<div class="logo"><a href="../"><img src="../static/image/logo-white.svg"/></a></div>
|
2021-12-04 17:49:20 +00:00
|
|
|
<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 %}
|
2021-12-13 20:01:28 +00:00
|
|
|
<a href="https://slovenscina.eu/" target="_blank">Več informacij</a>
|
2021-12-04 17:49:20 +00:00
|
|
|
</div>
|
2021-11-16 17:45:20 +00:00
|
|
|
</header>
|
|
|
|
<div class="container" style="margin-top:8rem;">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-12">
|
2021-12-15 20:23:26 +00:00
|
|
|
<h1 class="title">Korpus Šolar</h1>
|
2021-12-13 20:01:28 +00:00
|
|
|
<p class="subtitle"></p>
|
2021-11-16 17:45:20 +00:00
|
|
|
|
|
|
|
|
|
|
|
<div class="tab-nav">
|
2021-12-23 07:51:37 +00:00
|
|
|
<a href="../oddaja">Oddaja besedil</a>
|
|
|
|
<a href="../zgodovina" class="active">Zgodovina sodelovanja</a>
|
|
|
|
<a href="../pogodbe">Ekipa</a>
|
2021-11-16 17:45:20 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2021-12-13 20:01:28 +00:00
|
|
|
<!--<div class="row">
|
2021-11-16 17:45:20 +00:00
|
|
|
<div class="col-12">
|
|
|
|
<h2>Zgodovina naloženih datotek</h2>
|
|
|
|
</div>
|
2021-12-13 20:01:28 +00:00
|
|
|
</div>-->
|
2021-11-26 12:50:32 +00:00
|
|
|
{% 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",
|
|
|
|
}%}
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-11-16 17:45:20 +00:00
|
|
|
{% for item in upload_history %}
|
2021-11-26 12:50:32 +00:00
|
|
|
{% 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 %}
|
2021-11-16 17:45:20 +00:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-12">
|
|
|
|
<div class="history-item">
|
|
|
|
<div class="history-item-date">Dodano {{ item.timestamp.strftime('%d. %m. %Y') }}</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>
|
2021-12-23 07:51:37 +00:00
|
|
|
<div class="history-item-chevron"><img src="../static/image/chevron-down.svg"/></div>
|
2021-11-16 17:45:20 +00:00
|
|
|
<div class="history-item-desc">
|
2021-11-26 12:50:32 +00:00
|
|
|
{{ item_values | join(" | ") }}
|
|
|
|
</div>
|
2021-12-04 17:49:20 +00:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-6" style="margin:0">
|
|
|
|
<div class="history-item-desc-full">
|
|
|
|
{% for v in item_values %}
|
|
|
|
{{v}}<br>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-6" style="margin:0">
|
|
|
|
<div class="history-item-files-full">
|
2021-12-14 14:36:36 +00:00
|
|
|
{% if item.upload_file_names != None %}
|
|
|
|
{% for f_name in item.upload_file_names %}
|
2021-12-04 17:49:20 +00:00
|
|
|
<div class="file-item">
|
2021-12-23 07:51:37 +00:00
|
|
|
<div class="file-icon"><img src="../static/image/file.svg"/></div>
|
2021-12-14 14:36:36 +00:00
|
|
|
<a href="getuploadfile/{{item.id}}/{{item.upload_file_hashes[loop.index - 1]}}" class="file-name">{{f_name}}</a>
|
2021-12-20 10:15:01 +00:00
|
|
|
</br>
|
|
|
|
{% if item.upload_file_codes != None %}
|
|
|
|
<div>{{item.upload_file_codes[loop.index - 1]}}</div>
|
|
|
|
{% endif %}
|
2021-12-04 17:49:20 +00:00
|
|
|
</div>
|
|
|
|
{% endfor %}
|
2021-12-14 14:36:36 +00:00
|
|
|
{% else %}
|
|
|
|
{% for f_hash in item.upload_file_hashes %}
|
|
|
|
<div class="file-item">
|
2021-12-23 07:51:37 +00:00
|
|
|
<div class="file-icon"><img src="../static/image/file.svg"/></div>
|
2021-12-14 14:36:36 +00:00
|
|
|
<a href="getuploadfile/{{item.id}}/{{f_hash}}" class="file-name">{{f_hash}}</a>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
2021-12-04 17:49:20 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-11-16 17:45:20 +00:00
|
|
|
</div>
|
2021-12-04 17:49:20 +00:00
|
|
|
|
2021-11-16 17:45:20 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-12-04 17:49:20 +00:00
|
|
|
|
2021-11-26 12:50:32 +00:00
|
|
|
<!--<div class="bg"></div>
|
2021-05-24 08:15:54 +00:00
|
|
|
<div id="main-window">
|
|
|
|
<div id="rect1">
|
|
|
|
<div style="padding: 20px;">
|
|
|
|
<div id="logo-container">
|
2021-12-23 07:51:37 +00:00
|
|
|
<img src="../static/image/logo.svg" alt="logo"/>
|
2021-05-24 08:15:54 +00:00
|
|
|
</div>
|
|
|
|
<h1 id="title" style="font-size: 25px; position: relative;">Korpus ŠOLAR</h1>
|
|
|
|
<div class="selection-tabs">
|
2021-10-12 09:11:37 +00:00
|
|
|
<button onclick="window.location.replace('../oddaja');" class="selection-tab-button">ODDAJA</button>
|
|
|
|
<button onclick="window.location.replace('../zgodovina');" class="selection-tab-button selected">ZGODOVINA</button>
|
|
|
|
<button onclick="window.location.replace('../pogodbe');" class="selection-tab-button">POGODBE</button>
|
2021-05-24 08:15:54 +00:00
|
|
|
</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">
|
2021-09-02 12:40:54 +00:00
|
|
|
[
|
2021-05-24 08:15:54 +00:00
|
|
|
{% set began = False %}
|
|
|
|
{% if institution_names[loop.index - 1] %}
|
2021-09-02 12:40:54 +00:00
|
|
|
{% if began %}, {% endif %} {{ institution_names[loop.index - 1] }}
|
2021-05-24 08:15:54 +00:00
|
|
|
{% set began = True %}
|
|
|
|
{% endif %}
|
|
|
|
{% if item.program %}
|
2021-09-02 12:40:54 +00:00
|
|
|
{% if began %}, {% endif %} {{ item.program }}
|
2021-05-24 08:15:54 +00:00
|
|
|
{% set began = True %}
|
|
|
|
{% endif %}
|
|
|
|
{% if item.subject %}
|
2021-09-02 12:40:54 +00:00
|
|
|
{% if began %}, {% endif %} {{ item.subject }}
|
2021-05-24 08:15:54 +00:00
|
|
|
{% set began = True %}
|
|
|
|
{% endif %}
|
|
|
|
{% if item.subject_custom %}
|
2021-09-02 12:40:54 +00:00
|
|
|
{% if began %}, {% endif %} {{ item.subject_custom }}
|
2021-05-24 08:15:54 +00:00
|
|
|
{% set began = True %}
|
|
|
|
{% endif %}
|
|
|
|
{% if item.grade %}
|
2021-09-02 12:40:54 +00:00
|
|
|
{% if began %}, {% endif %} {{ item.grade }}
|
2021-05-24 08:15:54 +00:00
|
|
|
{% set began = True %}
|
|
|
|
{% endif %}
|
|
|
|
{% if item.text_type %}
|
2021-09-02 12:40:54 +00:00
|
|
|
{% if began %}, {% endif %} {{ item.text_type }}
|
2021-05-24 08:15:54 +00:00
|
|
|
{% set began = True %}
|
|
|
|
{% endif %}
|
|
|
|
{% if item.text_type_custom %}
|
2021-09-02 12:40:54 +00:00
|
|
|
{% if began %}, {% endif %} {{ item.text_type_custom }}
|
2021-05-24 08:15:54 +00:00
|
|
|
{% set began = True %}
|
|
|
|
{% endif %}
|
|
|
|
{% if item.school_year %}
|
2021-09-02 12:40:54 +00:00
|
|
|
{% if began %}, {% endif %} {{ item.school_year }}
|
2021-05-24 08:15:54 +00:00
|
|
|
{% set began = True %}
|
|
|
|
{% endif %}
|
|
|
|
{% if item.grammar_corrections %}
|
2021-09-02 12:40:54 +00:00
|
|
|
{% if began %}, {% endif %} {{ item.grammar_corrections }}
|
2021-05-24 08:15:54 +00:00
|
|
|
{% set began = True %}
|
|
|
|
{% endif %}
|
2021-09-02 12:40:54 +00:00
|
|
|
]
|
2021-05-24 08:15:54 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</br>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div id="rect2" class="mock-side">
|
2021-08-22 17:07:19 +00:00
|
|
|
<canvas id="myChart" width="400" height="400"></canvas>
|
|
|
|
<script>
|
|
|
|
function drawChart(data) {
|
|
|
|
var ctx = document.getElementById('myChart').getContext('2d');
|
|
|
|
var myChart = new Chart(ctx, {
|
|
|
|
type: 'bar',
|
|
|
|
data: {
|
|
|
|
labels: Object.keys(data),
|
|
|
|
datasets: [{
|
|
|
|
label: 'št. naloženih datotek',
|
|
|
|
data: Object.values(data),
|
|
|
|
backgroundColor: 'rgba(54, 162, 235, 1.0)',
|
|
|
|
borderWidth: 1
|
|
|
|
}]
|
|
|
|
},
|
|
|
|
options: {
|
|
|
|
plugins: {
|
|
|
|
title: {
|
|
|
|
display: true,
|
|
|
|
text: ''
|
|
|
|
}
|
|
|
|
},
|
|
|
|
scales: {
|
|
|
|
y: {
|
|
|
|
beginAtZero: true
|
|
|
|
}
|
|
|
|
},
|
|
|
|
indexAxis: 'y'
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
2021-10-12 09:11:37 +00:00
|
|
|
fetch('../topuploads').then(r => r.json()).then(j => drawChart(j));
|
2021-08-22 17:07:19 +00:00
|
|
|
|
2021-11-26 12:50:32 +00:00
|
|
|
</script>-->
|
2021-05-24 08:15:54 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-11-26 12:50:32 +00:00
|
|
|
<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);
|
|
|
|
}
|
2021-12-15 20:23:26 +00:00
|
|
|
|
|
|
|
var files = document.getElementsByClassName("file-item");
|
|
|
|
for (var i = 0; i < files.length; i++) {
|
|
|
|
files[i].addEventListener('click', function(e) {
|
|
|
|
e.stopPropagation();
|
|
|
|
}, false);
|
|
|
|
}
|
|
|
|
|
2021-11-26 12:50:32 +00:00
|
|
|
</script>
|
2021-05-24 08:15:54 +00:00
|
|
|
</body>
|
|
|
|
</html>
|