diff --git a/media/scripts/app/views/group.js b/media/scripts/app/views/group.js index 6672497e9f..75490073f9 100644 --- a/media/scripts/app/views/group.js +++ b/media/scripts/app/views/group.js @@ -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(); }, /* diff --git a/media/scripts/app/views/organization.js b/media/scripts/app/views/organization.js index d2d9fb6ba7..e4771a8050 100644 --- a/media/scripts/app/views/organization.js +++ b/media/scripts/app/views/organization.js @@ -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: { diff --git a/seahub/api2/views.py b/seahub/api2/views.py index 7918ce4d25..b88e7d4108 100644 --- a/seahub/api2/views.py +++ b/seahub/api2/views.py @@ -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, diff --git a/seahub/templates/js/group-repos.html b/seahub/templates/js/group-repos.html index a27729aa95..37d2fd771d 100644 --- a/seahub/templates/js/group-repos.html +++ b/seahub/templates/js/group-repos.html @@ -12,7 +12,7 @@ <%- name %> <%- desc %> -<%- mtime %> +<%- mtime_relative %> <%- owner_nickname %> <% if (app.pageOptions.isGroupStaff) { %>