mirror of
https://github.com/haiwen/seahub.git
synced 2025-06-29 16:37:56 +00:00
update logic of show folder share icon
if current user has 'is_admin' library permssion, show folder share icon
This commit is contained in:
parent
142b1e7750
commit
c8b51b7bfc
@ -485,7 +485,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
||||||
<% if (!encrypted && (app.pageOptions.can_generate_share_link || app.pageOptions.can_generate_upload_link || is_repo_owner)) { %>
|
<% if (!encrypted && (app.pageOptions.can_generate_share_link || app.pageOptions.can_generate_upload_link || is_repo_owner || is_admin)) { %>
|
||||||
<button class="btn-white hidden-sm-down" id="share-cur-dir">{% trans "Share" %}</button>
|
<button class="btn-white hidden-sm-down" id="share-cur-dir">{% trans "Share" %}</button>
|
||||||
<span class="sf2-icon-share hidden-md-up mobile-icon" id="share-cur-dir" aria-label="{% trans "Share" %}"></span>
|
<span class="sf2-icon-share hidden-md-up mobile-icon" id="share-cur-dir" aria-label="{% trans "Share" %}"></span>
|
||||||
<% } %>
|
<% } %>
|
||||||
@ -582,7 +582,7 @@
|
|||||||
|
|
||||||
<a class="op-icon download sf2-icon-download sf2-x vh download-dir" href="#" title="{% trans "Download" %}" aria-label="{% trans "Download" %}"></a>
|
<a class="op-icon download sf2-icon-download sf2-x vh download-dir" href="#" title="{% trans "Download" %}" aria-label="{% trans "Download" %}"></a>
|
||||||
|
|
||||||
<% if (!repo_encrypted && (can_generate_share_link || can_generate_upload_link || is_repo_owner)) { %>
|
<% if (!repo_encrypted && (can_generate_share_link || can_generate_upload_link || is_repo_owner || is_admin)) { %>
|
||||||
<a href="#" class="op-icon share sf2-icon-share sf2-x vh" title="{% trans "Share" %}" aria-label="{% trans "Share" %}"></a>
|
<a href="#" class="op-icon share sf2-icon-share sf2-x vh" title="{% trans "Share" %}" aria-label="{% trans "Share" %}"></a>
|
||||||
<% } %>
|
<% } %>
|
||||||
<% if (dirent.perm == 'rw') { %>
|
<% if (dirent.perm == 'rw') { %>
|
||||||
@ -658,7 +658,7 @@
|
|||||||
<div class="hide sf-dropdown-menu">
|
<div class="hide sf-dropdown-menu">
|
||||||
<ul>
|
<ul>
|
||||||
<li><a class="op download download-dir" href="#">{% trans "Download" %}</a></li>
|
<li><a class="op download download-dir" href="#">{% trans "Download" %}</a></li>
|
||||||
<% if (!repo_encrypted && (can_generate_share_link || can_generate_upload_link || is_repo_owner)) { %>
|
<% if (!repo_encrypted && (can_generate_share_link || can_generate_upload_link || is_repo_owner || is_admin)) { %>
|
||||||
<li><a href="#" class="op share">{% trans "Share" %}</a></li>
|
<li><a href="#" class="op share">{% trans "Share" %}</a></li>
|
||||||
<% } %>
|
<% } %>
|
||||||
<% if (dirent.perm == 'rw') { %>
|
<% if (dirent.perm == 'rw') { %>
|
||||||
@ -1016,7 +1016,7 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li><a class="op download-dir" href="#">{% trans "Download" %}</a></li>
|
<li><a class="op download-dir" href="#">{% trans "Download" %}</a></li>
|
||||||
|
|
||||||
<% if (!repo_encrypted && (can_generate_share_link || can_generate_upload_link || is_repo_owner)) { %>
|
<% if (!repo_encrypted && (can_generate_share_link || can_generate_upload_link || is_repo_owner || is_admin)) { %>
|
||||||
<li><a class="op share" href="#">{% trans "Share" %}</a></li>
|
<li><a class="op share" href="#">{% trans "Share" %}</a></li>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
||||||
|
@ -558,6 +558,7 @@ define([
|
|||||||
path: dir.path,
|
path: dir.path,
|
||||||
repo_id: dir.repo_id,
|
repo_id: dir.repo_id,
|
||||||
is_repo_owner: dir.is_repo_owner,
|
is_repo_owner: dir.is_repo_owner,
|
||||||
|
is_admin: dir.is_admin,
|
||||||
site_root: app.pageOptions.site_root
|
site_root: app.pageOptions.site_root
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -120,6 +120,7 @@ define([
|
|||||||
category: dir.category,
|
category: dir.category,
|
||||||
repo_id: dir.repo_id,
|
repo_id: dir.repo_id,
|
||||||
is_repo_owner: dir.is_repo_owner,
|
is_repo_owner: dir.is_repo_owner,
|
||||||
|
is_admin: dir.is_admin,
|
||||||
can_set_folder_perm: can_set_folder_perm,
|
can_set_folder_perm: can_set_folder_perm,
|
||||||
can_generate_share_link: app.pageOptions.can_generate_share_link,
|
can_generate_share_link: app.pageOptions.can_generate_share_link,
|
||||||
can_generate_upload_link: app.pageOptions.can_generate_upload_link,
|
can_generate_upload_link: app.pageOptions.can_generate_upload_link,
|
||||||
|
@ -66,6 +66,7 @@ define([
|
|||||||
category: dir.category,
|
category: dir.category,
|
||||||
repo_id: dir.repo_id,
|
repo_id: dir.repo_id,
|
||||||
is_repo_owner: dir.is_repo_owner,
|
is_repo_owner: dir.is_repo_owner,
|
||||||
|
is_admin: dir.is_admin,
|
||||||
repo_encrypted: dir.encrypted,
|
repo_encrypted: dir.encrypted,
|
||||||
|
|
||||||
can_set_folder_perm: can_set_folder_perm,
|
can_set_folder_perm: can_set_folder_perm,
|
||||||
|
Loading…
Reference in New Issue
Block a user