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