Skip to content

Commit

Permalink
Merge pull request EGCETSII#43 from Decide-Part-Rota/Rota1-017
Browse files Browse the repository at this point in the history
Rota1-017
  • Loading branch information
Fraborcar1 authored Nov 26, 2022
2 parents 6eda929 + 2ab2166 commit 39d28c5
Show file tree
Hide file tree
Showing 15 changed files with 483 additions and 83 deletions.
16 changes: 1 addition & 15 deletions decide/census/templates/census_add.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,21 +76,7 @@ <h4>{% trans "In this view you can manage the census by adding a user to a speci



<form action="{% url 'set_language' %}" method="post">{% csrf_token %}

<input name = "next" type="hidden" value = "{{redirect_to }}">
<select name = "language">
{% get_current_language as LANGUAGE_CODE %}
{% get_available_languages as LANGUAGES %}
{% get_language_info_list for LANGUAGES as languages %}
{% for language in languages %}
<option value="{{ language.code }}"{% if language.code == LANGUAGE_CODE %} selected{% endif %}>
{{ language.name_local }} ({{ language.code}})
</option>
{%endfor%}
</select>
<input type= "submit" value = {% trans "Go" %} >
</form>
{% include 'footer.html' %}


{% endblock %}
12 changes: 6 additions & 6 deletions decide/census/templates/census_age.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
{% block content %}
<div class="row justify-content-md-center align-items-center">
<div class="col-sm-8 justify-content-center align-items-center">
<h2 class ="justify-content-center align-items-center">Census Groups</h2>
<h2 class ="justify-content-center align-items-center"> {% trans "Census Groups" %}</h2>
</div>
</div>
<div class="row justify-content-md-center">
<div class="col-sm-8">
<h3>Now you can add groups of voters to an specific voting</h3>
<h6>for example, if you select minmun age 22 and maximum age 28, every user who satisfies that requirement will be added to the chosen voting</h6>
<h3>{% trans "Now you can add groups of voters to an specific voting" %}</h3>
<h6>{% trans "for example, if you select minmun age 22 and maximum age 28, every user who satisfies that requirement will be added to the chosen voting" %}</h6>
</div>
</div>

Expand All @@ -30,7 +30,7 @@ <h6>for example, if you select minmun age 22 and maximum age 28, every user who
{% csrf_token %}
<div class="row justify-content-md-center">
<div class="col-sm-8">
<label for="specificSizeSelect">Choose a voting</label>
<label for="specificSizeSelect">{% trans "Choose a voting" %}</label>
<select class="form-select" id="specificSizeSelect" name="voting-select">
{% for voting in votings %}
<option value="{{voting.id}}">{{voting}}</option>
Expand All @@ -41,7 +41,7 @@ <h6>for example, if you select minmun age 22 and maximum age 28, every user who
</div>
<div class="row justify-content-md-center">
<div class="col-sm-8">
<label>Choose age</label>
<label>{% trans "Choose age" %}</label>
<input type="number" name="minimum-age" max="100" min="0">
<input type="number" name="maximum-age" max="100" min="0">
</div>
Expand All @@ -66,6 +66,6 @@ <h6>for example, if you select minmun age 22 and maximum age 28, every user who
</ul>

{% endif %}

{% include 'footer.html' %}

{% endblock %}
14 changes: 7 additions & 7 deletions decide/census/templates/census_by_group.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
{% block content %}
<div class="row justify-content-md-center align-items-center">
<div class="col-sm-8 justify-content-center align-items-center">
<h2>Census Groups</h2>
<h2>{% trans "Census Groups" %}</h2>
</div>
</div>
<div class="row justify-content-md-center">
<div class="col-sm-8">
<h4>Select which type of grouping you want to apply</h4>
<h4>{% trans "Select which type of grouping you want to apply" %}</h4>
</div>
</div>

Expand All @@ -27,16 +27,16 @@ <h4>Select which type of grouping you want to apply</h4>

<div class="row justify-content-center submit">
<div class="col col-lg-2">
<a href="maritialStatus"><button type="button" class="btn btn-primary group-button">Maritial Status</button></a>
<a href="maritialStatus"><button type="button" class="btn btn-primary group-button">{% trans "Maritial Status" %}</button></a>
</div>
<div class="col col-lg-2">
<a href="nationality"><button type="button" class="btn btn-primary group-button">Nationality</button></a>
<a href="nationality"><button type="button" class="btn btn-primary group-button">{% trans "Nationality" %}</button></a>
</div>
<div class="col col-lg-2">
<a href="age"><button type="button" class="btn btn-primary group-button">Age</button></a>
<a href="age"><button type="button" class="btn btn-primary group-button">{% trans "Age" %}</button></a>
</div>
<div class="col col-lg-2">
<a href="gender"><button type="button" class="btn btn-primary group-button">Gender</button></a>
<a href="gender"><button type="button" class="btn btn-primary group-button">{% trans "Gender" %}</button></a>
</div>
</div>

Expand All @@ -53,6 +53,6 @@ <h4>Select which type of grouping you want to apply</h4>
</ul>

{% endif %}

{% include 'footer.html' %}

{% endblock %}
10 changes: 5 additions & 5 deletions decide/census/templates/census_export.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@

{% block content %}
<div class="title">
<h2>Export Census</h2>
<h2>{% trans "Export Census" %}</h2>
</div>

<div class="row justify-content-md-center">
<div class="col-sm-8">
<h4>In this view you can manage the census by exporting the users participating in a voting</h4>
<h4>{% trans "In this view you can manage the census by exporting the users participating in a voting" %}</h4>
</div>
</div>

Expand All @@ -28,7 +28,7 @@ <h4>In this view you can manage the census by exporting the users participating
{% csrf_token %}
<div class="row justify-content-md-center">
<div class="col-sm-8">
<label for="specificSizeSelect">Choose a voting</label>
<label for="specificSizeSelect">{% trans "Choose a voting" %}</label>
<select class="form-select" id="specificSizeSelect" name="voting-select">
{% for voting in votings %}
<option value="{{voting.id}}">{{voting}}</option>
Expand All @@ -39,7 +39,7 @@ <h4>In this view you can manage the census by exporting the users participating
</div>
<div class="row justify-content-center submit">
<div class="col col-lg-1">
<button type="submit" class="btn btn-primary">Export</button>
<button type="submit" class="btn btn-primary">{% trans "Export" %}</button>
</div>
</div>
</form>
Expand All @@ -58,5 +58,5 @@ <h4>In this view you can manage the census by exporting the users participating

{% endif %}


{% include 'footer.html' %}
{% endblock %}
12 changes: 6 additions & 6 deletions decide/census/templates/census_gender.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
{% block content %}
<div class="row justify-content-md-center align-items-center">
<div class="col-sm-8 justify-content-center align-items-center">
<h2 class ="justify-content-center align-items-center">Census Groups</h2>
<h2 class ="justify-content-center align-items-center">{% trans "Census Groups" %}</h2>
</div>
</div>
<div class="row justify-content-md-center">
<div class="col-sm-8">
<h3>Now you can add groups of voters to an specific voting</h3>
<h6>for example, if you select "Male", every user who satisfies that requirement will be added to the chosen voting</h6>
<h3>{% trans "Now you can add groups of voters to an specific voting" %}</h3>
<h6>{% trans "for example, if you select "Male", every user who satisfies that requirement will be added to the chosen voting" %}</h6>
</div>
</div>

Expand All @@ -30,7 +30,7 @@ <h6>for example, if you select "Male", every user who satisfies that requirement
{% csrf_token %}
<div class="row justify-content-md-center">
<div class="col-sm-8">
<label for="specificSizeSelect">Choose a voting</label>
<label for="specificSizeSelect">{% trans "Choose a voting" %}</label>
<select class="form-select" id="specificSizeSelect" name="voting-select">
{% for voting in votings %}
<option value="{{voting.id}}">{{voting}}</option>
Expand All @@ -41,7 +41,7 @@ <h6>for example, if you select "Male", every user who satisfies that requirement
</div>
<div class="row justify-content-md-center">
<div class="col-sm-8">
<label for="specificSizeSelect">Choose gender</label>
<label for="specificSizeSelect">{% trans "Choose gender" %}</label>
<select multiple class="form-select" id="specificSizeSelect" name="gender-select">
<!--{% for gender in gender %}
<option value="{{gender}}">{{gender}}</option>
Expand Down Expand Up @@ -70,5 +70,5 @@ <h6>for example, if you select "Male", every user who satisfies that requirement

{% endif %}


{% include 'footer.html' %}
{% endblock %}
12 changes: 6 additions & 6 deletions decide/census/templates/census_import.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@

{% block content %}
<div class="title">
<h2>Import Census</h2>
<h2>{% trans "Import Census" %}</h2>
</div>

<div class="row justify-content-md-center">
<div class="col-sm-8">
<h4>In this view you can manage the census by importing users participating in a voting</h4>
<h4>{% trans "In this view you can manage the census by importing users participating in a voting" %}</h4>
</div>
</div>

Expand All @@ -28,7 +28,7 @@ <h4>In this view you can manage the census by importing users participating in a
{% csrf_token %}
<div class="row justify-content-md-center">
<div class="col-sm-8">
<label for="specificSizeSelect">Choose a voting</label>
<label for="specificSizeSelect">{% trans "Choose a voting" %}</label>
<select class="form-select" id="specificSizeSelect" name="voting-select">
{% for voting in votings %}
<option value="{{voting.id}}">{{voting}}</option>
Expand All @@ -39,14 +39,14 @@ <h4>In this view you can manage the census by importing users participating in a
</div>
<div class="row justify-content-md-center">
<div class="col-sm-8">
<label for="file" class="form-label">Upload a csv file</label>
<label for="file" class="form-label">{% trans "Upload a csv file" %}</label>
<input class="form-control" type="file" id="formFile" name="csv-file" required>

</div>
</div>
<div class="row justify-content-center submit">
<div class="col col-lg-1">
<button type="submit" class="btn btn-primary">Import</button>
<button type="submit" class="btn btn-primary">{% trans "Import" %}</button>
</div>
</div>
</form>
Expand All @@ -65,5 +65,5 @@ <h4>In this view you can manage the census by importing users participating in a

{% endif %}


{% include 'footer.html' %}
{% endblock %}
12 changes: 6 additions & 6 deletions decide/census/templates/census_maritialStatus.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
{% block content %}
<div class="row justify-content-md-center align-items-center">
<div class="col-sm-8 justify-content-center align-items-center">
<h2 class ="justify-content-center align-items-center">Census Groups</h2>
<h2 class ="justify-content-center align-items-center">{% trans "Census Groups" %}</h2>
</div>
</div>
<div class="row justify-content-md-center">
<div class="col-sm-8">
<h3>Now you can add groups of voters to an specific voting</h3>
<h6>for example, if you select Single, every user who satisfies that requirement will be added to the chosen voting</h6>
<h3>{% trans "Now you can add groups of voters to an specific voting" %}</h3>
<h6>{% trans "for example, if you select Single, every user who satisfies that requirement will be added to the chosen voting" %}</h6>
</div>
</div>

Expand All @@ -30,7 +30,7 @@ <h6>for example, if you select Single, every user who satisfies that requirement
{% csrf_token %}
<div class="row justify-content-md-center">
<div class="col-sm-8">
<label for="specificSizeSelect">Choose a voting</label>
<label for="specificSizeSelect">{% trans "Choose a voting" %}</label>
<select class="form-select" id="specificSizeSelect" name="voting-select">
{% for voting in votings %}
<option value="{{voting.id}}">{{voting}}</option>
Expand All @@ -41,7 +41,7 @@ <h6>for example, if you select Single, every user who satisfies that requirement
</div>
<div class="row justify-content-md-center">
<div class="col-sm-8">
<label for="specificSizeSelect">Maritial Status</label>
<label for="specificSizeSelect">{% trans "Maritial Status" %}</label>
<select multiple class="form-select" id="specificSizeSelect" name="maritialStatus-select">
<!--{% for maritialstatus in maritialStatus %}
<option value="{{maritialstatus}}">{{maritialstatus}}</option>
Expand Down Expand Up @@ -70,5 +70,5 @@ <h6>for example, if you select Single, every user who satisfies that requirement

{% endif %}


{% include 'footer.html' %}
{% endblock %}
12 changes: 6 additions & 6 deletions decide/census/templates/census_nationality.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
{% block content %}
<div class="row justify-content-md-center align-items-center">
<div class="col-sm-8 justify-content-center align-items-center">
<h2 class ="justify-content-center align-items-center">Census Groups</h2>
<h2 class ="justify-content-center align-items-center">{% trans "Census Groups" %}</h2>
</div>
</div>
<div class="row justify-content-md-center">
<div class="col-sm-8">
<h3>Now you can add groups of voters to an specific voting</h3>
<h6>for example, if you select Spain, every spanish user will be added to the chosen voting</h6>
<h3>{% trans "Now you can add groups of voters to an specific voting" %}</h3>
<h6>{% trans "for example, if you select Spain, every spanish user will be added to the chosen voting" %}</h6>
</div>
</div>

Expand All @@ -30,7 +30,7 @@ <h6>for example, if you select Spain, every spanish user will be added to the ch
{% csrf_token %}
<div class="row justify-content-md-center">
<div class="col-sm-8">
<label for="specificSizeSelect">Choose a voting</label>
<label for="specificSizeSelect">{% trans "Choose a voting" %}</label>
<select class="form-select" id="specificSizeSelect" name="voting-select">
{% for voting in votings %}
<option value="{{voting.id}}">{{voting}}</option>
Expand All @@ -40,7 +40,7 @@ <h6>for example, if you select Spain, every spanish user will be added to the ch
</div>
<div class="row justify-content-md-center">
<div class="col-sm-8">
<label for="specificSizeSelect">Nationality</label>
<label for="specificSizeSelect">{% trans "Nationality" %}</label>
<select multiple class="form-select" id="specificSizeSelect" name="nationality-select">
<select multiple class="form-select" id="specificSizeSelect" name="maritialStatus-select">
<!--{% for nation in nationality %}
Expand Down Expand Up @@ -70,5 +70,5 @@ <h6>for example, if you select Spain, every spanish user will be added to the ch

{% endif %}


{% include 'footer.html' %}
{% endblock %}
10 changes: 5 additions & 5 deletions decide/census/templates/census_remove.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@

{% block content %}
<div class="title">
<h2>Manage Census</h2>
<h2>{% trans "Manage Census" %}</h2>
</div>

<div class="row justify-content-md-center">
<div class="col-sm-8">
<h4>In this view you can manage the census by deleting a user from a specific voting</h4>
<h4>{% trans "In this view you can manage the census by deleting a user from a specific voting" %}</h4>
</div>
</div>

Expand All @@ -28,7 +28,7 @@ <h4>In this view you can manage the census by deleting a user from a specific vo
{% csrf_token %}
<div class="row justify-content-md-center">
<div class="col-sm-8">
<label for="specificSizeSelect">Choose a voting</label>
<label for="specificSizeSelect">{% trans "Choose a voting" %}</label>
<select class="form-select" id="specificSizeSelect" name="voting-select">
{% for voting in votings %}
<option value="{{voting.id}}">{{voting}}</option>
Expand All @@ -39,7 +39,7 @@ <h4>In this view you can manage the census by deleting a user from a specific vo
</div>
<div class="row justify-content-md-center">
<div class="col-sm-8">
<label for="specificSizeSelect">Choose a user</label>
<label for="specificSizeSelect">{% trans "Choose a user" %}</label>
<select class="form-select" id="specificSizeSelect" name="user-select">
{% for user in users %}
<option value="{{user.id}}">{{user}}</option>
Expand All @@ -64,5 +64,5 @@ <h4>In this view you can manage the census by deleting a user from a specific vo




{% include 'footer.html' %}
{% endblock %}
16 changes: 16 additions & 0 deletions decide/census/templates/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{% load i18n static %}
<form action="{% url 'set_language' %}" method="post">{% csrf_token %}

<input name = "next" type="hidden" value = "{{redirect_to }}">
<select name = "language">
{% get_current_language as LANGUAGE_CODE %}
{% get_available_languages as LANGUAGES %}
{% get_language_info_list for LANGUAGES as languages %}
{% for language in languages %}
<option value="{{ language.code }}"{% if language.code == LANGUAGE_CODE %} selected{% endif %}>
{{ language.name_local }} ({{ language.code}})
</option>
{%endfor%}
</select>
<input type= "submit" value = {% trans "Go" %} >
</form>
Loading

0 comments on commit 39d28c5

Please sign in to comment.