mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-17 07:41:26 +00:00
update condition check when display share icon for guest user
This commit is contained in:
@@ -144,7 +144,7 @@
|
|||||||
<button id="add-new-file" class="op-btn">{% trans "New File" %}</button>
|
<button id="add-new-file" class="op-btn">{% trans "New File" %}</button>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
||||||
<% if (!encrypted) { %>
|
<% if (!encrypted && (can_generate_share_link || can_generate_upload_link || is_repo_owner)) { %>
|
||||||
<button class="op-btn" id="share-cur-dir">{% trans "Share" %}</button>
|
<button class="op-btn" id="share-cur-dir">{% trans "Share" %}</button>
|
||||||
<% } %>
|
<% } %>
|
||||||
</div><!-- div#cur-dir-ops ends here -->
|
</div><!-- div#cur-dir-ops ends here -->
|
||||||
@@ -224,7 +224,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) { %>
|
<% if (!repo_encrypted && (can_generate_share_link || can_generate_upload_link || is_repo_owner)) { %>
|
||||||
<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') { %>
|
||||||
@@ -414,7 +414,7 @@
|
|||||||
<script type="text/template" id="grid-view-dir-op-tmpl">
|
<script type="text/template" id="grid-view-dir-op-tmpl">
|
||||||
<ul class="grid-item-op sf-dropdown-menu">
|
<ul class="grid-item-op sf-dropdown-menu">
|
||||||
<li><a class="op download" href="<%= download_url %>">{% trans "Download" %}</a></li>
|
<li><a class="op download" href="<%= download_url %>">{% trans "Download" %}</a></li>
|
||||||
<% if (!repo_encrypted) { %>
|
<% if (!repo_encrypted && (can_generate_share_link || can_generate_upload_link || is_repo_owner)) { %>
|
||||||
<li><a class="op share" href="#">{% trans "Share" %}</a></li>
|
<li><a class="op share" href="#">{% trans "Share" %}</a></li>
|
||||||
<% } %>
|
<% } %>
|
||||||
<% if (dirent.perm == 'rw') { %>
|
<% if (dirent.perm == 'rw') { %>
|
||||||
|
@@ -431,6 +431,9 @@ define([
|
|||||||
path: dir.path,
|
path: dir.path,
|
||||||
repo_id: dir.repo_id,
|
repo_id: dir.repo_id,
|
||||||
site_root: app.pageOptions.site_root,
|
site_root: app.pageOptions.site_root,
|
||||||
|
is_repo_owner: dir.is_repo_owner,
|
||||||
|
can_generate_share_link: app.pageOptions.can_generate_share_link,
|
||||||
|
can_generate_upload_link: app.pageOptions.can_generate_upload_link,
|
||||||
enable_upload_folder: app.pageOptions.enable_upload_folder
|
enable_upload_folder: app.pageOptions.enable_upload_folder
|
||||||
})));
|
})));
|
||||||
},
|
},
|
||||||
|
@@ -112,6 +112,7 @@ define([
|
|||||||
repo_id: dir.repo_id,
|
repo_id: dir.repo_id,
|
||||||
is_repo_owner: dir.is_repo_owner,
|
is_repo_owner: dir.is_repo_owner,
|
||||||
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,
|
||||||
is_pro: app.pageOptions.is_pro,
|
is_pro: app.pageOptions.is_pro,
|
||||||
repo_encrypted: dir.encrypted
|
repo_encrypted: dir.encrypted
|
||||||
});
|
});
|
||||||
|
@@ -56,6 +56,7 @@ define([
|
|||||||
is_virtual: dir.is_virtual,
|
is_virtual: dir.is_virtual,
|
||||||
has_been_shared_out: dir.has_been_shared_out,
|
has_been_shared_out: dir.has_been_shared_out,
|
||||||
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,
|
||||||
is_pro: is_pro,
|
is_pro: is_pro,
|
||||||
file_audit_enabled: file_audit_enabled,
|
file_audit_enabled: file_audit_enabled,
|
||||||
repo_encrypted: dir.encrypted
|
repo_encrypted: dir.encrypted
|
||||||
|
Reference in New Issue
Block a user