aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBonfaceKilz2021-10-18 10:14:39 +0300
committerBonfaceKilz2021-10-25 14:00:14 +0300
commit56e86ccd4fb4c88b0396fce9f926bafa4517766b (patch)
treeed46b8eb185c1f45b72e108926c00b849a202402
parent13c5727b90d2b5e20e69a334c1cb78fd258cf3e8 (diff)
downloadgenenetwork2-56e86ccd4fb4c88b0396fce9f926bafa4517766b.tar.gz
manage_resource.html: If owner owns a resource display their name
-rw-r--r--wqflask/wqflask/templates/admin/manage_resource.html23
1 files changed, 22 insertions, 1 deletions
diff --git a/wqflask/wqflask/templates/admin/manage_resource.html b/wqflask/wqflask/templates/admin/manage_resource.html
index f69e6799..0f4abec9 100644
--- a/wqflask/wqflask/templates/admin/manage_resource.html
+++ b/wqflask/wqflask/templates/admin/manage_resource.html
@@ -7,9 +7,30 @@
{% block content %}
<!-- Start of body -->
<div class="container">
+ {% set DATA_ACCESS = access_role.get('data') %}
+ {% set METADATA_ACCESS = access_role.get('metadata') %}
+ {% set ADMIN_STATUS = access_role.get('admin') %}
+
<div class="page-header" style="display: inline-block;">
<h1>Resource Manager</h1>
- <h3>{% if owner_name is not none %}Current Owner: {{ owner_name }}{% endif %} {% if admin_status == "owner" %}<button id="change_owner" class="btn btn-danger" data-url="/resources/change_owner" style="margin-left: 20px;">Change Owner</button>{% endif %}</h3>
+ <h3>
+ {% if resource_info.get('owner_id') != 'none'%}
+ {% set user_details = resource_info.get('owner_details') %}
+ Current Owner: {{ user_details.get('full_name') }}
+ {% if user_details.get('organization') %}
+ <br/> Organization {{ user_details.get('organization')}}
+ {% endif %}
+ {% endif %}
+
+ {% if DATA_ACCESS > DataRole.VIEW and ADMIN_STATUS > AdminRole.NOT_ADMIN %}
+ <button id="change_owner"
+ class="btn btn-danger"
+ data-url="/resources/change_owner"
+ style="margin-left: 20px;">
+ Change Owner
+ </button>
+ {% endif %}
+ </h3>
</div>
<form id="manage_resource" action="/resources/manage" method="POST">
<input type="hidden" name="resource_id" value="{{ resource_id }}">