mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-24 12:58:34 +00:00
update repo setting/trash/history
1. hide setting-icon if is not repo owner 2. hide trash-icon if user-perm is 'r'
This commit is contained in:
@@ -1175,6 +1175,9 @@ textarea:-moz-placeholder {/* for FF */
|
||||
margin-bottom:.5em;
|
||||
border-radius:2px;
|
||||
}
|
||||
#dir-view .repo-op {
|
||||
height:30px;
|
||||
}
|
||||
#right-panel .hd,
|
||||
.tabnav,
|
||||
.wiki-top {
|
||||
@@ -3429,7 +3432,7 @@ textarea:-moz-placeholder {/* for FF */
|
||||
.repo-trash-icon,
|
||||
.repo-history-icon {
|
||||
display:inline-block;
|
||||
margin-right:25px;
|
||||
margin-right:10px;
|
||||
outline:none; /* removing the dotted outline for FireFox */
|
||||
width:30px;
|
||||
height:30px;
|
||||
|
@@ -71,8 +71,8 @@ define([
|
||||
|
||||
showDir: function(category, repo_id, path) {
|
||||
this.$el.show();
|
||||
var loading_tip = this.$('.loading-tip').show();
|
||||
var dir = this.dir;
|
||||
var loading_tip = this.$('.loading-tip').show(),
|
||||
dir = this.dir;
|
||||
dir.setPath(category, repo_id, path);
|
||||
dir.fetch({
|
||||
reset: true,
|
||||
@@ -135,6 +135,8 @@ define([
|
||||
encrypted: dir.encrypted,
|
||||
path: dir.path,
|
||||
repo_id: dir.repo_id,
|
||||
site_root: app.pageOptions.site_root,
|
||||
is_repo_owner: dir.is_repo_owner,
|
||||
enable_upload_folder: app.pageOptions.enable_upload_folder
|
||||
})));
|
||||
},
|
||||
|
@@ -175,6 +175,7 @@
|
||||
{% include "js/lib-op-popups.html" %}
|
||||
<script>
|
||||
app["pageOptions"] = {
|
||||
site_root: "{{ SITE_ROOT }}",
|
||||
groupId: {{ group.id }},
|
||||
groupReposUrl: "{% url "api2-grouprepos" group.id %}",
|
||||
groupChangesUrl: "{% url "api2-group-changes" group.id %}",
|
||||
|
@@ -27,6 +27,10 @@
|
||||
<% if (path != '/' && !encrypted) { %>
|
||||
<button class="op-btn" id="share-cur-dir">{% trans "Share" %}</button>
|
||||
<% } %>
|
||||
<a class="repo-history-icon fright" href="repo/history/<%- repo_id %>/" target="_blank" title="{% trans 'Settings' %}"></a>
|
||||
<a class="repo-trash-icon fright" href="repo/recycle/<%- repo_id %>/" target="_blank" title="{% trans 'Settings' %}"></a>
|
||||
<a class="repo-setting-icon fright" href="repo/<%- repo_id %>/settings/" target="_blank" title="{% trans 'Settings' %}"></a>
|
||||
<a class="repo-history-icon fright" href="<%= site_root %>repo/history/<%- repo_id %>/" target="_blank" title="{% trans 'History' %}"></a>
|
||||
<% if (user_perm == 'rw') { %>
|
||||
<a class="repo-trash-icon fright" href="<%= site_root %>repo/recycle/<%- repo_id %>/" target="_blank" title="{% trans 'Trash' %}"></a>
|
||||
<% } %>
|
||||
<% if (is_repo_owner == true) { %>
|
||||
<a class="repo-setting-icon fright" href="<%= site_root %>repo/<%- repo_id %>/settings/" target="_blank" title="{% trans 'Settings' %}"></a>
|
||||
<% } %>
|
||||
|
@@ -224,6 +224,7 @@
|
||||
{% include "js/lib-op-popups.html" %}
|
||||
<script type="text/javascript">
|
||||
app["pageOptions"] = {
|
||||
site_root: "{{ SITE_ROOT }}",
|
||||
base_url: "{{ SITE_ROOT }}" + "home/my/",
|
||||
csrfToken: "{{ csrf_token }}",
|
||||
reposUrl: "{% url 'api2-repos' %}",
|
||||
|
@@ -92,6 +92,7 @@
|
||||
{% include "js/lib-op-popups.html" %}
|
||||
<script>
|
||||
app["pageOptions"] = {
|
||||
site_root: "{{ SITE_ROOT }}",
|
||||
base_url: "{{ SITE_ROOT }}" + "home/my/",
|
||||
reposUrl: "{% url 'api2-repos' %}",
|
||||
current_user: "{{ request.user.username }}",
|
||||
|
Reference in New Issue
Block a user