diff --git a/omeroweb/webclient/controller/container.py b/omeroweb/webclient/controller/container.py index 16165b8e28..f7b4c652be 100644 --- a/omeroweb/webclient/controller/container.py +++ b/omeroweb/webclient/controller/container.py @@ -194,6 +194,20 @@ def obj_id(self): obj = self._get_object() return obj is not None and obj.id or None + def external_info(self): + obj = self._get_object() + if obj is None: + return None + extinfo = obj.getDetails().getExternalInfo() + if extinfo is None: + return None + return { + "id": extinfo.id, + "lsid": extinfo.lsid, + "entityType": extinfo.entityType, + "entityId": extinfo.entityId, + } + def getWellSampleImage(self): """Returns Image if Well is not None diff --git a/omeroweb/webclient/static/webclient/css/dusty.css b/omeroweb/webclient/static/webclient/css/dusty.css index b92e9402a7..f493e63c55 100755 --- a/omeroweb/webclient/static/webclient/css/dusty.css +++ b/omeroweb/webclient/static/webclient/css/dusty.css @@ -140,7 +140,7 @@ button::-moz-focus-inner { .btn_hierarchy {background: url('../../webgateway/img/iconmonstr-sitemap-6-icon-16.png') center center no-repeat;} .btn_link {background: url('../../webgateway/img/icon_link.png')center center no-repeat;} - .btn_fspath, .btn_link, .btn_add, .btn_hierarchy { + .btn_fspath, .btn_link, .btn_add, .btn_hierarchy, .btn_extinfo { float:right; position: relative; margin-left: 5px; diff --git a/omeroweb/webclient/templates/webclient/annotations/includes/toolbar.html b/omeroweb/webclient/templates/webclient/annotations/includes/toolbar.html index 7d2df991b2..192453a132 100644 --- a/omeroweb/webclient/templates/webclient/annotations/includes/toolbar.html +++ b/omeroweb/webclient/templates/webclient/annotations/includes/toolbar.html @@ -150,6 +150,11 @@ }); {% endif %} + + $("#show_ext_info").on("click", function() { + var $panel = $("#externalInfo"); + $panel.toggle(); + }); }); @@ -348,7 +353,7 @@ {% endwith %} {% endif %} - {% endif %} + {% endif %} @@ -375,7 +380,21 @@ {% include "webclient/annotations/includes/figure_scripts_menu.html" %} {% endif %} {% endif %} - + + + {% with extinfo=manager.external_info %} + {% block extinfo_button %} + {% if extinfo %} + + {% endif %} + {% endblock extinfo_button %} + {% endwith %}
@@ -424,3 +443,31 @@
+ + + diff --git a/omeroweb/webclient/templates/webclient/annotations/metadata_general.html b/omeroweb/webclient/templates/webclient/annotations/metadata_general.html index 9429f07447..fcb7f4ecd4 100644 --- a/omeroweb/webclient/templates/webclient/annotations/metadata_general.html +++ b/omeroweb/webclient/templates/webclient/annotations/metadata_general.html @@ -141,9 +141,10 @@ return; } $("#toolbar_info_panel").show(); - $panel_title.html("Loading..."); + $panel_title.html(" "); $panel_div.empty(); if (original_file_paths_url) { + $panel_title.html("Loading..."); $.getJSON(original_file_paths_url, function(data) { var repo = data.repo, @@ -498,7 +499,7 @@ {% if manager.image %} - {% with image=manager.image canDownload=manager.image.canDownload %} + {% with obj=manager.image image=manager.image canDownload=manager.image.canDownload %} {% include "webclient/annotations/includes/toolbar.html" %} {% endwith %} @@ -536,7 +537,9 @@

{% else %} {% if manager.dataset %} - {% include "webclient/annotations/includes/toolbar.html" %} + {% with obj=manager.dataset %} + {% include "webclient/annotations/includes/toolbar.html" %} + {% endwith %} {% with obj=manager.dataset nameText=manager.dataset.name %} @@ -563,7 +566,9 @@

{% else %} {% if manager.project %} - {% include "webclient/annotations/includes/toolbar.html" %} + {% with obj=manager.project %} + {% include "webclient/annotations/includes/toolbar.html" %} + {% endwith %} {% with obj=manager.project nameText=manager.project.name %} @@ -592,7 +597,7 @@

{% endif %} {% if manager.well %} - {% with image=manager.getWellSampleImage %} + {% with obj=manager.well image=manager.getWellSampleImage %} {% include "webclient/annotations/includes/toolbar.html" %} {% endwith %} @@ -604,7 +609,9 @@

{% else %} {% if manager.acquisition %} - {% include "webclient/annotations/includes/toolbar.html" %} + {% with obj=manager.acquisition %} + {% include "webclient/annotations/includes/toolbar.html" %} + {% endwith %} {% with obj=manager.acquisition nameText=manager.acquisition.name %} @@ -640,7 +647,9 @@

{% else %} {% if manager.plate %} - {% include "webclient/annotations/includes/toolbar.html" %} + {% with obj=manager.plate %} + {% include "webclient/annotations/includes/toolbar.html" %} + {% endwith %} {% with obj=manager.plate nameText=manager.plate.name %} @@ -674,7 +683,9 @@

{% else %} {% if manager.screen %} - {% include "webclient/annotations/includes/toolbar.html" %} + {% with obj=manager.screen %} + {% include "webclient/annotations/includes/toolbar.html" %} + {% endwith %} {% with obj=manager.screen nameText=manager.screen.name %} @@ -733,7 +744,9 @@

- {% include "webclient/annotations/includes/toolbar.html" %} + {% with obj=manager.tag %} + {% include "webclient/annotations/includes/toolbar.html" %} + {% endwith %}