Skip to content

Commit

Permalink
remove href when disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
erikvw committed Jan 23, 2024
1 parent 1064173 commit 4488fd1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<div class="list-group-item list-group-item-{{ panel_color }}">
<a class="btn btn-sm btn-{% if reference_obj %}success{% else%}warning{% endif %}" title="{% if reference_obj %}{% if view_only %}View{% elif may_access_tmg_obj %}Edit{% else %}May only be edited by {{ reference_obj.user_created }}{% endif %}{% else %}Add{% endif %}" data-toggle="tooltip" role="button" id="reference_obj-{{ counter }}"
href="{{ reference_obj.get_absolute_url }}?next=edc_adverse_event:open_tmg_ae_listboard_url" {{ disabled }}>
{% if not disabled %} href="{{ reference_obj.get_absolute_url }}?next=edc_adverse_event:open_tmg_ae_listboard_url" {% endif %} {{ disabled }}>
{% if view_only %}<i class="fas fa-eye fa-fw"></i> View {% else %}<i class="fas fa-pencil-alt fa-fw"></i> Edit {% endif %}
</a>
&nbsp;{{ action_item.display_name|cut:"Submit"|cut:"pending" }} {{ action_item.identifier|default:"New" }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
</div>

<div class="col-md-4">

{% ae_followup_queryset ae_initial=result.parent_action_item.reference_obj as qs %}
{% if qs.count == 0 %}<div class="list-group-item">There are no follow-ups to this AE</div>{% endif %}
{% for ae_followup in qs %}
Expand All @@ -55,11 +56,13 @@
{% endfor %}

<div class="list-group-item">
<a class="btn btn-sm btn-primary" role="button" title="go to list of reported visits for this subject" href="{% url subject_review_listboard_url|default:"subject_review_listboard_url_cannot_be_none" %}?q={{ result.subject_identifier }}">Subject Review <i class="fas fa-share"></i></a>
<a class="btn btn-sm btn-primary" role="button" title="go to list of reported visits for this subject" href="{% url subject_review_listboard_url|default:"subject_review_listboard_url_cannot_be_none" %}?q={{ result.subject_identifier }}">Subject Review <i class="fas fa-share"></i></a>
</div>

<div class="list-group-item">
<a class="btn btn-sm btn-default" role="button" title="Go to action item" href="{{ result.get_absolute_url }}?next=edc_adverse_event:open_tmg_ae_listboard_url">{{ result.identifier }}</a> {{ result.display_name }}
<a class="btn btn-sm btn-default" role="button" title="Go to action item" href="{{ result.get_absolute_url }}?next=edc_adverse_event:open_tmg_ae_listboard_url">{{ result.identifier }}</a> {{ result.display_name }}
</div>

</div>
</div>
</div>
Expand Down

0 comments on commit 4488fd1

Please sign in to comment.