mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-01 23:20:51 +00:00
Merge branch '6.0'
Conflicts: media/js/base.js seahub/api2/views.py seahub/views/ajax.py tests/api/test_repo_user_folder_perm.py
This commit is contained in:
12
static/scripts/sysadmin-app/models/group-member.js
Normal file
12
static/scripts/sysadmin-app/models/group-member.js
Normal file
@@ -0,0 +1,12 @@
|
||||
define([
|
||||
'underscore',
|
||||
'backbone',
|
||||
'common'
|
||||
], function(_, Backbone, Common) {
|
||||
|
||||
'use strict';
|
||||
|
||||
var GroupMember = Backbone.Model.extend({});
|
||||
|
||||
return GroupMember;
|
||||
});
|
25
static/scripts/sysadmin-app/models/group-repo.js
Normal file
25
static/scripts/sysadmin-app/models/group-repo.js
Normal file
@@ -0,0 +1,25 @@
|
||||
define([
|
||||
'underscore',
|
||||
'backbone',
|
||||
'common'
|
||||
], function(_, Backbone, Common) {
|
||||
|
||||
'use strict';
|
||||
|
||||
var GroupRepo = Backbone.Model.extend({
|
||||
|
||||
getIconUrl: function(size) {
|
||||
var is_encrypted = this.get('encrypted');
|
||||
var is_readonly = this.get('permission') == "r" ? true : false;
|
||||
return Common.getLibIconUrl(is_encrypted, is_readonly, size);
|
||||
},
|
||||
|
||||
getIconTitle: function() {
|
||||
var is_encrypted = this.get('encrypted');
|
||||
var is_readonly = this.get('permission') == "r" ? true : false;
|
||||
return Common.getLibIconTitle(is_encrypted, is_readonly);
|
||||
}
|
||||
});
|
||||
|
||||
return GroupRepo;
|
||||
});
|
@@ -12,14 +12,8 @@ define([
|
||||
},
|
||||
|
||||
getIconTitle: function() {
|
||||
var icon_title = '';
|
||||
if (this.get('encrypted')) {
|
||||
icon_title = gettext("Encrypted library");
|
||||
} else {
|
||||
icon_title = gettext("Read-Write library");
|
||||
}
|
||||
|
||||
return icon_title;
|
||||
var is_encrypted = this.get('encrypted');
|
||||
return Common.getLibIconTitle(is_encrypted, false);
|
||||
}
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user