Changeset View
Changeset View
Standalone View
Standalone View
swh/web/templates/includes/show-swh-ids.html
Show First 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | <div id="swh-identifiers-content"> | ||||
{% for swh_id in swh_ids %} | {% for swh_id in swh_ids %} | ||||
{% if forloop.first %} | {% if forloop.first %} | ||||
<div class="tab-pane active" id="swh-id-tab-{{ swh_id.object_type }}"> | <div class="tab-pane active" id="swh-id-tab-{{ swh_id.object_type }}"> | ||||
{% else %} | {% else %} | ||||
<div class="tab-pane" id="swh-id-tab-{{ swh_id.object_type }}"> | <div class="tab-pane" id="swh-id-tab-{{ swh_id.object_type }}"> | ||||
{% endif %} | {% endif %} | ||||
<div class="card"> | <div class="card"> | ||||
<div class="card-body swh-id-ui"> | <div class="card-body swh-id-ui"> | ||||
{% if snapshot_context and snapshot_context.origin_info %} | |||||
<img class="swh-badge swh-badge-origin" src="{% url 'swh-badge' 'origin' snapshot_context.origin_info.url %}" | |||||
onclick="swh.webapp.showBadgeInfoModal('origin', '{{ snapshot_context.origin_info.url }}')" | |||||
title="Click to display badge integration info"> | |||||
{% endif %} | |||||
<img class="swh-badge swh-badge-{{ swh_id.object_type }}" src="{% url 'swh-badge' swh_id.object_type swh_id.object_id %}" | |||||
onclick="swh.webapp.showBadgeInfoModal('{{ swh_id.object_type }}', $(this).parent().find('.swh-id').text())" | |||||
title="Click to display badge integration info"> | |||||
<pre><a class="swh-id" id="{{ swh_id.swh_id }}" href="{{ swh_id.swh_id_url }}">{{ swh_id.swh_id }}</a></pre> | <pre><a class="swh-id" id="{{ swh_id.swh_id }}" href="{{ swh_id.swh_id_url }}">{{ swh_id.swh_id }}</a></pre> | ||||
{% if swh_id.show_options %} | {% if swh_id.show_options %} | ||||
<div class="float-left"> | <div class="float-left"> | ||||
<form id="swh-id-options"> | <form id="swh-id-options"> | ||||
{% if snapshot_context and snapshot_context.origin_info %} | {% if snapshot_context and snapshot_context.origin_info %} | ||||
<div class="form-check swh-id-option"> | <div class="form-check swh-id-option"> | ||||
<input class="form-check-input swh-id-option-origin" value="option-origin" type="checkbox" | <input class="form-check-input swh-id-option-origin" value="option-origin" type="checkbox" | ||||
id="swh-id-option-origin-{{ swh_id.object_type }}" | id="swh-id-option-origin-{{ swh_id.object_type }}" | ||||
Show All 12 Lines | <div id="swh-identifiers-content"> | ||||
{% endif %} | {% endif %} | ||||
</form> | </form> | ||||
</div> | </div> | ||||
{% endif %} | {% endif %} | ||||
<div class="float-right"> | <div class="float-right"> | ||||
<button type="button" class="btn btn-default btn-sm btn-swh-id-copy" | <button type="button" class="btn btn-default btn-sm btn-swh-id-copy" | ||||
title="Copy persistent identifier to clipboard"> | title="Copy persistent identifier to clipboard"> | ||||
<i class="fa fa-clipboard fa-fw" aria-hidden="true"></i>Copy identifier | <i class="fa fa-clipboard fa-fw" aria-hidden="true"></i>Copy identifier | ||||
</button> | |||||
<button type="button" class="btn btn-default btn-sm btn-swh-id-url-copy" | <button type="button" class="btn btn-default btn-sm btn-swh-id-url-copy" | ||||
title="Copy url resolving the persistent identifier to clipboard"> | title="Copy url resolving the persistent identifier to clipboard"> | ||||
<i class="fa fa-clipboard fa-fw" aria-hidden="true"></i>Copy permalink | <i class="fa fa-clipboard fa-fw" aria-hidden="true"></i>Copy permalink | ||||
</button> | </button> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
{% endfor %} | {% endfor %} | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
{% endif %} | {% endif %} |