Commit 54b57265 authored by Bengfort's avatar Bengfort
Browse files

list UI: turn title into link where appropriate

parent 4a233d99
Pipeline #12322 passed with stages
in 5 minutes and 14 seconds
......@@ -5,7 +5,9 @@
<ul class="table-list">
{% for resource in object_list %}
<li class="table-list-item">
<div class="h4">{{ resource }}</div>
<div class="h4">
<a class="unlink" {% if can_manage_resource %}href="{% url 'appointments:resource-detail' resource.pk %}"{% endif %}>{{ resource }}</a>
</div>
{% is_resource_manager user resource as can_manage_resource %}
{% if can_manage_resource %}
<div class="table-list-item-actions">
......
......@@ -5,7 +5,7 @@
<li class="table-list-item">
<div>
<div>
{{ subject.contact }}
<a class="unlink" href="{% url 'subjects:detail' subject.uuid %}">{{ subject.contact }}</a>
</div>
{% if subject.due %}
<div>
......
......@@ -8,7 +8,7 @@
{% if can_access %}
<div class="d-inline-block my-1 mr-2 {% if participation.dropped_out or participation.subject.blocked or participation.subject.deceased %}text-muted{% endif %}">
<div>
{{ participation.subject.contact.full_name }}
<a class="unlink" href="{% url 'execution:participation-detail' study.pk participation.pk %}">{{ participation.subject.contact.full_name }}</a>
{% with summary=participation.subject|reliability_summary %}
<span class="d-inline-block my-1 text-{{ participation.subject|reliability_level }}" aria-label="{{ summary }}" title="{{ summary }}">&#9679;</span>
{% endwith %}
......
......@@ -173,3 +173,8 @@
input:checked + .checkbox-opacity {
opacity: 0.5;
}
.unlink {
color: inherit !important;
text-decoration: none !important;
}
......@@ -90,15 +90,18 @@
<ul class="table-list mb-3">
{% for study in object_list %}
<li class="table-list-item">
{% has_perm 'studies.access_study' user study as can_access %}
{% has_perm 'studies.view_study' user study as can_view_study %}
<div>
<div class="h4 d-inline-block my-1 mr-2">{{ study.name }}</div>
<div class="h4 d-inline-block my-1 mr-2">
<a class="unlink" {% if can_view_study %}href="{% url 'studies:detail' study.pk %}"{% endif %}>{{ study.name }}</a>
</div>
<div class="d-inline-block my-1 mr-2">{{ study.contact_person }}</div>
{% if study.status == study.FINISHED %}
<span class="badge badge-secondary">{% translate 'Finished' %}</span>
{% endif %}
</div>
<div class="table-list-item-actions">
{% has_perm 'studies.access_study' user study as can_access %}
{% if can_access and study.status == study.EXECUTION %}
{% has_perm 'recruitment.recruit' user study as can_recruit %}
{% if can_recruit %}
......@@ -111,7 +114,6 @@
{% endif %}
{% endif %}
{% has_perm 'studies.view_study' user study as can_view_study %}
{% if can_view_study %}
<a class="btn btn-outline-primary my-1" href="{% url 'studies:detail' study.pk %}">{% translate 'Details' %}</a>
{% endif %}
......
......@@ -14,7 +14,7 @@
{% for session in sessions %}
<li class="table-list-item">
<div class="h4 d-inline-block my-1 mr-2">
{{ session.name }}
<a class="unlink" href="{% url 'studies:session-update' study.pk session.pk %}">{{ session.name }}</a>
</div>
<span class="my-1 mr-2">{{ session.duration }}{% translate 'min' %}</span>
{% for type in session.type.all %}
......
......@@ -50,17 +50,19 @@
<div>
{% if can_access %}
<div class="h4 d-inline-block my-1 mr-2">
{% if contact.title %}{{ contact.title }}{% endif %}
{% if contact.first_name|lower == form.cleaned_data.first_name|lower %}
<mark>{{ contact.first_name }}</mark>
{% else %}
{{ contact.first_name }}
{% endif %}
{% if contact.last_name|lower == form.cleaned_data.last_name|lower %}
<mark>{{ contact.last_name }}</mark>
{% else %}
{{ contact.last_name }}
{% endif %}
<a class="unlink" {% if can_access %}href="{% url 'subjects:detail' subject.uuid %}"{% endif %}>
{% if contact.title %}{{ contact.title }}{% endif %}
{% if contact.first_name|lower == form.cleaned_data.first_name|lower %}
<mark>{{ contact.first_name }}</mark>
{% else %}
{{ contact.first_name }}
{% endif %}
{% if contact.last_name|lower == form.cleaned_data.last_name|lower %}
<mark>{{ contact.last_name }}</mark>
{% else %}
{{ contact.last_name }}
{% endif %}
</a>
</div>
{% if can_view_subject %}
<div class="d-inline-block">
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment