mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-03 07:55:36 +00:00
[address book] modified group quota shown and etc.
This commit is contained in:
@@ -694,7 +694,7 @@
|
|||||||
<script type="text/template" id="group-item-tmpl">
|
<script type="text/template" id="group-item-tmpl">
|
||||||
<td><a href="{{ SITE_ROOT }}sysadmin/#groups/<%= id %>/libs/"><%- name %></a></td>
|
<td><a href="{{ SITE_ROOT }}sysadmin/#groups/<%= id %>/libs/"><%- name %></a></td>
|
||||||
<td>
|
<td>
|
||||||
<% if (owner && owner.indexOf('system admin') == -1) { %>
|
<% if (owner != 'system admin') { %>
|
||||||
<a href="{{ SITE_ROOT }}useradmin/info/<% print(encodeURIComponent(owner)); %>/"><%- owner %></a>
|
<a href="{{ SITE_ROOT }}useradmin/info/<% print(encodeURIComponent(owner)); %>/"><%- owner %></a>
|
||||||
<% } else { %>
|
<% } else { %>
|
||||||
--
|
--
|
||||||
@@ -702,7 +702,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td><time title="<%= time %>"><%= time_from_now %></time></td>
|
<td><time title="<%= time %>"><%= time_from_now %></time></td>
|
||||||
<td>
|
<td>
|
||||||
<% if (owner && owner.indexOf('system admin') == -1) { %>
|
<% if (owner != 'system admin') { %>
|
||||||
<a href="#" class="sf2-icon-delete sf2-x group-delete-btn op-icon vh" title="{% trans "Delete" %}" aria-label="{% trans "Delete" %}"></a>
|
<a href="#" class="sf2-icon-delete sf2-x group-delete-btn op-icon vh" title="{% trans "Delete" %}" aria-label="{% trans "Delete" %}"></a>
|
||||||
<a href="#" class="sf2-icon-move sf2-x group-transfer-btn op-icon vh" title="{% trans "Transfer" %}" aria-label="{% trans "Transfer" %}"></a>
|
<a href="#" class="sf2-icon-move sf2-x group-transfer-btn op-icon vh" title="{% trans "Transfer" %}" aria-label="{% trans "Transfer" %}"></a>
|
||||||
<% } %>
|
<% } %>
|
||||||
@@ -1155,7 +1155,7 @@
|
|||||||
<td><a href="{{ SITE_ROOT }}sysadmin/#address-book/groups/<%= id %>/"><%- name %></a></td>
|
<td><a href="{{ SITE_ROOT }}sysadmin/#address-book/groups/<%= id %>/"><%- name %></a></td>
|
||||||
<td><time title="<%= time %>"><%= time_from_now %></time></td>
|
<td><time title="<%= time %>"><%= time_from_now %></time></td>
|
||||||
<td>
|
<td>
|
||||||
<span><%= quota_shown %></span>
|
<span <% if (quota_error) { %>class="error"<% } %>><%= quota_shown %></span>
|
||||||
<span title="{% trans "Edit Quota" %}" class="quota-edit-icon sf2-icon-edit op-icon vh"></span>
|
<span title="{% trans "Edit Quota" %}" class="quota-edit-icon sf2-icon-edit op-icon vh"></span>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
@@ -118,15 +118,22 @@ define([
|
|||||||
data['time'] = created_at.format('LLLL');
|
data['time'] = created_at.format('LLLL');
|
||||||
data['time_from_now'] = Common.getRelativeTimeStr(created_at);
|
data['time_from_now'] = Common.getRelativeTimeStr(created_at);
|
||||||
|
|
||||||
|
data['quota_error'] = false;
|
||||||
switch(data['quota']) {
|
switch(data['quota']) {
|
||||||
case -2: // no limit
|
case -2: // no limit
|
||||||
data['quota_shown'] = '--';
|
data['quota_shown'] = '--';
|
||||||
break;
|
break;
|
||||||
case -1: // not set or error
|
case -1: // not set or error
|
||||||
data['quota_shown'] = 0;
|
data['quota_shown'] = gettext("Error");
|
||||||
|
data['quota_error'] = true;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
if (data['quota'] > 0) {
|
||||||
data['quota_shown'] = Common.quotaSizeFormat(data['quota']);
|
data['quota_shown'] = Common.quotaSizeFormat(data['quota']);
|
||||||
|
} else {
|
||||||
|
data['quota_shown'] = gettext("Error");
|
||||||
|
data['quota_error'] = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$el.html(this.template(data));
|
this.$el.html(this.template(data));
|
||||||
|
Reference in New Issue
Block a user