mirror of
https://github.com/haiwen/seahub.git
synced 2025-06-15 09:58:14 +00:00
28 lines
666 B
JavaScript
28 lines
666 B
JavaScript
define([
|
|
'underscore',
|
|
'backbone',
|
|
'common',
|
|
], function(_, Backbone, Common) {
|
|
'use strict';
|
|
|
|
var RepoModel = Backbone.Model.extend({
|
|
getIconUrl: function(size) {
|
|
var is_encrypted = this.get('encrypted');
|
|
return Common.getLibIconUrl(is_encrypted, false, size);
|
|
},
|
|
|
|
getIconTitle: function() {
|
|
var icon_title = '';
|
|
if (this.get('encrypted')) {
|
|
icon_title = gettext("Encrypted library");
|
|
} else {
|
|
icon_title = gettext("Read-Write library");
|
|
}
|
|
|
|
return icon_title;
|
|
}
|
|
});
|
|
|
|
return RepoModel;
|
|
});
|