2016-04-29 10:19:28 +08:00
{% load avatar_tags i18n %}
2016-03-16 13:30:00 +08:00
< script type = "text/template" id = "side-nav-tmpl" >
2017-02-17 18:36:47 +08:00
< a href = "#" title = "{% trans " Close " % } " aria-label = "{% trans " Close " % } " class = "sf2-icon-x1 sf-popover-close op-icon hidden-md-up js-close-side-nav fright" > < / a >
2016-03-16 13:30:00 +08:00
< h3 class = "hd" > {% trans "System Admin" %}< / h3 >
< ul class = "side-tabnav-tabs" >
2016-05-27 16:42:40 +08:00
< li class = "tab<% if (cur_tab == 'dashboard') { %> tab-cur<% } %>" >
2016-03-16 13:30:00 +08:00
< a href = "{{ SITE_ROOT }}sysadmin/#dashboard/" > < span class = "sf2-icon-wrench" > < / span > {% trans "Info" %}< / a >
< / li >
2016-05-27 16:42:40 +08:00
< li class = "tab<% if (cur_tab == 'devices') { %> tab-cur<% } %>" >
2016-04-29 10:19:28 +08:00
< a href = "{{ SITE_ROOT }}sysadmin/#desktop-devices/" > < span class = "sf2-icon-monitor" > < / span > {% trans "Devices" %}< / a >
2016-04-23 18:07:09 +08:00
< / li >
2016-05-26 15:55:57 +08:00
{% if constance_enabled %}
2016-03-16 13:30:00 +08:00
< li class = "tab" >
< a href = "{% url " sys_settings " % } " > < span class = "sf2-icon-cog2" > < / span > {% trans "Settings" %}< / a >
< / li >
2016-05-26 15:55:57 +08:00
{% endif %}
2016-05-27 16:42:40 +08:00
< li class = "tab<% if (cur_tab == 'libraries') { %> tab-cur<% } %>" >
2016-06-07 17:32:01 +08:00
< a href = "{{ SITE_ROOT }}sysadmin/#all-libs/" > < span class = "sf2-icon-library" > < / span > {% trans "Libraries" %}< / a >
2016-03-16 13:30:00 +08:00
< / li >
< li class = "tab" >
< a href = "{{ SITE_ROOT }}sys/useradmin/" > < span class = "sf2-icon-user" > < / span > {% trans "Users" %}< / a >
< / li >
2016-07-20 12:26:54 +08:00
< li class = "tab<% if (cur_tab == 'groups') { %> tab-cur<% } %>" >
< a href = "{{ SITE_ROOT }}sysadmin/#groups/" > < span class = "sf2-icon-group" > < / span > {% trans "Groups" %}< / a >
2016-03-16 13:30:00 +08:00
< / li >
{% if multi_tenancy %}
< li class = "tab" >
< a href = "{{ SITE_ROOT }}sys/orgadmin/" > < span class = "sf2-icon-organization" > < / span > {% trans "Organizations" %}< / a >
< / li >
{% endif %}
2016-04-23 18:07:09 +08:00
{% if multi_institution %}
< li class = "tab" >
< a href = "{{ SITE_ROOT }}sys/instadmin/" > < span class = "sf2-icon-organization" > < / span > {% trans "Institutions" %}< / a >
< / li >
{% endif %}
2016-03-16 13:30:00 +08:00
< 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 %}
2016-07-20 15:30:39 +08:00
{% if enable_guest_invitation %}
2016-07-18 17:20:03 +08:00
< li class = "tab" >
< a href = "{{ SITE_ROOT }}sys/invitationadmin/" > < span class = "sf2-icon-invite" > < / span > {% trans "Invitations" %}< / a >
< / li >
2016-07-20 15:30:39 +08:00
{% endif %}
2016-08-02 15:03:19 +08:00
{% if enable_terms_and_conditions %}
2016-07-18 13:04:05 +08:00
< li class = "tab" >
< a href = "{{ SITE_ROOT }}sys/termsadmin/" > < span class = "sf2-icon-wiki" > < / span > {% trans "Terms and Conditions" %}< / a >
< / li >
2016-08-02 15:03:19 +08:00
{% endif %}
2016-03-16 13:30:00 +08:00
< / ul >
2016-06-07 17:32:01 +08:00
< % 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') { %>
2016-06-20 15:47:26 +08:00
< form action = "{% url 'sys_trash_repo_search' %}" method = "get" class = "side-search-form" id = "trash-libs-search-form" >
2016-06-07 17:32:01 +08:00
< input type = "text" name = "name" class = "input" value = "" placeholder = "{% trans " Search libraries by owner . . . " % } " / >
< / form >
< % } %>
< % } %>
2017-01-19 17:24:00 +08:00
< % if (cur_tab == 'groups') { %>
< form action = "{% url 'sys_group_search' %}" method = "get" class = "side-search-form" id = "groups-search-form" >
< input type = "text" name = "name" class = "input" value = "" placeholder = "{% trans " Search groups by name . . . " % } " / >
< / form >
< % } %>
2016-03-16 13:30:00 +08:00
< / script >
2016-03-16 16:21:53 +08:00
2016-04-23 18:07:09 +08:00
< script type = "text/template" id = "sysinfo-header-tmpl" >
2016-03-16 16:21:53 +08:00
< div class = "header-bar" >
< h3 class = "" > {% trans "Info" %}< / h3 >
< / div >
2016-04-23 18:07:09 +08:00
< div class = "sysinfo" >
< / div >
< span class = "loading-icon loading-tip" > < / span >
< / script >
< script type = "text/template" id = "sysinfo-tmpl" >
2016-03-16 16:21:53 +08:00
< dl >
< dt > {% trans "System Info" %}< / dt >
< dd > < % if (is_pro) { %>
{% trans "Professional Edition" %}
< % if (with_license) { %>
2016-07-13 16:31:05 +08:00
{% trans "licensed to" %} < %- license_to %>
,
2016-06-22 11:31:14 +08:00
{% trans "expires on" %} < %- license_expiration %>
2016-03-16 16:21:53 +08:00
< % } %>
< % } 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 >
2017-01-07 10:12:17 +08:00
< dt > {% trans "Libraries" %} / {% trans "Files" %}< / dt >
< dd > < %- repos_count %> / < %- total_files_count %>< / dd >
< dt > {% trans "Storage Used" %}< / dt >
< dd > < %- formatted_storage %>< / dd >
< dt > {% trans "Total Devices" %} / {% trans "Current Connected Devices" %}< / dt >
< dd > < %- total_devices_count %> / < %- current_connected_devices_count %>< / dd >
2016-03-16 16:21:53 +08:00
< % if (is_pro) { %>
< dt > {% trans "Active Users" %} / {% trans "Total Users" %} / {% trans "Limits" %}< / dt >
< dd >
< %- active_users_count %>
/
< %- users_count %>
/
< % if (with_license) { %>
2016-06-22 11:31:14 +08:00
< %- license_maxusers %>
2016-03-16 16:21:53 +08:00
< % } 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 >
2016-04-23 18:07:09 +08:00
2016-05-25 10:45:22 +08:00
< script type = "text/template" id = "devices-tmpl" >
2016-06-16 10:29:25 +08:00
< div class = "hd ovhd" >
2016-04-23 18:07:09 +08:00
< 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" >
2016-06-20 15:47:26 +08:00
< a class = "prev js-previous hide" href = "#" > {% trans "Previous" %}< / a >
< a class = "next js-next hide" href = "#" > {% trans "Next" %}< / a >
2016-04-23 18:07:09 +08:00
< / div >
< / script >
2016-05-25 10:45:22 +08:00
< script type = "text/template" id = "device-item-tmpl" >
2016-04-23 18:07:09 +08:00
< 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 >
2016-05-25 10:45:22 +08:00
< script type = "text/template" id = "device-errors-tmpl" >
< div class = "hd" >
2016-04-23 18:07:09 +08:00
< 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 >
2016-04-29 15:32:57 +08:00
< button id = "clean-device-errors" class = "fright hide" > < span class = "vam" > {% trans "Clean" %}< / span > < / button >
2016-04-23 18:07:09 +08:00
< / 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 >
2016-05-25 10:45:22 +08:00
< script type = "text/template" id = "device-error-item-tmpl" >
2016-04-23 18:07:09 +08:00
< td >
< a href = "{{ SITE_ROOT }}useradmin/info/<%- email %>/" > < %- email %>< / a >
< / td >
< td > < %- device_name %> / < %- client_version %>< / td >
< td > < %- device_ip %>
< td >
2016-06-07 17:32:01 +08:00
< a href = "{{ SITE_ROOT }}sysadmin/#libs/<%= repo_id %>/" > < %- repo_name %>< / a >
2016-04-23 18:07:09 +08:00
< / td >
< td > < %- error_msg %>< / td >
< td > < time title = '<%- time %>' > < %- time_from_now %>< / time > < / td >
< / script >
2016-04-29 10:19:28 +08:00
< 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 / >
2016-06-03 12:19:29 +08:00
< %- app.pageOptions.contact_email %>
2016-04-29 10:19:28 +08:00
< / 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 >
2016-05-27 10:04:27 +08:00
< script type = "text/template" id = "confirm-dialog-with-extra-option-tmpl" >
2016-05-27 16:01:07 +08:00
< h3 id = "dialogTitle" > < %= title %>< / h3 >
2016-05-27 10:04:27 +08:00
< p > < %= content %>< / p >
2016-05-27 16:01:07 +08:00
< % 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 >
< % } %>
2016-05-27 10:04:27 +08:00
< / script >
2016-05-25 10:45:22 +08:00
2016-06-07 17:32:01 +08:00
< 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 >
2016-05-25 10:45:22 +08:00
< / li >
2016-06-07 17:32:01 +08:00
< li class = "tabnav-tab<% if (cur_tab == 'system') { %> tabnav-tab-cur<% } %>" >
< a href = "#system-lib/" > {% trans "System" %}< / a >
2016-05-25 10:45:22 +08:00
< / li >
2016-06-07 17:32:01 +08:00
< li class = "tabnav-tab<% if (cur_tab == 'trash') { %> tabnav-tab-cur<% } %>" >
< a href = "#trash-libs/" > {% trans "Trash" %}< / a >
2016-05-25 10:45:22 +08:00
< / li >
< / ul >
2016-06-07 17:32:01 +08:00
< % if (cur_tab == 'trash') { %>
< button class = "js-clean fright hide" > {% trans "Clean" %}< / button >
< % } %>
2016-05-25 10:45:22 +08:00
< / div >
2016-06-07 17:32:01 +08:00
< / script >
< script type = "text/template" id = "libraries-tmpl" >
< span class = "loading-icon loading-tip" > < / span >
2016-05-25 10:45:22 +08:00
< table class = "hide" >
< thead >
< tr >
< th width = "4%" > <!-- icon --> < / th >
2016-05-27 16:42:40 +08:00
< th width = "34%" > {% trans "Name" %}< / th >
< th width = "13%" > {% trans "Files / Size" %}< / th >
< th width = "19%" > ID< / th >
< th width = "20%" > {% trans "Owner" %}< / th >
2016-06-13 11:51:41 +08:00
< th width = "10%" > <!-- Operations --> < / th >
2016-05-25 10:45:22 +08:00
< / tr >
< / thead >
< tbody >
< / tbody >
< / table >
< div id = "paginator" >
2016-06-20 15:47:26 +08:00
< a class = "prev js-previous hide" href = "#" > {% trans "Previous" %}< / a >
< a class = "next js-next hide" href = "#" > {% trans "Next" %}< / a >
2016-05-25 10:45:22 +08:00
< / div >
2016-06-07 17:32:01 +08:00
< div class = "empty-tips hide" >
< h2 class = "alc" > {% trans "No libraries" %}< / h2 >
< / div >
< / script >
2016-07-20 12:26:54 +08:00
2016-06-07 17:32:01 +08:00
< 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 >
2016-06-13 11:51:41 +08:00
< th width = "10%" > <!-- Operations --> < / th >
2016-06-07 17:32:01 +08:00
< / tr >
< / thead >
< tbody >
< / tbody >
< / table >
< div class = "empty-tips hide" >
< h2 class = "alc" > {% trans "No libraries" %}< / h2 >
< / div >
2016-05-25 10:45:22 +08:00
< / script >
< script type = "text/template" id = "library-item-tmpl" >
2016-05-27 16:42:40 +08:00
< td >
< img src = "<%= icon_url %>" title = "<%= icon_title %>" alt = "<%= icon_title %>" width = "24" / >
< / td >
2016-05-25 10:45:22 +08:00
< % if (name) { %>
< % if (enable_sys_admin_view_repo & & is_pro & & !encrypted) { %>
2016-06-07 17:32:01 +08:00
< td > < a href = "#libs/<%= id %>/" > < %- name %>< / a > < / td >
2016-05-25 10:45:22 +08:00
< % } else { %>
< td > < %- name %>< / td >
< % } %>
< % } else { %>
< td > --< / td >
< % } %>
2016-06-07 17:32:01 +08:00
< td > < %= file_count %> / < %= size_formatted %>< / td >
< td style = "font-size:11px;" > < %= id %>< / td >
2016-05-25 10:45:22 +08:00
< td >
< % if (owner) { %>
2016-05-27 16:42:40 +08:00
< a href = "{{ SITE_ROOT }}useradmin/info/<% print(encodeURIComponent(owner)); %>/" > < %- owner %>< / a >
2016-05-25 10:45:22 +08:00
< % } else { %>
--
< % } %>
< / td >
2016-06-13 11:51:41 +08:00
< 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 >
2016-08-03 18:17:24 +08:00
< % if (!encrypted) { %>
< a href = "#" class = "sf2-icon-share sf2-x repo-share-btn op-icon vh" title = "{% trans " Share " % } " aria-label = "{% trans " Share " % } " > < / a >
< % } %>
2016-06-13 11:51:41 +08:00
< / td >
2016-05-25 10:45:22 +08:00
< / 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" >
2016-06-07 17:32:01 +08:00
< td > < a href = "#libs/<%= id %>/" > < %- name %>< / a > < / td >
< td style = "font-size:11px;" > < %= id %>< / td >
< td > < %= description %>< / td >
2016-05-25 10:45:22 +08:00
< / script >
< script type = "text/template" id = "trash-libraries-tmpl" >
2016-06-07 17:32:01 +08:00
< span class = "loading-icon loading-tip" > < / span >
< p class = "tip hide" > {% trans "Tip: libraries deleted 30 days ago will be cleaned automatically."%}< / p >
2016-05-25 10:45:22 +08:00
< table class = "hide" >
< thead >
< tr >
2016-06-07 17:32:01 +08:00
< th width = "5%" > <!-- icon --> < / th >
< th width = "40%" > {% trans "Name" %}< / th >
< th width = "25%" > {% trans "Owner" %}< / th >
2016-05-25 10:45:22 +08:00
< th width = "20%" > {% trans "Deleted Time" %}< / th >
2016-06-13 11:51:41 +08:00
< th width = "10%" > <!-- Operations --> < / th >
2016-05-25 10:45:22 +08:00
< / tr >
< / thead >
< tbody >
< / tbody >
< / table >
2016-06-20 15:47:26 +08:00
< div id = "paginator" >
< a class = "prev js-previous hide" href = "#" > {% trans "Previous" %}< / a >
< a class = "next js-next hide" href = "#" > {% trans "Next" %}< / a >
< / div >
2016-05-25 10:45:22 +08:00
< div class = "empty-tips hide" >
2016-06-07 17:32:01 +08:00
< h2 class = "alc" > {% trans "No library deleted yet" %}< / h2 >
2016-05-25 10:45:22 +08:00
< / div >
< / script >
< script type = "text/template" id = "trash-library-item-tmpl" >
2016-05-27 16:42:40 +08:00
< td >
< img src = "<%= icon_url %>" title = "<%= icon_title %>" alt = "<%= icon_title %>" width = "24" / >
< / td >
2016-05-25 10:45:22 +08:00
< td > < %- name %>< / td >
2016-06-13 11:51:41 +08:00
< td > < a href = "{{ SITE_ROOT }}useradmin/info/<% print(encodeURIComponent(owner)); %>/" > < %- owner %>< / a > < / td >
< td > < time title = "<%= time %>" > < %= time_from_now %>< / time > < / td >
2016-05-25 10:45:22 +08:00
< 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" >
2016-07-19 17:26:45 +08:00
< p class = "path-bar" > < / p >
2016-05-25 10:45:22 +08:00
< div class = "repo-op" > < / div >
< / div >
< div class = "js-dir-content" >
< table class = "repo-file-list" >
< thead >
< tr >
2016-06-07 17:32:01 +08:00
< th width = "5%" > <!-- icon --> < / th >
< th width = "50%" > {% trans "Name" %}< / th >
2016-05-25 10:45:22 +08:00
< th width = "10%" > < / th >
2016-06-07 17:32:01 +08:00
< th width = "15%" > {% trans "Size" %}< / th >
< th width = "20%" > {% trans "Last Update" %}< / th >
2016-05-25 10:45:22 +08:00
< / 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" >
2016-06-07 17:32:01 +08:00
< % if (is_system_library) { %>
2016-07-19 17:26:45 +08:00
< a href = "#system-lib/" class = "path-link normal" > {% trans "System" %}< / a >
2016-06-07 17:32:01 +08:00
< % } else { %>
2016-07-19 17:26:45 +08:00
< a href = "#all-libs/" class = "path-link normal" > {% trans "All" %}< / a >
2016-06-07 17:32:01 +08:00
< % } %>
2016-07-19 17:26:45 +08:00
< span class = "path-split" > /< / span >
2016-05-25 10:45:22 +08:00
< % if (path == '/') { %>
2016-07-19 17:26:45 +08:00
< %- repo_name %>
2016-05-25 10:45:22 +08:00
< % } else { %>
2016-07-19 17:26:45 +08:00
< a href = "#libs/<%= repo_id %>/" class = "path-link normal" > < %- repo_name %>< / a >
< span class = "path-split" > /< / span >
2016-05-25 10:45:22 +08:00
< % for (var i = 0, len = path_list.length - 1; i < len ; i + + ) { % >
2016-07-19 17:26:45 +08:00
< a href = "#libs/<%= repo_id %>/<% print(path_list_encoded.slice(0, i+1).join('/')); %>" class = "path-link normal" > < %- path_list[i] %>< / a >
< span class = "path-split" > /< / span >
2016-05-25 10:45:22 +08:00
< % } %>
2016-07-19 17:26:45 +08:00
< %- path_list[i] %>
2016-05-25 10:45:22 +08:00
< % } %>
< / 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 { %>
2016-06-07 17:32:01 +08:00
< td > < a href = "<%= url %>" > < %- obj_name %>< / a > < / td >
2016-05-25 10:45:22 +08:00
< % } %>
< 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 >
2016-06-07 17:32:01 +08:00
< td > < %= file_size %>< / td >
< td > < time title = "<%= time %>" > < %= time_from_now %>< / time > < / td >
2016-05-25 10:45:22 +08:00
< / script >
< script type = "text/template" id = "library-transfer-form-tmpl" >
2016-06-07 17:32:01 +08:00
< form method = "" action = "" id = "repo-transfer-form" >
2016-05-25 10:45:22 +08:00
< h3 > < %= title %>< / h3 >
< input type = "hidden" name = "email" / > < br / >
< p class = "error hide" > < / p >
< input type = "submit" value = "{% trans " Submit " % } " / >
< / form >
< / script >
2016-07-20 12:26:54 +08:00
< script type = "text/template" id = "groups-tmpl" >
2016-07-21 15:13:48 +08:00
< div class = "hd ovhd" >
2016-07-20 12:26:54 +08:00
< h3 class = "fleft" > {% trans "Groups" %}< / h3 >
2016-12-22 19:15:21 +08:00
< div class = "fright" >
< button class = "btn-white js-add-group" > {% trans "New Group" %}< / button >
< button class = "btn-white js-export-excel" > {% trans "Export Excel" %}< / button >
< / div >
2016-07-20 12:26:54 +08:00
< / div >
2016-07-21 15:13:48 +08:00
< span class = "loading-icon loading-tip" > < / span >
2016-07-20 12:26:54 +08:00
< table >
< thead >
< tr >
2016-07-21 15:13:48 +08:00
< th width = "35%" > {% trans "Name" %}< / th >
< th width = "30%" > {% trans "Owner" %}< / th >
< th width = "25%" > {% trans "Created At" %}< / th >
< th width = "10%" > <!-- Operations --> < / th >
2016-07-20 12:26:54 +08:00
< / 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 >
2016-07-21 15:13:48 +08:00
< div class = "empty-tips hide" >
< h2 class = "alc" > {% trans "No groups" %}< / h2 >
< / div >
< p class = "error error-tip hide" > < / p >
2016-12-22 19:15:21 +08:00
< / script >
2016-12-16 15:02:21 +08:00
2017-01-19 17:24:00 +08:00
< script type = "text/template" id = "search-groups-tmpl" >
< h3 > {% trans "Search Group"%}< / h3 >
< form id = "search-group-form" method = "get" action = "" >
< p class = "tip" > {% trans "Tip: you can search by keyword in name." %}< / p >
< label > {% trans "Name" %}< / label > < input type = "text" name = "name" 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 = "35%" > {% trans "Name" %}< / th >
< th width = "30%" > {% trans "Owner" %}< / th >
< th width = "25%" > {% trans "Created At" %}< / th >
< th width = "10%" > <!-- Operations --> < / th >
< / tr >
< / thead >
< tbody >
< / tbody >
< / table >
< div class = "empty-tips hide" >
< h2 class = "alc" > {% trans "No groups" %}< / h2 >
< / div >
< / script >
2016-12-22 19:15:21 +08:00
< script type = "text/template" id = "group-add-form-tmpl" >
2016-12-16 15:02:21 +08:00
< form id = "group-add-form" action = "" method = "post" class = "hide" > {% csrf_token %}
< h3 id = "dialogTitle" > {% trans "New Group" %}< / h3 >
< label for = "group-name" > {% trans "Name" %}< / label > < br / >
< input type = "text" name = "group_name" value = "" class = "input" id = "group-name" / > < br / >
< label for = "group-owner" > {% trans "Owner" %}< / label >
< span class = "tip" > {% trans "(If left blank, owner will be admin)" %}< / span > < br / >
2016-12-22 19:15:21 +08:00
< input type = "hidden" name = "group_owner" value = "" id = "group-owner" / >
2016-12-16 15:02:21 +08:00
< p class = "error hide" > < / p >
< input type = "submit" class = "submit" value = "{% trans " Submit " % } " / >
< / form >
2016-07-20 12:26:54 +08:00
< / script >
< script type = "text/template" id = "group-item-tmpl" >
2017-02-09 14:59:49 +08:00
< td > < a href = "{{ SITE_ROOT }}sysadmin/#groups/<%= id %>/libs/" > < %- name %>< / a > < / td >
2016-07-20 12:26:54 +08:00
< td > < a href = "{{ SITE_ROOT }}useradmin/info/<% print(encodeURIComponent(owner)); %>/" > < %- owner %>< / a > < / td >
2016-07-21 15:13:48 +08:00
< td > < time title = "<%= time %>" > < %= time_from_now %>< / time > < / td >
2016-07-20 12:26:54 +08:00
< td >
< 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 >
< / td >
< / script >
< script type = "text/template" id = "group-transfer-form-tmpl" >
< form method = "" action = "" id = "group-transfer-form" >
< h3 > < %= title %>< / h3 >
< input type = "hidden" name = "email" / > < br / >
< p class = "error hide" > < / p >
< input type = "submit" value = "{% trans " Submit " % } " / >
< / form >
< / script >
2016-08-03 18:17:24 +08:00
< script type = "text/template" id = "folder-perm-item-tmpl" >
< % if (for_user) { %>
< td >
< a href = "{{ SITE_ROOT }}useradmin/info/<% print(encodeURIComponent(user_email)); %>/" target = "_blank" > < %- user_name %>< / a >
< / td >
< % } else { %>
< td >
2017-02-09 14:59:49 +08:00
< a href = "{{ SITE_ROOT }}sysadmin/#groups/<%= group_id %>/libs/" target = "_blank" > < %- group_name %>< / a >
2016-08-03 18:17:24 +08:00
< / td >
< % } %>
< td >
< div class = "perm" >
< span >
< % if (permission == 'rw') { %>
{% trans "Read-Write" %}
< % } else { %>
{% trans "Read-Only" %}
< % } %>
< / span >
< a href = "#" title = "{% trans " Edit " % } " class = "perm-edit-icon sf2-icon-edit op-icon vh" > < / a >
< / div >
< select class = "perm-toggle-select hide w100" >
< % if (permission == 'rw') { %>
< option value = "rw" selected = "selected" > {% trans "Read-Write" %}< / option >
< option value = "r" > {% trans "Read-Only" %}< / option >
< % } else { %>
< option value = "rw" > {% trans "Read-Write" %}< / option >
< option value = "r" selected = "selected" > {% trans "Read-Only" %}< / option >
< % } %>
< / select >
< / td >
< td >
< a href = "#" class = "sf2-icon-delete delete-icon op-icon vh" title = "{% trans " Delete " % } " > < / a >
< / td >
< / script >
< script type = "text/template" id = "share-popup-tmpl" >
< h3 class = "hd" id = "dialogTitle" > < %= title %>< / h3 >
2016-12-03 17:29:41 +08:00
< div id = "share-tabs" class = "nav-con-tabs" >
< ul class = "nav-con-tabs-nav" >
2016-08-03 18:17:24 +08:00
< li class = "tab" > < a href = "#dir-user-share" class = "a" > {% trans "Share to user" %}< / a > < / li >
< li class = "tab" > < a href = "#dir-group-share" class = "a" > {% trans "Share to group" %}< / a > < / li >
< / ul >
2016-12-03 17:29:41 +08:00
< div class = "nav-con-tabs-content" >
2016-08-03 18:17:24 +08:00
< span class = "loading-icon loading-tip" > < / span >
< div id = "dir-user-share" class = "tabs-panel" >
< table >
< thead >
< tr >
< th width = "55%" > {% trans "User" %}< / th >
< th width = "30%" > {% trans "Permission" %}< / th >
< th width = "15%" > < / th >
< / tr >
< / thead >
< tbody >
< tr id = "add-dir-user-share-item" >
< td >
< input type = "hidden" name = "emails" class = "w100" / >
< / td >
< td >
< select name = "permission" class = "share-permission-select w100" >
< option value = "rw" selected = "selected" > {% trans "Read-Write" %}< / option >
< option value = "r" > {% trans "Read-Only" %}< / option >
< / select >
< / td >
< td > < input type = "submit" value = "{% trans " Submit " % } " class = "submit" / > < / td >
< / tr >
< / tbody >
< / table >
< p class = "error hide" > < / p >
< / div >
< div id = "dir-group-share" class = "tabs-panel hide" >
< table >
< thead >
< tr >
< th width = "55%" > {% trans "Group" %}< / th >
< th width = "30%" > {% trans "Permission" %}< / th >
< th width = "15%" > < / th >
< / tr >
< / thead >
< tbody >
< tr id = "add-dir-group-share-item" >
< td >
< input type = "groups" name = "groups" class = "w100" / >
< / td >
< td >
< select name = "permission" class = "share-permission-select w100" >
< option value = "rw" selected = "selected" > {% trans "Read-Write" %}< / option >
< option value = "r" > {% trans "Read-Only" %}< / option >
< / select >
< / td >
< td > < input type = "submit" value = "{% trans " Submit " % } " class = "submit" / > < / td >
< / tr >
< / tbody >
< / table >
< p class = "error hide" > < / p >
< / div >
< / div >
< / div >
< / script >
2017-02-09 14:59:49 +08:00
< script type = "text/template" id = "groups-tabnav-tmpl" >
< p class = "path-bar" >
< a class = "normal" href = "#groups/" > {% trans "Groups" %}< / a >
< span class = "path-split" > /< / span >
< / p >
< div class = "tabnav ovhd" >
< ul class = "tabnav-tabs fleft" >
< li class = "tabnav-tab<% if (cur_tab == 'libs') { %> tabnav-tab-cur<% } %>" >
< a href = "#groups/<%= group_id %>/libs/" > {% trans "Libraries" %}< / a >
< / li >
< li class = "tabnav-tab<% if (cur_tab == 'members') { %> tabnav-tab-cur<% } %>" >
< a href = "#groups/<%= group_id %>/members/" > {% trans "Members" %}< / a >
< / li >
< / ul >
< % if (cur_tab == 'members') { %>
< div class = "fright" >
< button id = "js-add-group-member" > {% trans "Add Member" %}< / button >
< / div >
< % } %>
< / div >
< / script >
< script type = "text/template" id = "add-group-member-form-tmpl" >
< form id = "add-group-member-form" action = "" method = "post" class = "hide" > {% csrf_token %}
< h3 id = "dialogTitle" > {% trans "Add Member" %}< / h3 >
< label for = "email" > {% trans "Email" %}< / label > < br / >
< input type = "text" name = "email" value = "" id = "email" / > < br / >
< p class = "error hide" > < / p >
< input type = "submit" class = "submit" value = "{% trans " Submit " % } " / >
< / form >
< / script >
< script type = "text/template" id = "group-libraries-tmpl" >
< span class = "loading-icon loading-tip" > < / span >
< table class = "hide" >
< thead >
< tr >
< th width = "4%" > <!-- icon --> < / th >
< th width = "35%" > {% trans "Name" %}< / th >
< th width = "20%" > {% trans "Size" %}< / th >
< th width = "26%" > {% trans "Shared By" %}< / th >
< th width = "15%" > {% trans "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 = "group-library-item-tmpl" >
< td >
< img src = "<%= icon_url %>" title = "<%= icon_title %>" alt = "<%= icon_title %>" width = "24" / >
< / td >
< td >
< % if (enable_sys_admin_view_repo & & is_pro & & !encrypted) { %>
< a href = "#libs/<%= repo_id %>/" > < %- name %>< / a >
< % } else { %>
< %- name %>
< % } %>
< / td >
< td > < %- formatted_size %>< / td >
< td > < a href = "{{ SITE_ROOT }}useradmin/info/<% print(encodeURIComponent(shared_by)); %>/" > < %- shared_by %>< / a > < / td >
< td >
< a href = "#" class = "sf2-icon-delete sf2-x repo-unshare-btn op-icon vh" title = "{% trans " Unshare " % } " aria-label = "{% trans " Unshare " % } " > < / a >
< / td >
< / script >
< script type = "text/template" id = "group-members-tmpl" >
< span class = "loading-icon loading-tip" > < / span >
< table class = "hide" >
< thead >
< tr >
< th width = "5%" > < / th >
< th width = "25%" > {% trans "Name" %}< / th >
< th width = "35%" > {% trans "Email" %}< / th >
< th width = "25%" > {% trans "Role" %}< / th >
< th width = "10%" > <!-- Operations --> < / th >
< / tr >
< / thead >
< tbody >
< / tbody >
< / table >
< div class = "empty-tips hide" >
< h2 class = "alc" > {% trans "No members" %}< / h2 >
< / div >
< / script >
< script type = "text/template" id = "group-member-item-tmpl" >
< td > < img src = "<%= avatar_url %>" alt = "" width = "20" class = "avatar" / > < / td >
< td > < %- name %>< / td >
< td > < a href = "{{ SITE_ROOT }}useradmin/info/<% print(encodeURIComponent(email)); %>/" > < %- email %>< / a > < / td >
< td >
< % if (role == 'Owner') { %>
< span class = "cur-role" > {% trans "Owner" %}< / span >
< % } else if (role == 'Admin') { %>
< span class = "cur-role" > {% trans "Admin" %}< / span >
< span title = "{% trans " Edit " % } " class = "user-role-edit-icon sf2-icon-edit op-icon vh" > < / span >
< select name = "role" class = "user-role-select hide" >
< option value = "0" > {% trans "Member" %}< / option >
< option value = "1" selected = "selected" > {% trans "Admin" %}< / option >
< / select >
< % } else if (role == 'Member') { %>
< span class = "cur-role" > {% trans "Member" %}< / span >
< span title = "{% trans " Edit " % } " class = "user-role-edit-icon sf2-icon-edit op-icon vh" > < / span >
< select name = "role" class = "user-role-select hide" >
< option value = "0" selected = "selected" > {% trans "Member" %}< / option >
< option value = "1" > {% trans "Admin" %}< / option >
< / select >
< % } %>
< / td >
< td >
< % if (role != 'Owner') { %>
< a href = "#" class = "sf2-icon-delete sf2-x member-delete-btn op-icon vh" title = "{% trans " Delete " % } " aria-label = "{% trans " Delete " % } " > < / a >
< % } %>
< / td >
< / script >