Changeset View
Changeset View
Standalone View
Standalone View
swh/web/templates/includes/show-swh-ids.html
Show First 20 Lines • Show All 60 Lines • ▼ Show 20 Lines | <div id="swh-identifiers-content"> | ||||
<img class="swh-badge swh-badge-{{ swhid_info.object_type }}" src="{% url 'swh-badge' swhid_info.object_type swhid_info.object_id %}" | <img class="swh-badge swh-badge-{{ swhid_info.object_type }}" src="{% url 'swh-badge' swhid_info.object_type swhid_info.object_id %}" | ||||
onclick="swh.webapp.showBadgeInfoModal('{{ swhid_info.object_type }}', $(this).parent().find('.swh-id').text())" | onclick="swh.webapp.showBadgeInfoModal('{{ swhid_info.object_type }}', $(this).parent().find('.swh-id').text())" | ||||
title="Click to display badge integration info"> | title="Click to display badge integration info"> | ||||
<pre><a class="swh-id" id="{{ swhid_info.swhid }}" href="{{ swhid_info.swhid_url }}">{{ swhid_info.swhid }}</a></pre> | <pre><a class="swh-id" id="{{ swhid_info.swhid }}" href="{{ swhid_info.swhid_url }}">{{ swhid_info.swhid }}</a></pre> | ||||
{% endif %} | {% endif %} | ||||
{% if swhid_info.swhid_with_context is not None %} | {% if swhid_info.swhid_with_context is not None %} | ||||
<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 %} | |||||
<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-context-option" value="option-origin" type="checkbox" | ||||
id="swh-id-option-origin-{{ swhid_info.object_type }}" | id="swh-id-context-option-{{ swhid_info.object_type }}" | ||||
data-swh-origin="{{ snapshot_context.origin_info.url }}" | data-swhid-with-context="{{ swhid_info.swhid_with_context }}" | ||||
onclick="swh.browse.swhIdOptionOriginToggled(event)"> | onclick="swh.browse.swhIdContextOptionToggled(event)"> | ||||
<label class="form-check-label" for="swh-id-option-origin-{{ swhid_info.object_type }}">Add origin info</label> | <label class="form-check-label" for="swh-id-context-option-{{ swhid_info.object_type }}">Add contextual information</label> | ||||
</div> | </div> | ||||
{% endif %} | |||||
{% if swhid_info.object_type == 'content' %} | |||||
<div class="form-check swh-id-option"> | |||||
<input class="form-check-input swh-id-option-lines" value="option-lines" type="checkbox" | |||||
id="swh-id-option-lines-{{ swhid_info.object_type }}" | |||||
onclick="swh.browse.swhIdOptionLinesToggled(event)"> | |||||
<label class="form-check-label" for="swh-id-option-lines-{{ swhid_info.object_type }}">Add selected lines info</label> | |||||
</div> | |||||
{% 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 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" | ||||
Show All 15 Lines |