mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-12 12:22:13 +00:00
[backbone] Improve org and group page
This commit is contained in:
parent
4d471c0c24
commit
39b274fc7c
@ -9,10 +9,10 @@ define([
|
|||||||
'app/views/add-group-repo',
|
'app/views/add-group-repo',
|
||||||
'app/views/group-recent-change',
|
'app/views/group-recent-change',
|
||||||
'app/views/dir',
|
'app/views/dir',
|
||||||
// 'app/views/dirents'
|
'app/views/group-nav',
|
||||||
], function($, _, Backbone, Common, GroupRepos, DirentCollection,
|
], function($, _, Backbone, Common, GroupRepos, DirentCollection,
|
||||||
GroupRepoView, AddGroupRepoView/*, DirentView*/, GroupRecentChangeView,
|
GroupRepoView, AddGroupRepoView/*, DirentView*/, GroupRecentChangeView,
|
||||||
DirView) {
|
DirView, GroupNavView) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var GroupView = Backbone.View.extend({
|
var GroupView = Backbone.View.extend({
|
||||||
@ -41,6 +41,9 @@ define([
|
|||||||
this.listenTo(this.repos, 'reset', this.reset);
|
this.listenTo(this.repos, 'reset', this.reset);
|
||||||
|
|
||||||
this.dirView = new DirView();
|
this.dirView = new DirView();
|
||||||
|
|
||||||
|
this.groupView = new GroupNavView();
|
||||||
|
Common.initAccountPopup();
|
||||||
},
|
},
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -6,8 +6,9 @@ define([
|
|||||||
'app/collections/repos',
|
'app/collections/repos',
|
||||||
'app/views/organization-repo',
|
'app/views/organization-repo',
|
||||||
'app/views/dir',
|
'app/views/dir',
|
||||||
|
'app/views/group-nav',
|
||||||
], function($, _, Backbone, Common, RepoCollection, OrganizationRepoView,
|
], function($, _, Backbone, Common, RepoCollection, OrganizationRepoView,
|
||||||
DirView) {
|
DirView, GroupNavView) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var OrganizationView = Backbone.View.extend({
|
var OrganizationView = Backbone.View.extend({
|
||||||
@ -25,6 +26,9 @@ define([
|
|||||||
this.listenTo(this.repos, 'reset', this.reset);
|
this.listenTo(this.repos, 'reset', this.reset);
|
||||||
|
|
||||||
this.dirView = new DirView();
|
this.dirView = new DirView();
|
||||||
|
|
||||||
|
this.groupView = new GroupNavView();
|
||||||
|
Common.initAccountPopup();
|
||||||
},
|
},
|
||||||
|
|
||||||
events: {
|
events: {
|
||||||
|
@ -2986,6 +2986,7 @@ class GroupRepos(APIView):
|
|||||||
"name": repo.name,
|
"name": repo.name,
|
||||||
"desc": repo.desc,
|
"desc": repo.desc,
|
||||||
"mtime": repo.latest_modify,
|
"mtime": repo.latest_modify,
|
||||||
|
"mtime_relative": translate_seahub_time(repo.latest_modify),
|
||||||
"encrypted": repo.encrypted,
|
"encrypted": repo.encrypted,
|
||||||
"permission": 'rw', # Always have read-write permission to owned repo
|
"permission": 'rw', # Always have read-write permission to owned repo
|
||||||
"owner": username,
|
"owner": username,
|
||||||
@ -3009,6 +3010,7 @@ class GroupRepos(APIView):
|
|||||||
"name": r.name,
|
"name": r.name,
|
||||||
"desc": r.desc,
|
"desc": r.desc,
|
||||||
"mtime": r.latest_modify,
|
"mtime": r.latest_modify,
|
||||||
|
"mtime_relative": translate_seahub_time(r.latest_modify),
|
||||||
"encrypted": r.encrypted,
|
"encrypted": r.encrypted,
|
||||||
"permission": check_permission(r.id, username),
|
"permission": check_permission(r.id, username),
|
||||||
"owner": r.owner,
|
"owner": r.owner,
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td><a href="#/lib/<%= id %>"><%- name %></a></td>
|
<td><a href="#/lib/<%= id %>"><%- name %></a></td>
|
||||||
<td><%- desc %></td>
|
<td><%- desc %></td>
|
||||||
<td><%- mtime %></td>
|
<td><%- mtime_relative %></td>
|
||||||
<td><%- owner_nickname %></td>
|
<td><%- owner_nickname %></td>
|
||||||
<td>
|
<td>
|
||||||
<% if (app.pageOptions.isGroupStaff) { %>
|
<% if (app.pageOptions.isGroupStaff) { %>
|
||||||
|
Loading…
Reference in New Issue
Block a user