Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F11023710
D6190.id22489.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Subscribers
None
D6190.id22489.diff
View Options
diff --git a/swh/web/templates/includes/show-metadata.html b/swh/web/templates/includes/show-metadata.html
--- a/swh/web/templates/includes/show-metadata.html
+++ b/swh/web/templates/includes/show-metadata.html
@@ -12,7 +12,11 @@
<button id="swh-metadata-toggler" class="btn btn-default btn-sm swh-popover-toggler"
data-toggle="popover" data-popover-content="#swh-metadata-popover">
<i class="mdi mdi-table mdi-fw" aria-hidden="true"></i>
- Show metadata
+ {% if user.is_staff %}
+ Legacy extrinsic metadata
+ {% else %}
+ Show metadata
+ {% endif %}
</button>
<div id="swh-metadata-popover" style="display:none;">
@@ -24,6 +28,25 @@
{% endif %}
+{% if user.is_staff %}
+ {% if swhids_info %}
+ <div class="btn-group">
+ <button class="btn btn-default btn-sm dropdown-toggle" type="button" data-toggle="dropdown">
+ <i class="mdi mdi-table mdi-fw" aria-hidden="true"></i>
+ Extrinsic metadata
+ </button>
+ <div class="dropdown-menu swh-extrinsic-metadata-menu">
+ {% for swhid_info in swhids_info %}
+ <a href="{% url 'api-1-raw-extrinsic-metadata-swhid-authorities' swhid_info.swhid %}" class="dropdown-item" role="button">
+ <i class="{{ swh_object_icons|key_value:swhid_info.object_type }} mdi-fw" aria-hidden="true"></i>
+ {{swhid_info.object_type}}
+ </a>
+ {% endfor %}
+ </div>
+ </div>
+ {% endif %}
+{% endif %}
+
<script>
swh.webapp.setBrowsedSwhObjectMetadata({{ swh_object_metadata|jsonify }})
</script>
diff --git a/swh/web/templates/includes/vault-create-tasks.html b/swh/web/templates/includes/vault-create-tasks.html
--- a/swh/web/templates/includes/vault-create-tasks.html
+++ b/swh/web/templates/includes/vault-create-tasks.html
@@ -9,23 +9,25 @@
{% if vault_cooking %}
{% if user.is_staff %}
- <button class="btn btn-default btn-sm dropdown-toggle swh-vault-download" type="button" data-toggle="dropdown">
- <i class="mdi mdi-download mdi-fw" aria-hidden="true"></i>
- Download
- </button>
- <div class="dropdown-menu swh-vault-menu">
- {% if vault_cooking.directory_context %}
- <button class="dropdown-item" type="button" tabindex="-1" onclick="swh.vault.vaultRequest('directory', '{{ vault_cooking.directory_swhid }}')">
- <i class="{{ swh_object_icons.directory }} mdi-fw" aria-hidden="true"></i>
- as tarball
- </button>
- {% endif %}
- {% if vault_cooking.revision_context %}
- <button class="dropdown-item" type="button" tabindex="-1" onclick="swh.vault.vaultRequest('revision', '{{ vault_cooking.revision_swhid }}')">
- <i class="{{ swh_object_icons.revision }} mdi-fw" aria-hidden="true"></i>
- as git
- </button>
- {% endif %}
+ <div class="btn-group">
+ <button class="btn btn-default btn-sm dropdown-toggle swh-vault-download" type="button" data-toggle="dropdown">
+ <i class="mdi mdi-download mdi-fw" aria-hidden="true"></i>
+ Download
+ </button>
+ <div class="dropdown-menu swh-vault-menu">
+ {% if vault_cooking.directory_context %}
+ <button class="dropdown-item" type="button" tabindex="-1" onclick="swh.vault.vaultRequest('directory', '{{ vault_cooking.directory_swhid }}')">
+ <i class="{{ swh_object_icons.directory }} mdi-fw" aria-hidden="true"></i>
+ as tarball
+ </button>
+ {% endif %}
+ {% if vault_cooking.revision_context %}
+ <button class="dropdown-item" type="button" tabindex="-1" onclick="swh.vault.vaultRequest('revision', '{{ vault_cooking.revision_swhid }}')">
+ <i class="{{ swh_object_icons.revision }} mdi-fw" aria-hidden="true"></i>
+ as git
+ </button>
+ {% endif %}
+ </div>
</div>
{% else %}
<button class="btn btn-default btn-sm swh-vault-download" type="button" onclick="swh.vault.vaultRequest('directory', '{{ vault_cooking.directory_swhid }}')">
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Sep 17, 5:00 PM (13 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3227186
Attached To
D6190: Add link to extrinsic metadata API from the browse view
Event Timeline
Log In to Comment