1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-16 15:19:06 +00:00

[address book] group: show repo owner and etc.

This commit is contained in:
llj
2018-06-12 18:34:49 +08:00
parent ce23a58edf
commit 040348e6f4
5 changed files with 28 additions and 24 deletions

View File

@@ -25,7 +25,6 @@ define([
toolbar2Template: _.template($('#group-toolbar2-tmpl').html()),
pathTemplate: _.template($('#group-path-tmpl').html()),
theadTemplate: _.template($('#shared-repos-hd-tmpl').html()),
ownedReposTheadTemplate: _.template($('#group-owned-repos-hd-tmpl').html()),
theadMobileTemplate: _.template($('#shared-repos-hd-mobile-tmpl').html()),
events: {
@@ -69,7 +68,7 @@ define([
model: repo,
group_id: this.group_id,
parent_group_id: this.group.parent_group_id,
show_repo_owner: this.group.is_address_book_group ? false : true,
show_repo_owner: true,
repoDetailsView: this.repoDetailsView,
is_staff: this.repos.is_staff
});
@@ -86,11 +85,7 @@ define([
if ($(window).width() < 768) {
tmpl = this.theadMobileTemplate;
} else {
if (this.group.parent_group_id == 0) {
tmpl = this.theadTemplate;
} else {
tmpl = this.ownedReposTheadTemplate;
}
tmpl = this.theadTemplate;
}
this.$tableHead.html(tmpl());
},
@@ -175,6 +170,11 @@ define([
'id': data.id,
'wiki_enabled': data.wiki_enabled
});
// for common member in a group, there is only 'leave group' option in the 'settings' popup
// in an address book group, a common member can't 'leave group'
if (data.parent_group_id != 0 && !user_is_admin) {
$('#group-settings-icon').hide();
}
_this.showRepoList();
if (options) {
if (options.showDiscussions) {