1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-18 00:00:00 +00:00
Files
seahub/seahub/templates/js/sysadmin-templates.html
2016-06-20 15:47:26 +08:00

500 lines
19 KiB
HTML

{% load avatar_tags i18n %}
<script type="text/template" id="side-nav-tmpl">
<h3 class="hd">{% trans "System Admin" %}</h3>
<ul class="side-tabnav-tabs">
<li class="tab<% if (cur_tab == 'dashboard') { %> tab-cur<% } %>">
<a href="{{ SITE_ROOT }}sysadmin/#dashboard/"><span class="sf2-icon-wrench"></span>{% trans "Info" %}</a>
</li>
<li class="tab<% if (cur_tab == 'devices') { %> tab-cur<% } %>">
<a href="{{ SITE_ROOT }}sysadmin/#desktop-devices/"><span class="sf2-icon-monitor"></span>{% trans "Devices" %}</a>
</li>
{% if constance_enabled %}
<li class="tab">
<a href="{% url "sys_settings" %}"><span class="sf2-icon-cog2"></span>{% trans "Settings" %}</a>
</li>
{% endif %}
<li class="tab<% if (cur_tab == 'libraries') { %> tab-cur<% } %>">
<a href="{{ SITE_ROOT }}sysadmin/#all-libs/"><span class="sf2-icon-library"></span>{% trans "Libraries" %}</a>
</li>
<li class="tab">
<a href="{{ SITE_ROOT }}sys/useradmin/"><span class="sf2-icon-user"></span>{% trans "Users" %}</a>
</li>
<li class="tab">
<a href="{{ SITE_ROOT }}sys/groupadmin/"><span class="sf2-icon-group"></span>{% trans "Groups" %}</a>
</li>
{% if multi_tenancy %}
<li class="tab">
<a href="{{ SITE_ROOT }}sys/orgadmin/"><span class="sf2-icon-organization"></span>{% trans "Organizations" %}</a>
</li>
{% endif %}
{% if multi_institution %}
<li class="tab">
<a href="{{ SITE_ROOT }}sys/instadmin/"><span class="sf2-icon-organization"></span>{% trans "Institutions" %}</a>
</li>
{% endif %}
<li class="tab">
<a href="{{ SITE_ROOT }}sys/notificationadmin/"><span class="sf2-icon-msgs"></span>{% trans "Notifications" %}</a>
</li>
<li class="tab">
<a href="{{ SITE_ROOT }}sys/publinkadmin/"><span class="sf2-icon-link"></span>{% trans "Links" %}</a>
</li>
{% if traffic_stats_enabled %}
<li class="tab">
<a href="{{ SITE_ROOT }}sys/trafficadmin/"><span class="sf2-icon-histogram"></span>{% trans "Traffic" %}</a>
</li>
{% endif %}
{% if sysadmin_extra_enabled %}
<li class="tab">
<a href="{{ SITE_ROOT }}sys/loginadmin/"><span class="sf2-icon-clock"></span>{% trans "Logs" %}</a>
</li>
{% endif %}
{% if events_enabled %}
<li class="tab">
<a href="{{ SITE_ROOT }}sys/virus_scan_records/"><span class="sf2-icon-security"></span>{% trans "Virus Scan" %}</a>
</li>
{% endif %}
</ul>
<% if (cur_tab == 'libraries') { %>
<% if (option == 'all') { %>
<form action="{% url 'sys_repo_search' %}" method="get" class="side-search-form" id="libs-search-form">
<input type="text" name="name" class="input" value="" placeholder="{% trans "Search libraries by name..." %}" />
</form>
<% } %>
<% if (option == 'trash') { %>
<form action="{% url 'sys_trash_repo_search' %}" method="get" class="side-search-form" id="trash-libs-search-form">
<input type="text" name="name" class="input" value="" placeholder="{% trans "Search libraries by owner..." %}" />
</form>
<% } %>
<% } %>
</script>
<script type="text/template" id="sysinfo-header-tmpl">
<div class="header-bar">
<h3 class="">{% trans "Info" %}</h3>
</div>
<div class="sysinfo">
</div>
<span class="loading-icon loading-tip"></span>
</script>
<script type="text/template" id="sysinfo-tmpl">
<dl>
<dt>{% trans "System Info" %}</dt>
<dd><% if (is_pro) { %>
{% trans "Professional Edition" %}
<% if (with_license) { %>
{% trans "expires on" %} <%- license.Expiration %>
<% } %>
<% } else { %>
{% trans "Community Edition" %}
<a href="http://manual.seafile.com/deploy_pro/migrate_from_seafile_community_server.html" target="_blank">{% trans "Upgrade to Pro Edition" %}</a>
<% } %>
</dd>
<dt>{% trans "Libraries" %}</dt>
<dd><%- repos_count %></dd>
<% if (is_pro) { %>
<dt>{% trans "Active Users" %} / {% trans "Total Users" %} / {% trans "Limits" %}</dt>
<dd>
<%- active_users_count %>
/
<%- users_count %>
/
<% if (with_license) { %>
<%- license.MaxUsers %>
<% } else { %>
--
<% } %>
</dd>
<% } else { %>
<dt>{% trans "Active Users" %} / {% trans "Total Users" %}</dt>
<dd>
<%- active_users_count %>
/
<%- users_count %>
</dd>
<% } %>
<dt>{% trans "Groups" %}</dt>
<dd><%- groups_count %></dd>
<% if (multi_tenancy_enabled) { %>
<dt>{% trans "Organizations" %}</dt>
<dd><%- org_count %></dd>
<% } %>
</dl>
</script>
<script type="text/template" id="devices-tmpl">
<div class="hd ovhd">
<ul class="tab-tabs-nav fleft">
<li class="tab <% if (cur_tab == 'desktop') { %> ui-state-active <% } %>">
<a href="#desktop-devices/" class="a">{% trans "Desktop" %}</a>
</li>
<li class="tab <% if (cur_tab == 'mobile') { %> ui-state-active <% } %>">
<a href="#mobile-devices/" class="a">{% trans "Mobile" %}</a>
</li>
<% if (is_pro) { %>
<li class="tab <% if (cur_tab == 'errors') { %> ui-state-active <% } %>">
<a href="#device-errors/" class="a">{% trans "Errors" %}</a>
</li>
<% } %>
</ul>
</div>
<table class="hide">
<thead>
<tr>
<th width="22%">{% trans "User" %}</th>
<th width="17%">{% trans "Platform" %} / {% trans "Version" %}</th>
<th width="22%">{% trans "Device Name" %}</th>
<th width="17%">{% trans "IP" %}</th>
<th width="17%">{% trans "Last Access" %}</th>
<th width="5%"></th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<span class="loading-icon loading-tip"></span>
<div class="empty-tips hide">
<h2 class="alc">{% trans "No connected devices" %}</h2>
</div>
<div id="paginator">
<a class="prev js-previous hide" href="#">{% trans "Previous" %}</a>
<a class="next js-next hide" href="#">{% trans "Next" %}</a>
</div>
</script>
<script type="text/template" id="device-item-tmpl">
<td><%- user %></td>
<td><%- platform %> / <%- client_version %></td>
<td><%- device_name %></td>
<td><%- last_login_ip %></td>
<td><time title='<%- time %>'><%- time_from_now %></time></td>
<td>
<div>
<span class="unlink-device op-icon sf2-icon-delete vh" title="{% trans "Unlink" %}"></span>
</div>
</td>
</script>
<script type="text/template" id="device-errors-tmpl">
<div class="hd">
<ul class="tab-tabs-nav fleft">
<li class="tab <% if (cur_tab == 'desktop') { %> ui-state-active <% } %>">
<a href="#desktop-devices/" class="a">{% trans "Desktop" %}</a>
</li>
<li class="tab <% if (cur_tab == 'mobile') { %> ui-state-active <% } %>">
<a href="#mobile-devices/" class="a">{% trans "Mobile" %}</a>
</li>
<li class="tab <% if (cur_tab == 'errors') { %> ui-state-active <% } %>">
<a href="#device-errors/" class="a">{% trans "Errors" %}</a>
</li>
</ul>
<button id="clean-device-errors" class="fright hide"><span class="vam">{% trans "Clean" %}</span></button>
</div>
<table class="hide">
<thead>
<tr>
<th width="15%">{% trans "User" %}</th>
<th width="17%">{% trans "Device" %} / {% trans "Version" %}</th>
<th width="18%">{% trans "IP" %}</th>
<th width="15%">{% trans "Library" %}</th>
<th width="17%">{% trans "Error" %}</th>
<th width="18%">{% trans "Time" %}</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<span class="loading-icon loading-tip"></span>
<div class="empty-tips hide">
<h2 class="alc">{% trans "No sync errors" %}</h2>
</div>
</script>
<script type="text/template" id="device-error-item-tmpl">
<td>
<a href="{{ SITE_ROOT }}useradmin/info/<%- email %>/"><%- email %></a>
</td>
<td><%- device_name %> / <%- client_version %></td>
<td><%- device_ip %>
<td>
<a href="{{ SITE_ROOT }}sysadmin/#libs/<%= repo_id %>/"><%- repo_name %></a>
</td>
<td><%- error_msg %></td>
<td><time title='<%- time %>'><%- time_from_now %></time></td>
</script>
<script type="text/template" id="user-info-popup-tmpl">
<div class="outer-caret up-outer-caret"><div class="inner-caret"></div></div>
<div class="sf-popover-con">
<div class="item ovhd">
{% avatar request.user 36 %}
<div class="txt">
<%- app.pageOptions.name %><br />
<%- app.pageOptions.contact_email %>
</div>
</div>
<div class="loading-icon loading-tip"></div>
<p class="error alc hide"></p>
<div id="space-traffic" class="hide"></div>
<a class="item" href="{{ SITE_ROOT }}profile/">{% trans "Settings" %}</a>
<a href="{{ SITE_ROOT }}" title="{% trans "Exit admin panel" %}" class="item">{% trans "Exit admin panel" %}</a>
<a href="{{ SITE_ROOT }}accounts/logout/" class="item" id="logout">{% trans "Log out" %}</a>
</div>
</script>
<script type="text/template" id="confirm-dialog-with-extra-option-tmpl">
<h3 id="dialogTitle"><%= title %></h3>
<p><%= content %></p>
<% if (is_pro) { %>
<p>
<label class="checkbox-label">
<input type="checkbox" name="confirm-extra-option" id="confirm-extra-option" class="vam" />
<span class="checkbox-option vam"><%= extraOption %></span>
</label>
</p>
<% } %>
</script>
<script type="text/template" id="libraries-tabnav-tmpl">
<div class="tabnav ovhd">
<ul class="tabnav-tabs fleft">
<li class="tabnav-tab<% if (cur_tab == 'all') { %> tabnav-tab-cur<% } %>">
<a href="#all-libs/">{% trans "All" %}</a>
</li>
<li class="tabnav-tab<% if (cur_tab == 'system') { %> tabnav-tab-cur<% } %>">
<a href="#system-lib/">{% trans "System" %}</a>
</li>
<li class="tabnav-tab<% if (cur_tab == 'trash') { %> tabnav-tab-cur<% } %>">
<a href="#trash-libs/">{% trans "Trash" %}</a>
</li>
</ul>
<% if (cur_tab == 'trash') { %>
<button class="js-clean fright hide">{% trans "Clean" %}</button>
<% } %>
</div>
</script>
<script type="text/template" id="libraries-tmpl">
<span class="loading-icon loading-tip"></span>
<table class="hide">
<thead>
<tr>
<th width="4%"><!--icon--></th>
<th width="34%">{% trans "Name" %}</th>
<th width="13%">{% trans "Files / Size" %}</th>
<th width="19%">ID</th>
<th width="20%">{% trans "Owner" %}</th>
<th width="10%"><!--Operations--></th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<div id="paginator">
<a class="prev js-previous hide" href="#">{% trans "Previous" %}</a>
<a class="next js-next hide" href="#">{% trans "Next" %}</a>
</div>
<div class="empty-tips hide">
<h2 class="alc">{% trans "No libraries" %}</h2>
</div>
</script>
<script type="text/template" id="search-libraries-tmpl">
<h3>{% trans "Search Library"%}</h3>
<form id="search-repo-form" method="get" action="">
<p class="tip">{% trans "Tip: you can search by keyword in name or owner or both." %}</p>
<label>{% trans "Name" %}</label><input type="text" name="name" class="input" value=""/><br />
<label>{% trans "Owner" %}</label><input type="text" name="owner" class="input" value=""/><br />
<input type="submit" value="{% trans "Submit" %}" class="submit" />
</form>
<h3>{% trans "Result"%}</h3>
<span class="loading-icon loading-tip"></span>
<table class="hide">
<thead>
<tr>
<th width="4%"><!--icon--></th>
<th width="34%">{% trans "Name" %}</th>
<th width="13%">{% trans "Files / Size" %}</th>
<th width="19%">ID</th>
<th width="20%">{% trans "Owner" %}</th>
<th width="10%"><!--Operations--></th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<div class="empty-tips hide">
<h2 class="alc">{% trans "No libraries" %}</h2>
</div>
</script>
<script type="text/template" id="library-item-tmpl">
<td>
<img src="<%= icon_url %>" title="<%= icon_title %>" alt="<%= icon_title %>" width="24" />
</td>
<% if (name) { %>
<% if (enable_sys_admin_view_repo && is_pro && !encrypted) { %>
<td><a href="#libs/<%= id %>/"><%- name %></a></td>
<% } else { %>
<td><%- name %></td>
<% } %>
<% } else { %>
<td>--</td>
<% } %>
<td><%= file_count %> / <%= size_formatted %></td>
<td style="font-size:11px;"><%= id %></td>
<td>
<% if (owner) { %>
<a href="{{ SITE_ROOT }}useradmin/info/<% print(encodeURIComponent(owner)); %>/"><%- owner %></a>
<% } else { %>
--
<% } %>
</td>
<td>
<a href="#" class="sf2-icon-delete sf2-x repo-delete-btn op-icon vh" title="{% trans "Delete" %}" aria-label="{% trans "Delete" %}"></a>
<a href="#" class="sf2-icon-move sf2-x repo-transfer-btn op-icon vh" title="{% trans "Transfer" %}" aria-label="{% trans "Transfer" %}"></a>
</td>
</script>
<script type="text/template" id="system-library-tmpl">
<table class="hide">
<thead>
<tr>
<th width="25%">{% trans "Name" %}</th>
<th width="35%">ID</th>
<th width="40%">{% trans "Description" %}</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<span class="loading-icon loading-tip"></span>
</script>
<script type="text/template" id="system-library-item-tmpl">
<td><a href="#libs/<%= id %>/"><%- name %></a></td>
<td style="font-size:11px;"><%= id %></td>
<td><%= description %></td>
</script>
<script type="text/template" id="trash-libraries-tmpl">
<span class="loading-icon loading-tip"></span>
<p class="tip hide">{% trans "Tip: libraries deleted 30 days ago will be cleaned automatically."%}</p>
<table class="hide">
<thead>
<tr>
<th width="5%"><!--icon--></th>
<th width="40%">{% trans "Name" %}</th>
<th width="25%">{% trans "Owner" %}</th>
<th width="20%">{% trans "Deleted Time" %}</th>
<th width="10%"><!--Operations--></th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<div id="paginator">
<a class="prev js-previous hide" href="#">{% trans "Previous" %}</a>
<a class="next js-next hide" href="#">{% trans "Next" %}</a>
</div>
<div class="empty-tips hide">
<h2 class="alc">{% trans "No library deleted yet" %}</h2>
</div>
</script>
<script type="text/template" id="trash-library-item-tmpl">
<td>
<img src="<%= icon_url %>" title="<%= icon_title %>" alt="<%= icon_title %>" width="24" />
</td>
<td><%- name %></td>
<td><a href="{{ SITE_ROOT }}useradmin/info/<% print(encodeURIComponent(owner)); %>/"><%- owner %></a></td>
<td><time title="<%= time %>"><%= time_from_now %></time></td>
<td>
<a href="#" class="sf2-icon-delete sf2-x repo-delete-btn op-icon vh" title="{% trans "Delete" %}" aria-label="{% trans "Delete" %}"></a>
<a href="#" class="sf2-icon-reply sf2-x repo-restore-btn op-icon vh" title="{% trans "Restore" %}" aria-label="{% trans "Restore" %}"></a>
</td>
</script>
<script type="text/template" id="dir-view-tmpl">
<div class="repo-file-list-topbar">
<ol class="path-bar breadcrumb"></ol>
<div class="repo-op"></div>
</div>
<div class="js-dir-content">
<table class="repo-file-list">
<thead>
<tr>
<th width="5%"><!--icon--></th>
<th width="50%">{% trans "Name" %}</th>
<th width="10%"></th>
<th width="15%">{% trans "Size" %}</th>
<th width="20%">{% trans "Last Update" %}</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
<span class="loading-icon loading-tip"></span>
<p class="error hide"></p>
</script>
<script type="text/template" id="dir-path-bar-tmpl">
<% if (is_system_library) { %>
<li><a href="#system-lib/" class="path-link normal">{% trans "System" %}</a></li>
<% } else { %>
<li><a href="#all-libs/" class="path-link normal">{% trans "All" %}</a></li>
<% } %>
<% if (path == '/') { %>
<li><%- repo_name %></li>
<% } else { %>
<li><a href="#libs/<%= repo_id %>/" class="path-link normal"><%- repo_name %></a></li>
<% for (var i = 0, len = path_list.length - 1; i < len; i++) { %>
<li><a href="#libs/<%= repo_id %>/<% print(path_list_encoded.slice(0, i+1).join('/')); %>" class="path-link normal"><%- path_list[i] %></a></li>
<% } %>
<li><%- path_list[i] %></li>
<% } %>
</script>
<script type="text/template" id="dir-op-bar-tmpl">
<div id="basic-upload" class="inline-block">
<button class="op-btn basic-upload-btn" >{% trans "Upload" %}</button>
<input id="basic-upload-input" class="hide" type="file" name="file" multiple />
</div>
<button id="add-new-dir" class="op-btn">{% trans "New Folder" %}</button>
</script>
<script type="text/template" id="dirent-item-tmpl">
<td><img src="<%= icon_url %>" width="24" alt="" /></td>
<% if (is_file) { %>
<td><%- obj_name %></td>
<% } else { %>
<td><a href="<%= url %>"><%- obj_name %></a></td>
<% } %>
<td>
<% if (is_system_library) { %>
<a href="#" class="sf2-icon-delete sf2-x dirent-delete-btn op-icon vh" title="{% trans "Delete" %}" aria-label="{% trans "Delete" %}"></a>
<% } %>
<% if (is_file) { %>
<a href="#" class="sf2-icon-download sf2-x dirent-download-btn op-icon vh" title="{% trans "Download" %}" aria-label="{% trans "Download" %}"></a>
<% } %>
</td>
<td><%= file_size %></td>
<td><time title="<%= time %>"><%= time_from_now %></time></td>
</script>
<script type="text/template" id="library-transfer-form-tmpl">
<form method="" action="" id="repo-transfer-form">
<h3><%= title %></h3>
<input type="hidden" name="email" /><br />
<p class="error hide"></p>
<input type="submit" value="{% trans "Submit" %}" />
</form>
</script>