Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
removed unnecessary comment and fixed HTML broken indentations and whitespaces
  • Loading branch information
jooooosef committed Dec 16, 2024
1 parent fc76287 commit 49f0467
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 31 deletions.
51 changes: 21 additions & 30 deletions evap/results/templates/results_evaluation_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,25 +33,21 @@
<h3 class="mb-0">{{ evaluation.full_name }} ({{ evaluation.course.semester.name }})</h3>
</div>
<div class="col-auto">

<div class="row">
<div class="col-auto">
<div class="btn-switch btn-switch-light my-auto d-print-none">
<div class="btn-switch-label">{% translate 'General results' %}</div>
<div class="btn-switch btn-group">

<a
href="{% url 'results:evaluation_detail' evaluation.course.semester.id evaluation.id %}?view_general_results=full&view_contributor_results={{ view_contributor_results.value }}"
role="button"
class="btn btn-sm btn-light {% if not general_textanswers %} disabled {% elif view_general_results == ViewGeneralResults.FULL %} active{% endif %}"
data-bs-toggle="tooltip"
data-bs-placement="bottom"
title="{% blocktranslate %}All results of general questions (including text answers){% endblocktranslate %}"
>
{% translate 'Full' %}
</a>


<a
href="{% url 'results:evaluation_detail' evaluation.course.semester.id evaluation.id %}?view_general_results=full&view_contributor_results={{ view_contributor_results.value }}"
role="button"
class="btn btn-sm btn-light {% if not general_textanswers %} disabled {% elif view_general_results == ViewGeneralResults.FULL %} active{% endif %}"
data-bs-toggle="tooltip"
data-bs-placement="bottom"
title="{% blocktranslate %}All results of general questions (including text answers){% endblocktranslate %}"
>
{% translate 'Full' %}
</a>
<a
href="{% url 'results:evaluation_detail' evaluation.course.semester.id evaluation.id %}?view_general_results=ratings&view_contributor_results={{ view_contributor_results.value }}"
role="button"
Expand All @@ -72,7 +68,6 @@ <h3 class="mb-0">{{ evaluation.full_name }} ({{ evaluation.course.semester.name
<div class="btn-switch btn-switch-light my-auto d-print-none">
<div class="btn-switch-label">{% translate 'Contributor results' %}</div>
<div class="btn-switch btn-group">

<a
href="{% url 'results:evaluation_detail' evaluation.course.semester.id evaluation.id %}?view_general_results={{ view_general_results.value }}&view_contributor_results=full"
role="button"
Expand All @@ -81,10 +76,8 @@ <h3 class="mb-0">{{ evaluation.full_name }} ({{ evaluation.course.semester.name
data-bs-placement="bottom"
title="{% blocktranslate %}All results of contributor questions available for you (including text answers){% endblocktranslate %}"
>
{% translate 'Full'%}
{% translate 'Full' %}
</a>


<a
href="{% url 'results:evaluation_detail' evaluation.course.semester.id evaluation.id %}?view_general_results={{ view_general_results.value }}&view_contributor_results=ratings"
role="button"
Expand All @@ -95,18 +88,16 @@ <h3 class="mb-0">{{ evaluation.full_name }} ({{ evaluation.course.semester.name
>
{% translate 'Ratings' %}
</a>
{#{% if user.is_staff and view_contributor_results == ViewContributorResults.PERSONAL or is_contributor %}#}
<a
href="{% url 'results:evaluation_detail' evaluation.course.semester.id evaluation.id %}?view_general_results={{ view_general_results.value }}&view_contributor_results=personal"
role="button"
class="btn btn-sm btn-light {% if not contributor_personal or not contributor_textanswers %} disabled {% elif view_contributor_results == ViewContributorResults.PERSONAL %} active {% endif %}"
data-bs-toggle="tooltip"
data-bs-placement="bottom"
title="{% translate 'All results of contributor questions regarding yourself, hiding other contributors' %}"
>
{% translate 'Personal' %}
</a>
{#{% endif %}#}
<a
href="{% url 'results:evaluation_detail' evaluation.course.semester.id evaluation.id %}?view_general_results={{ view_general_results.value }}&view_contributor_results=personal"
role="button"
class="btn btn-sm btn-light {% if not contributor_personal or not contributor_textanswers %} disabled {% elif view_contributor_results == ViewContributorResults.PERSONAL %} active {% endif %}"
data-bs-toggle="tooltip"
data-bs-placement="bottom"
title="{% translate 'All results of contributor questions regarding yourself, hiding other contributors' %}"
>
{% translate 'Personal' %}
</a>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion evap/results/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
class ViewGeneralResults(Enum):
@property
def do_not_call_in_templates(self):
return False # ich darf das weil django kaputt is (pass geht auch :o)
return False

FULL = "full"
RATINGS = "ratings"
Expand Down

0 comments on commit 49f0467

Please sign in to comment.