Changeset View
Changeset View
Standalone View
Standalone View
swh/web/templates/includes/show-swhids.html
Show All 12 Lines | <div id="swh-identifiers" style="display: none;"> | ||||
{% if swhids_info|length > 1 %} | {% if swhids_info|length > 1 %} | ||||
<a id="swhids-handle" class="handle ui-slideouttab-handle ui-slideouttab-handle-rounded"><i class="mdi mdi-link-variant mdi-fw" aria-hidden="true"></i>Permalinks</a> | <a id="swhids-handle" class="handle ui-slideouttab-handle ui-slideouttab-handle-rounded"><i class="mdi mdi-link-variant mdi-fw" aria-hidden="true"></i>Permalinks</a> | ||||
{% else %} | {% else %} | ||||
<a id="swhids-handle" class="handle ui-slideouttab-handle ui-slideouttab-handle-rounded"><i class="mdi mdi-link-variant mdi-fw" aria-hidden="true"></i>Permalink</a> | <a id="swhids-handle" class="handle ui-slideouttab-handle ui-slideouttab-handle-rounded"><i class="mdi mdi-link-variant mdi-fw" aria-hidden="true"></i>Permalink</a> | ||||
{% endif %} | {% endif %} | ||||
<div id="swh-identifiers-content"> | <div id="swh-identifiers-content"> | ||||
<p> | <p> | ||||
To reference or cite the objects present in the Software Heritage archive, permalinks based on | To reference or cite the objects present in the Software Heritage archive, permalinks based on | ||||
<a href="https://docs.softwareheritage.org/devel/swh-model/persistent-identifiers.html"> | <a target="_blank" rel="noopener noreferrer" | ||||
href="https://docs.softwahreheritage.org/devel/swh-model/persistent-identifiers.html"> | |||||
SoftWare Heritage persistent IDentifiers (SWHIDs) | SoftWare Heritage persistent IDentifiers (SWHIDs) | ||||
</a> | </a> | ||||
must be used instead of copying and pasting the url from the address bar of the browser (as there is no guarantee the current URI | must be used instead of copying and pasting the url from the address bar of the browser (as there is no guarantee the current URI | ||||
scheme will remain the same over time). | scheme will remain the same over time). | ||||
<br/> | <br/> | ||||
<br/> | <br/> | ||||
Select below a type of object currently browsed in order to display its associated SWHID and permalink. | Select below a type of object currently browsed in order to display its associated SWHID and permalink. | ||||
</p> | </p> | ||||
Show All 20 Lines | <div id="swh-identifiers-content"> | ||||
{% for swhid_info in swhids_info %} | {% for swhid_info in swhids_info %} | ||||
{% if forloop.first %} | {% if forloop.first %} | ||||
<div class="tab-pane active" id="swhid-tab-{{ swhid_info.object_type }}"> | <div class="tab-pane active" id="swhid-tab-{{ swhid_info.object_type }}"> | ||||
{% else %} | {% else %} | ||||
<div class="tab-pane" id="swhid-tab-{{ swhid_info.object_type }}"> | <div class="tab-pane" id="swhid-tab-{{ swhid_info.object_type }}"> | ||||
{% endif %} | {% endif %} | ||||
<div class="card"> | <div class="card"> | ||||
<div class="card-body swhid-ui"> | <div class="card-body swhid-ui"> | ||||
{% if not iframe_mode %} | |||||
<div class="swh-badges"> | <div class="swh-badges"> | ||||
{% if snapshot_context and snapshot_context.origin_info %} | {% if snapshot_context and snapshot_context.origin_info %} | ||||
<img class="swh-badge swh-badge-origin" | <img class="swh-badge swh-badge-origin" | ||||
src="{% url 'swh-badge' 'origin' snapshot_context.origin_info.url %}" | src="{% url 'swh-badge' 'origin' snapshot_context.origin_info.url %}" | ||||
onclick="swh.webapp.showBadgeInfoModal('origin', '{{ snapshot_context.origin_info.url|urlencode:"/?:@&" }}')" | onclick="swh.webapp.showBadgeInfoModal('origin', '{{ snapshot_context.origin_info.url|urlencode:"/?:@&" }}')" | ||||
title="Click to display badge integration info"> | title="Click to display badge integration info"> | ||||
{% endif %} | {% endif %} | ||||
{% if swhid_info.object_id %} | {% if swhid_info.object_id %} | ||||
<img class="swh-badge swh-badge-{{ swhid_info.object_type }}" | <img class="swh-badge swh-badge-{{ swhid_info.object_type }}" | ||||
src="{% url 'swh-badge' swhid_info.object_type swhid_info.object_id %}" | src="{% url 'swh-badge' swhid_info.object_type swhid_info.object_id %}" | ||||
onclick="swh.webapp.showBadgeInfoModal('{{ swhid_info.object_type }}', $(this).parent().parent().find('.swhid').text())" | onclick="swh.webapp.showBadgeInfoModal('{{ swhid_info.object_type }}', $(this).parent().parent().find('.swhid').text())" | ||||
title="Click to display badge integration info"> | title="Click to display badge integration info"> | ||||
{% endif %} | {% endif %} | ||||
{% if swhid_info.object_type == "content" or swhid_info.object_type == "directory" %} | |||||
<a class="float-right" style="cursor: pointer;" | |||||
onclick="swh.webapp.showIframeInfoModal('{{ swhid_info.object_type }}', $(this).parent().parent().find('.swhid').text())"> | |||||
Iframe embedding | |||||
</a> | |||||
{% endif %} | |||||
</div> | </div> | ||||
{% endif %} | |||||
{% if swhid_info.object_id %} | {% if swhid_info.object_id %} | ||||
<pre><a class="swhid" id="{{ swhid_info.swhid }}" href="{{ swhid_info.swhid_url }}">{{ swhid_info.swhid }}</a></pre> | <pre><a class="swhid" target="_blank" rel="noopener noreferrer" 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="swhid-options"> | <form id="swhid-options"> | ||||
<div class="custom-control custom-checkbox swhid-option"> | <div class="custom-control custom-checkbox swhid-option"> | ||||
<input class="custom-control-input swhid-context-option" value="option-origin" type="checkbox" | <input class="custom-control-input swhid-context-option" value="option-origin" type="checkbox" | ||||
id="swhid-context-option-{{ swhid_info.object_type }}" | id="swhid-context-option-{{ swhid_info.object_type }}" | ||||
data-swhid-with-context="{{ swhid_info.swhid_with_context }}" | data-swhid-with-context="{{ swhid_info.swhid_with_context }}" | ||||
Show All 27 Lines |