Skip to content

Commit

Permalink
let action buttons use multiple rows on staff semester view
Browse files Browse the repository at this point in the history
  • Loading branch information
janno42 committed Dec 2, 2024
1 parent e5b4b6a commit b81c3a4
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion evap/staff/templates/staff_semester_view.html
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ <h3 class="m-0 me-1">{{ semester.name }}</h3>
<col />
<col style="width: 12.25em" />
<col style="width: 12em" />
<col style="width: 10.5em" />
<col style="width: 8.5em" />
</colgroup>
<thead>
<tr>
Expand Down
16 changes: 8 additions & 8 deletions evap/staff/templates/staff_semester_view_evaluation.html
Original file line number Diff line number Diff line change
Expand Up @@ -168,35 +168,35 @@
{% if not info_only %}
{% if evaluation.num_textanswers > 0 and state < evaluation.State.PUBLISHED %}
<a href="{% url 'staff:evaluation_textanswers' evaluation.id %}" class="btn btn-sm {% if state == evaluation.State.REVIEWED %}btn-light{% else %}btn-primary{% endif %}" data-bs-toggle="tooltip" title="{% translate 'Review text answers' %}">
<span class="fas fa-magnifying-glass"></span>
<span class="fas fa-fw fa-magnifying-glass"></span>
</a>
{% endif %}
{% if not evaluation.is_single_result and request.user.is_manager %}
{% if state < evaluation.State.IN_EVALUATION %}
<a href="{% url 'staff:evaluation_person_management' evaluation.id %}" class="btn btn-sm btn-light" data-bs-toggle="tooltip" title="{% translate 'Manage participants/contributors' %}">
<span class="fas fa-user"></span>
<span class="fas fa-fw fa-user"></span>
</a>
{% endif %}
<a href="{% url 'staff:evaluation_copy' evaluation.id %}" class="btn btn-sm btn-light" data-bs-toggle="tooltip" title="{% translate 'Copy' %}">
<span class="fas fa-copy"></span>
<span class="fas fa-fw fa-copy"></span>
</a>
{% endif %}
{% if request.user.is_manager %}
<a href="{% url 'staff:evaluation_email' evaluation.id %}" class="btn btn-sm btn-light" data-bs-toggle="tooltip" data-bs-placement="top" title="{% translate 'Send email' %}">
<span class="fas fa-envelope" aria-hidden="true"></span>
<span class="fas fa-fw fa-envelope" aria-hidden="true"></span>
</a>
{% endif %}
{% if state < evaluation.State.IN_EVALUATION %}
<a href="{% url 'staff:evaluation_preview' evaluation.id %}" class="btn btn-sm btn-light" data-bs-toggle="tooltip" data-bs-placement="top" title="{% translate 'Preview' %}">
<span class="fas fa-eye" aria-hidden="true"></span>
<span class="fas fa-fw fa-eye" aria-hidden="true"></span>
</a>
{% elif state < evaluation.State.PUBLISHED and evaluation|can_results_page_be_seen_by:request.user %}
<a href="{% url 'results:evaluation_detail' semester.id evaluation.id %}" class="btn btn-sm btn-light" data-bs-toggle="tooltip" data-bs-placement="top" title="{% translate 'Preview results' %}">
<span class="fas fa-chart-simple" aria-hidden="true"></span>
<span class="fas fa-fw fa-chart-simple" aria-hidden="true"></span>
</a>
{% elif state == evaluation.State.PUBLISHED and evaluation|can_results_page_be_seen_by:request.user %}
<a href="{% url 'results:evaluation_detail' semester.id evaluation.id %}" class="btn btn-sm btn-light" data-bs-toggle="tooltip" data-bs-placement="top" title="{% translate 'Results' %}">
<span class="fas fa-chart-simple" aria-hidden="true"></span>
<span class="fas fa-fw fa-chart-simple" aria-hidden="true"></span>
</a>
{% endif %}
{% if request.user.is_manager and evaluation.can_be_deleted_by_manager %}
Expand All @@ -210,7 +210,7 @@
</span>

<button slot="show-button" type="button" class="btn btn-sm btn-outline-danger" data-bs-toggle="tooltip" data-bs-placement="top" title="{% translate 'Delete' %}">
<span class="fas fa-trash" aria-hidden="true"></span>
<span class="fas fa-fw fa-trash" aria-hidden="true"></span>
</button>
</confirmation-modal>
{% endif %}
Expand Down
7 changes: 6 additions & 1 deletion evap/static/scss/components/_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ a:not([href]):not(.disabled) {
border-bottom-left-radius: 0;
}
}

@media screen and (max-aspect-ratio: $notebook-break) {
.button-open-notebook {
margin-top: 1rem;
Expand Down Expand Up @@ -286,3 +286,8 @@ a.collapse-toggle {
box-shadow: none;
}
}

td .btn {
margin-top: 0.15rem;
margin-bottom: 0.15rem;
}

0 comments on commit b81c3a4

Please sign in to comment.