forked from Signbank/FinSL-signbank
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Nora Schneider
committed
Feb 21, 2024
1 parent
383dc70
commit 00dd7f0
Showing
6 changed files
with
461 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
signbank/dictionary/templates/dictionary/import_manual_validation_csv.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{% extends 'baselayout.html' %} | ||
{% load stylesheet %} | ||
{% load bootstrap3 %} | ||
{% load i18n %} | ||
{% block bootstrap3_title %}{% blocktrans %}Import Manual Validation CSV{% endblocktrans %} | {% endblock %} | ||
|
||
{% block content %} | ||
{% if perms.dictionary.import_csv %} | ||
<div id="import-csv"> | ||
{# Translators: #} | ||
<h3>{% blocktrans %}Import Manual Validation CSV{% endblocktrans %}:</h3> | ||
|
||
<ul> | ||
<li>{% blocktrans %}CSV-file should contain the following columns:{% endblocktrans %}</li> | ||
<ul> | ||
<li>{% blocktrans %}group{% endblocktrans %}</li> | ||
<li>{% blocktrans %}idgloss{% endblocktrans %}</li> | ||
<li>{% blocktrans %}yes{% endblocktrans %}</li> | ||
<li>{% blocktrans %}no{% endblocktrans %}</li> | ||
<li>{% blocktrans %}abstain or not sure{% endblocktrans %}</li> | ||
<li>{% blocktrans %}comments{% endblocktrans %}</li> | ||
</ul> | ||
<li>{% blocktrans %}Column headers should be all lower case{% endblocktrans %}</li> | ||
<li>{% blocktrans %}Any further columns will be ignored during import{% endblocktrans %}</li> | ||
<li>{% blocktrans %}The CSV-file's character set needs to be UTF-8. When exporting the CSV-file, | ||
make sure that you select UTF-8 charset.{% endblocktrans %}</li> | ||
</ul> | ||
|
||
<form enctype="multipart/form-data" action='{% url "dictionary:import_manual_validation_csv" %}' method='post'> | ||
{% csrf_token %} | ||
{% bootstrap_field import_csv_form.file %} | ||
<br> | ||
<input class='btn btn-primary' type='submit' value='{% blocktrans %}Import manual validation aggregations from CSV{% endblocktrans %}'> | ||
</form> | ||
</div> | ||
{% else %} | ||
{# Translators: Message that appears if user doesn't have proper user rights to view this page. #} | ||
<p>{% blocktrans %}You do not have sufficient user rights to view this page.{% endblocktrans %}</p> | ||
{% endif %} | ||
{% endblock %} |
40 changes: 40 additions & 0 deletions
40
signbank/dictionary/templates/dictionary/import_manual_validation_csv_confirmation.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{% extends 'baselayout.html' %} | ||
{% load stylesheet %} | ||
{% load bootstrap3 %} | ||
{% load i18n %} | ||
{% block bootstrap3_title %}{% blocktrans %}Confirm Import Manual Validation CSV{% endblocktrans %} | {% endblock %} | ||
|
||
{% block content %} | ||
{% if perms.dictionary.import_csv %} | ||
<div> | ||
{% if group_row_map %} | ||
<h3>{% blocktrans %}ManualValidationAggregations to be added{% endblocktrans %}</h3> | ||
{% for group, gloss_count in group_gloss_count.items %} | ||
<p>{% blocktrans %}Group: {{ group }} - {{ gloss_count }} glosses{% endblocktrans %}</p> | ||
{% endfor %} | ||
<form action='{% url "dictionary:confirm_import_manual_validation_csv" %}' method='post'> | ||
{% csrf_token %} | ||
<input class='btn btn-primary' name='confirm' type='submit' value='{% blocktrans %}Confirm{% endblocktrans %}'> | ||
<input class='btn btn-primary' name='cancel' type='submit' value='{% blocktrans %}Cancel{% endblocktrans %}'> | ||
</form> | ||
{% endif %} | ||
</div> | ||
<div> | ||
{% if manual_validation_aggregations %} | ||
<div> | ||
<h3>{% blocktrans %}Manual validation aggregations were successfully added{% endblocktrans %}</h3> | ||
<p>{% blocktrans %}Added total of {{ manual_validation_aggregations_count }} validation aggregations.{% endblocktrans %}</p> | ||
</div> | ||
{% if missing_glosses %} | ||
<div> | ||
<h4>{% blocktrans %}Could not find some glosses{% endblocktrans %}</h4> | ||
{% for group, idgloss in missing_glosses %} | ||
<p>{% blocktrans %}Group: {{ group }} - Gloss: {{ idgloss }}{% endblocktrans %}</p> | ||
{% endfor %} | ||
</div> | ||
{% endif %} | ||
<p><a href="{% url "dictionary:import_manual_validation_csv" %}">{% blocktrans %}Return to the form{% endblocktrans %}</a></p> | ||
{% endif %} | ||
</div> | ||
{% endif %} | ||
{% endblock %} |
Oops, something went wrong.