1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-12 13:24:52 +00:00

[system repo admin] modification

This commit is contained in:
llj
2016-06-13 11:51:41 +08:00
committed by lian
parent 8c2e16ca36
commit 2758713cea
4 changed files with 10 additions and 15 deletions

View File

@@ -32,11 +32,9 @@ class AdminTrashLibraries(APIView):
search_owner = request.GET.get('owner', '') search_owner = request.GET.get('owner', '')
if search_owner and is_valid_username(search_owner): if search_owner and is_valid_username(search_owner):
repos = seafile_api.get_trash_repos_by_owner(search_owner) repos = seafile_api.get_trash_repos_by_owner(search_owner)
print 'by owner'
else: else:
repos = seafile_api.get_trash_repo_list(-1, -1) repos = seafile_api.get_trash_repo_list(-1, -1)
search_owner = '' search_owner = ''
print 'all'
return_repos = [] return_repos = []
for repo in repos: for repo in repos:

View File

@@ -288,10 +288,10 @@
<tr> <tr>
<th width="4%"><!--icon--></th> <th width="4%"><!--icon--></th>
<th width="34%">{% trans "Name" %}</th> <th width="34%">{% trans "Name" %}</th>
<th width="10%"><!--Operations--></th>
<th width="13%">{% trans "Files / Size" %}</th> <th width="13%">{% trans "Files / Size" %}</th>
<th width="19%">ID</th> <th width="19%">ID</th>
<th width="20%">{% trans "Owner" %}</th> <th width="20%">{% trans "Owner" %}</th>
<th width="10%"><!--Operations--></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@@ -320,10 +320,10 @@
<tr> <tr>
<th width="4%"><!--icon--></th> <th width="4%"><!--icon--></th>
<th width="34%">{% trans "Name" %}</th> <th width="34%">{% trans "Name" %}</th>
<th width="10%"><!--Operations--></th>
<th width="13%">{% trans "Files / Size" %}</th> <th width="13%">{% trans "Files / Size" %}</th>
<th width="19%">ID</th> <th width="19%">ID</th>
<th width="20%">{% trans "Owner" %}</th> <th width="20%">{% trans "Owner" %}</th>
<th width="10%"><!--Operations--></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@@ -348,10 +348,6 @@
<% } else { %> <% } else { %>
<td>--</td> <td>--</td>
<% } %> <% } %>
<td>
<a href="#" class="sf2-icon-delete sf2-x repo-delete-btn op-icon vh" title="{% trans "Delete" %}" aria-label="{% trans "Delete" %}"></a>
<a href="#" class="sf2-icon-move sf2-x repo-transfer-btn op-icon vh" title="{% trans "Transfer" %}" aria-label="{% trans "Transfer" %}"></a>
</td>
<td><%= file_count %> / <%= size_formatted %></td> <td><%= file_count %> / <%= size_formatted %></td>
<td style="font-size:11px;"><%= id %></td> <td style="font-size:11px;"><%= id %></td>
<td> <td>
@@ -361,6 +357,10 @@
-- --
<% } %> <% } %>
</td> </td>
<td>
<a href="#" class="sf2-icon-delete sf2-x repo-delete-btn op-icon vh" title="{% trans "Delete" %}" aria-label="{% trans "Delete" %}"></a>
<a href="#" class="sf2-icon-move sf2-x repo-transfer-btn op-icon vh" title="{% trans "Transfer" %}" aria-label="{% trans "Transfer" %}"></a>
</td>
</script> </script>
<script type="text/template" id="system-library-tmpl"> <script type="text/template" id="system-library-tmpl">
@@ -392,9 +392,9 @@
<tr> <tr>
<th width="5%"><!--icon--></th> <th width="5%"><!--icon--></th>
<th width="40%">{% trans "Name" %}</th> <th width="40%">{% trans "Name" %}</th>
<th width="10%"><!--Operations--></th>
<th width="25%">{% trans "Owner" %}</th> <th width="25%">{% trans "Owner" %}</th>
<th width="20%">{% trans "Deleted Time" %}</th> <th width="20%">{% trans "Deleted Time" %}</th>
<th width="10%"><!--Operations--></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@@ -410,12 +410,12 @@
<img src="<%= icon_url %>" title="<%= icon_title %>" alt="<%= icon_title %>" width="24" /> <img src="<%= icon_url %>" title="<%= icon_title %>" alt="<%= icon_title %>" width="24" />
</td> </td>
<td><%- name %></td> <td><%- name %></td>
<td><a href="{{ SITE_ROOT }}useradmin/info/<% print(encodeURIComponent(owner)); %>/"><%- owner %></a></td>
<td><time title="<%= time %>"><%= time_from_now %></time></td>
<td> <td>
<a href="#" class="sf2-icon-delete sf2-x repo-delete-btn op-icon vh" title="{% trans "Delete" %}" aria-label="{% trans "Delete" %}"></a> <a href="#" class="sf2-icon-delete sf2-x repo-delete-btn op-icon vh" title="{% trans "Delete" %}" aria-label="{% trans "Delete" %}"></a>
<a href="#" class="sf2-icon-reply sf2-x repo-restore-btn op-icon vh" title="{% trans "Restore" %}" aria-label="{% trans "Restore" %}"></a> <a href="#" class="sf2-icon-reply sf2-x repo-restore-btn op-icon vh" title="{% trans "Restore" %}" aria-label="{% trans "Restore" %}"></a>
</td> </td>
<td><a href="{{ SITE_ROOT }}useradmin/info/<% print(encodeURIComponent(owner)); %>/"><%- owner %></a></td>
<td><time title="<%= time %>"><%= time_from_now %></time></td>
</script> </script>
<script type="text/template" id="dir-view-tmpl"> <script type="text/template" id="dir-view-tmpl">

View File

@@ -128,7 +128,7 @@ define([
var owner = url_match ? url_match[2] : ''; var owner = url_match ? url_match[2] : '';
this.switchCurrentView(this.searchReposView); this.switchCurrentView(this.searchReposView);
this.sideNavView.setCurTab('libraries', {'option': 'all'}); this.sideNavView.setCurTab('libraries', {'option': 'search'});
this.searchReposView.show({ this.searchReposView.show({
'name': decodeURIComponent(repo_name), 'name': decodeURIComponent(repo_name),
'owner': decodeURIComponent(owner) 'owner': decodeURIComponent(owner)

View File

@@ -12,7 +12,6 @@ define([
id: 'search-libraries', id: 'search-libraries',
tabNavTemplate: _.template($("#libraries-tabnav-tmpl").html()),
template: _.template($("#search-libraries-tmpl").html()), template: _.template($("#search-libraries-tmpl").html()),
initialize: function() { initialize: function() {
@@ -23,8 +22,6 @@ define([
}, },
render: function() { render: function() {
var $tabnav = $(this.tabNavTemplate({'cur_tab': 'all'}));
this.$el.append($tabnav);
this.$el.append(this.template()); this.$el.append(this.template());
this.$form = this.$('#search-repo-form'); this.$form = this.$('#search-repo-form');