1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-10-21 19:00:12 +00:00

only show open-via-client in pro version

This commit is contained in:
lian
2015-07-01 15:54:01 +08:00
parent 2970680783
commit 7a7b21ef39
4 changed files with 9 additions and 2 deletions

View File

@@ -221,7 +221,9 @@
<% if (app.pageOptions.folder_perm_enabled && is_repo_owner) { %>
<li><a class="op set-folder-permission" href="#">{% trans "Permission" %}</a></li>
<% } %>
<li><a class="op open-locally" href="seafile://openfile?repo_id=<%- repo_id %>&path=<%- encoded_path %>/" target="_blank">{% trans "Open Locally" %}</a></li>
<% if (is_pro) { %>
<li><a class="op open-via-client" href="seafile://openfile?repo_id=<%- repo_id %>&path=<%- encoded_path %>/">{% trans "Open via Client" %}</a></li>
<% } %>
</ul>
<% } %>
</div>
@@ -287,7 +289,9 @@
<li><a class="op mv" href="#">{% trans "Move" %}</a></li>
<li><a class="op cp" href="#">{% trans "Copy" %}</a></li>
<li><a class="op file-history" href="{{ SITE_ROOT }}repo/file_revisions/<%= repo_id %>/?p=<% print(encodeURIComponent(dirent_path)); %>" target="_blank">{% trans "History" %}</a></li>
<li><a class="op open-locally" href="seafile://openfile?repo_id=<%- repo_id %>&path=<%- encoded_path %>" target="_blank">{% trans "Open Locally" %}</a></li>
<% if (is_pro) { %>
<li><a class="op open-via-client" href="seafile://openfile?repo_id=<%- repo_id %>&path=<%- encoded_path %>">{% trans "Open via Client" %}</a></li>
<% } %>
</ul>
<% } %>
</div>

View File

@@ -244,6 +244,7 @@ app["pageOptions"] = {
enable_upload_folder: {% if enable_upload_folder %} true {% else %} false {% endif %},
max_upload_file_size: {% if max_upload_file_size %} {{ max_upload_file_size }} {% else %} '' {% endif %},
folder_perm_enabled: {% if folder_perm_enabled %} true {% else %} false {% endif %},
is_pro: {% if is_pro %} true {% else %} false {% endif %},
cur_note: {% if request.cur_note %} {'id': '{{ request.cur_note.id }}'} {% else %} null {% endif %}
};
</script>

View File

@@ -1175,6 +1175,7 @@ def libraries(request):
'enable_upload_folder': settings.ENABLE_UPLOAD_FOLDER,
'max_upload_file_size': max_upload_file_size,
'folder_perm_enabled': folder_perm_enabled,
'is_pro': True if is_pro_version() else False,
}, context_instance=RequestContext(request))
@login_required

View File

@@ -39,6 +39,7 @@ define([
repo_id: dir.repo_id,
is_repo_owner: dir.is_repo_owner,
can_generate_shared_link: app.pageOptions.can_generate_shared_link,
is_pro: app.pageOptions.is_pro,
repo_encrypted: dir.encrypted
}));
return this;