2018-10-08 15:33:40 +08:00
|
|
|
{% load seahub_tags i18n staticfiles %}
|
2019-04-01 02:35:31 +00:00
|
|
|
{% load render_bundle from webpack_loader %}
|
2018-08-06 18:29:12 +08:00
|
|
|
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="{{ LANGUAGE_CODE }}">
|
|
|
|
<head>
|
|
|
|
<title>{% block sub_title %}{% endblock %}{{ site_title }}</title>
|
|
|
|
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
|
|
|
|
<meta name="keywords" content="{% trans "File Collaboration Team Organization" %}" />
|
|
|
|
{% block viewport %}
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
|
|
|
|
{% endblock %}
|
2019-04-23 16:13:24 +08:00
|
|
|
{% block extra_ogp_tags %}{% endblock %}
|
2018-08-06 18:29:12 +08:00
|
|
|
<meta http-equiv="x-ua-compatible" content="ie=edge" />
|
2019-07-02 10:21:33 +08:00
|
|
|
<link rel="shortcut icon" href="{{ MEDIA_URL }}{% if filetype == 'dtable' %}{{ dtable_favicon_path }}{% else %}{{ favicon_path }}{% endif %}" />
|
2019-02-20 17:08:00 +08:00
|
|
|
<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}fontawesome/css/fontawesome-all.min.css" />
|
2019-12-18 13:47:01 +08:00
|
|
|
<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/sf_font3/iconfont.css" />
|
2019-01-19 14:36:55 +08:00
|
|
|
<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/seafile-ui.css" />
|
2018-08-06 18:29:12 +08:00
|
|
|
<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/seahub_react.css?t=1398068110" />
|
2020-12-15 18:00:39 +08:00
|
|
|
{% render_bundle 'commons' 'css'%}
|
2018-12-05 13:36:19 +08:00
|
|
|
{% block extra_style %}{% endblock %}
|
2018-08-06 18:29:12 +08:00
|
|
|
{% if branding_css != '' %}<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}{{ branding_css }}" />{% endif %}
|
|
|
|
{% if enable_branding_css %}<link rel="stylesheet" type="text/css" href="{% url 'custom_css' %}" />{% endif %}
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
<div id="wrapper" class="{{ LANGUAGE_CODE }}"></div>
|
2018-11-27 14:47:19 +08:00
|
|
|
<div id="modal-wrapper" class="{{ LANGUAGE_CODE }}"></div>
|
2018-08-06 18:29:12 +08:00
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
window.app = {
|
|
|
|
config: {
|
|
|
|
mediaUrl: '{{ MEDIA_URL }}',
|
|
|
|
logoPath: '{{ logo_path }}',
|
|
|
|
logoWidth: '{{ logo_width }}',
|
|
|
|
logoHeight: '{{ logo_height }}',
|
2019-09-29 18:19:25 +08:00
|
|
|
faviconPath: '{{ favicon_path }}',
|
|
|
|
loginBGPath: '{{ login_bg_path }}',
|
2018-08-06 18:29:12 +08:00
|
|
|
siteTitle: '{{ site_title }}',
|
2019-12-23 10:48:00 +08:00
|
|
|
siteName: '{{ site_name|escapejs }}',
|
2018-08-06 18:29:12 +08:00
|
|
|
siteRoot: '{{ SITE_ROOT }}',
|
2018-10-08 15:33:40 +08:00
|
|
|
loginUrl: '{{ LOGIN_URL }}',
|
2021-01-12 16:19:38 +08:00
|
|
|
logoutUrl: '{{ LOGOUT_URL }}',
|
2018-09-07 10:31:46 +08:00
|
|
|
isPro: '{{ is_pro }}',
|
2019-03-29 18:15:39 +08:00
|
|
|
isDocs: '{{ is_docs }}',
|
2018-09-29 15:47:53 +08:00
|
|
|
lang: '{{ LANGUAGE_CODE }}',
|
2019-01-07 16:28:25 +08:00
|
|
|
fileServerRoot: '{{ FILE_SERVER_ROOT }}',
|
2019-01-24 15:41:01 +08:00
|
|
|
serviceURL: '{{ service_url }}',
|
2019-01-07 16:28:25 +08:00
|
|
|
seafileVersion: '{{ seafile_version }}',
|
2019-07-01 12:38:58 +08:00
|
|
|
avatarURL: '{{ avatar_url }}'
|
2018-10-25 13:36:06 +08:00
|
|
|
},
|
|
|
|
pageOptions: {
|
2019-03-12 11:18:55 +08:00
|
|
|
csrfToken: "{{ csrf_token }}",
|
2019-10-08 17:28:15 +08:00
|
|
|
dtableWebServer: "{{dtable_web_server}}",
|
2018-12-18 17:32:00 +08:00
|
|
|
seafileCollabServer: '{{seafile_collab_server}}',
|
|
|
|
name: "{{request.user.username|email2nickname|escapejs}}",
|
|
|
|
contactEmail: "{{request.user.username|email2contact_email|escapejs}}",
|
2018-12-04 16:52:27 +08:00
|
|
|
username: "{{request.user.username|escapejs}}",
|
2019-12-23 10:48:00 +08:00
|
|
|
guideEnabled: {% if guide_enabled %} true {% else %} false {% endif %},
|
2020-01-05 09:56:16 +08:00
|
|
|
trashReposExpireDays: {% if trash_repos_expire_days >= 0 %} {{ trash_repos_expire_days }} {% else %} null {% endif %},
|
2019-01-24 10:02:18 +08:00
|
|
|
canAddRepo: {% if user.permissions.can_add_repo %} true {% else %} false {% endif %},
|
2019-06-11 14:11:10 +08:00
|
|
|
canAddGroup: {% if user.permissions.can_add_group %} true {% else %} false {% endif %},
|
2019-01-24 10:02:18 +08:00
|
|
|
canGenerateShareLink: {% if user.permissions.can_generate_share_link %} true {% else %} false {% endif %},
|
|
|
|
canGenerateUploadLink: {% if user.permissions.can_generate_upload_link %} true {% else %} false {% endif %},
|
2019-06-27 14:08:10 +08:00
|
|
|
canSendShareLinkEmail: {% if user.permissions.can_send_share_link_mail %} true {% else %} false {% endif %},
|
2018-11-19 18:28:31 +08:00
|
|
|
canViewOrg:'{{ user.permissions.can_view_org }}',
|
2019-05-30 16:39:59 +08:00
|
|
|
fileAuditEnabled: {% if file_audit_enabled %} true {% else %} false {% endif %},
|
2019-05-29 12:02:07 +08:00
|
|
|
enableFileComment: {% if enableFileComment %} true {% else %} false {% endif %},
|
2019-05-15 08:01:48 +08:00
|
|
|
folderPermEnabled: {% if folder_perm_enabled %} true {% else %} false {% endif %},
|
2019-02-13 12:02:55 +08:00
|
|
|
enableResetEncryptedRepoPassword: '{{ enable_reset_encrypted_repo_password }}',
|
|
|
|
isEmailConfigured: '{{ is_email_configured }}',
|
2018-11-14 10:55:11 +08:00
|
|
|
enableUploadFolder: '{{ enable_upload_folder }}',
|
2018-11-30 17:18:41 +08:00
|
|
|
enableResumableFileUpload: '{{ enable_resumable_fileupload }}',
|
2019-07-19 11:57:22 +08:00
|
|
|
resumableUploadFileBlockSize: '{{ resumable_upload_file_block_size }}',
|
2018-11-30 17:18:41 +08:00
|
|
|
// storage backends
|
|
|
|
storages: (function () {
|
|
|
|
var storages = [];
|
|
|
|
{% for storage in storages %}
|
|
|
|
storages.push({
|
|
|
|
'id': '{{storage.storage_id|escapejs}}',
|
|
|
|
'name': '{{storage.storage_name|escapejs}}'
|
|
|
|
});
|
|
|
|
{% endfor %}
|
|
|
|
return storages;
|
|
|
|
})(),
|
2020-11-20 10:08:49 +08:00
|
|
|
// library template
|
|
|
|
libraryTemplates: (function () {
|
|
|
|
var libraryTemplates = [];
|
|
|
|
{% for template in library_templates %}
|
2021-01-13 14:11:35 +08:00
|
|
|
libraryTemplates.push("{{template}}");
|
2020-11-20 10:08:49 +08:00
|
|
|
{% endfor %}
|
|
|
|
return libraryTemplates;
|
|
|
|
})(),
|
2018-11-30 17:18:41 +08:00
|
|
|
enableRepoSnapshotLabel: {% if enable_repo_snapshot_label %} true {% else %} false {% endif %},
|
2019-05-06 16:08:34 +08:00
|
|
|
shareLinkPasswordMinLength: {{ share_link_password_min_length }},
|
2020-03-04 11:01:50 +08:00
|
|
|
sideNavFooterCustomHtml: "{{ side_nav_footer_custom_html|safe|escapejs }}",
|
2020-12-02 21:31:17 +08:00
|
|
|
aboutDialogCustomHtml: "{{ about_dialog_custom_html|safe|escapejs }}",
|
2018-12-10 13:33:32 +08:00
|
|
|
maxFileName: "{{ max_file_name }}",
|
2019-05-06 15:50:44 +08:00
|
|
|
canPublishRepo: {% if user.permissions.can_publish_repo %} true {% else %} false {% endif %},
|
2019-04-03 10:30:44 +08:00
|
|
|
enableEncryptedLibrary: {% if enable_encrypted_library %} true {% else %} false {% endif %},
|
|
|
|
enableRepoHistorySetting: {% if enable_repo_history_setting %} true {% else %} false {% endif %},
|
2018-12-21 15:40:59 +08:00
|
|
|
isSystemStaff: {% if request.user.is_staff %} true {% else %} false {% endif %},
|
2019-01-16 17:45:46 +08:00
|
|
|
thumbnailSizeForOriginal: {{ thumbnail_size_for_original }},
|
2019-02-01 17:22:42 +08:00
|
|
|
repoPasswordMinLength: {{repo_password_min_length}},
|
2019-04-18 08:08:56 +00:00
|
|
|
canAddPublicRepo: {% if can_add_public_repo %} true {% else %} false {% endif %},
|
2020-09-24 10:57:45 +08:00
|
|
|
enableOCM: {% if enable_ocm %} true {% else %} false {% endif %},
|
2020-12-14 11:47:36 +08:00
|
|
|
ocmRemoteServers: (function () {
|
|
|
|
var servers = [];
|
|
|
|
{% for server in ocm_remote_servers %}
|
|
|
|
servers.push({
|
|
|
|
'label': '{{server.server_name|escapejs}}',
|
|
|
|
'value': '{{server.server_url|escapejs}}',
|
|
|
|
});
|
|
|
|
{% endfor %}
|
|
|
|
return servers;
|
|
|
|
})(),
|
2019-04-12 05:28:15 +00:00
|
|
|
canInvitePeople: {% if enable_guest_invitation and user.permissions.can_invite_guest %} true {% else %} false {% endif %},
|
2019-09-19 11:04:55 +08:00
|
|
|
customNavItems: {% if custom_nav_items %} JSON.parse('{{ custom_nav_items | escapejs }}') {% else %} {{'[]'}} {% endif %},
|
2020-08-14 14:45:44 +08:00
|
|
|
enableShowContactEmailWhenSearchUser: {% if enable_show_contact_email_when_search_user %} true {% else %} false {% endif %},
|
2019-12-13 16:16:02 +08:00
|
|
|
{% if max_upload_file_size > 0 %}
|
|
|
|
maxUploadFileSize: {{ max_upload_file_size }},
|
|
|
|
{% endif %}
|
2020-02-27 11:28:11 +08:00
|
|
|
{% if max_number_of_files_for_fileupload > 0 %}
|
|
|
|
maxNumberOfFilesForFileupload: {{ max_number_of_files_for_fileupload }},
|
|
|
|
{% endif %}
|
2019-03-15 16:06:51 +08:00
|
|
|
{% if request.user.is_authenticated and request.cur_note %}
|
2019-09-16 15:36:14 +08:00
|
|
|
curNoteMsg: '{{ request.cur_note.message|urlize|escapejs }}',
|
2019-03-15 16:06:51 +08:00
|
|
|
curNoteID: '{{ request.cur_note.id }}',
|
|
|
|
{% endif %}
|
2020-04-04 19:51:16 +08:00
|
|
|
enableTC: {% if enable_terms_and_conditions %} true {% else %} false {% endif %},
|
2020-03-25 20:20:56 +08:00
|
|
|
showLogoutIcon: {% if show_logout_icon %} true {% else %} false {% endif %},
|
2020-04-01 17:55:59 +08:00
|
|
|
additionalShareDialogNote: {% if additional_share_dialog_note %} {{ additional_share_dialog_note|safe }} {% else %} null {% endif %},
|
|
|
|
additionalAppBottomLinks: {% if additional_app_bottom_links %} {{ additional_app_bottom_links|safe }} {% else %} null {% endif %},
|
|
|
|
additionalAboutDialogLinks: {% if additional_about_dialog_links %} {{ additional_about_dialog_links|safe }} {% else %} null {% endif %}
|
2018-10-25 13:36:06 +08:00
|
|
|
}
|
2018-08-06 18:29:12 +08:00
|
|
|
};
|
|
|
|
</script>
|
2020-03-02 14:43:55 +08:00
|
|
|
<script src="{{ STATIC_URL }}scripts/i18n/{{ LANGUAGE_CODE }}/djangojs.js?v={{ seafile_version }}"></script>
|
2021-01-25 17:04:06 +08:00
|
|
|
{% render_bundle 'commons' 'js' %}
|
2020-12-15 18:00:39 +08:00
|
|
|
{% render_bundle 'runtime' %}
|
2018-08-06 18:29:12 +08:00
|
|
|
{% block extra_script %}{% endblock %}
|
|
|
|
</body>
|
|
|
|
</html>
|