From 0015a9a6c848c587a59f0570475f0aa015b35668 Mon Sep 17 00:00:00 2001 From: llj Date: Tue, 4 Jul 2017 10:39:11 +0800 Subject: [PATCH] [system admin] enable user to upload a license file --- media/css/seahub.css | 9 ++++ seahub/settings.py | 2 +- seahub/templates/js/sysadmin-templates.html | 14 ++++-- .../templates/snippets/web_settings_form.html | 13 ----- seahub/templates/sysadmin/settings.html | 5 -- static/scripts/common.js | 2 + .../scripts/sysadmin-app/views/dashboard.js | 50 +++++++++++++++++-- 7 files changed, 68 insertions(+), 27 deletions(-) diff --git a/media/css/seahub.css b/media/css/seahub.css index 8e90f13ecf..c5d545625a 100644 --- a/media/css/seahub.css +++ b/media/css/seahub.css @@ -3856,3 +3856,12 @@ img.thumbnail { width:800px; overflow:auto; } +/* system info */ +.license-file-upload { + margin-top:5px; + position:relative; + overflow:hidden; +} +.license-file-upload-btn { + white-space:nowrap; +} diff --git a/seahub/settings.py b/seahub/settings.py index 8664ce50d0..dc01f51894 100644 --- a/seahub/settings.py +++ b/seahub/settings.py @@ -413,7 +413,7 @@ SITE_TITLE = 'Private Seafile' SITE_NAME = 'Seafile' # Path to the license file(relative to the media path) -LICENSE_PATH = os.path.join(PROJECT_ROOT, '../../seafile_license.txt') +LICENSE_PATH = os.path.join(PROJECT_ROOT, '../../seafile-license.txt') # Path to the favicon file (relative to the media path) # tip: use a different name when modify it. diff --git a/seahub/templates/js/sysadmin-templates.html b/seahub/templates/js/sysadmin-templates.html index 9893d19064..6ec54664bd 100644 --- a/seahub/templates/js/sysadmin-templates.html +++ b/seahub/templates/js/sysadmin-templates.html @@ -93,7 +93,7 @@ <% } %> - -