From d995a2cc14f9bab38484736953a7d143782e3506 Mon Sep 17 00:00:00 2001 From: Anton Kamalov Date: Fri, 6 Dec 2024 16:14:31 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=B4=D0=B3=D0=BE=D0=BD=D0=BA?= =?UTF-8?q?=D0=B0=20=D0=BF=D0=BE=D0=B4=20=D0=BE=D0=BF=D0=B8=D1=81=D0=B0?= =?UTF-8?q?=D0=BD=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App/Report/__init__.py | 2 +- App/{ => Report}/static/css/report.css | 0 App/{ => Report}/static/js/check.js | 0 App/Report/templates/report_basic.html | 4 ++-- App/Report/templates/report_menu.html | 2 +- App/static/css/auth.css | 5 ----- App/templates/main_menu.html | 5 ++++- 7 files changed, 8 insertions(+), 10 deletions(-) rename App/{ => Report}/static/css/report.css (100%) rename App/{ => Report}/static/js/check.js (100%) delete mode 100644 App/static/css/auth.css diff --git a/App/Report/__init__.py b/App/Report/__init__.py index 5794625..ee25b68 100644 --- a/App/Report/__init__.py +++ b/App/Report/__init__.py @@ -8,7 +8,7 @@ import json with open(path.join(path.dirname(__file__), 'reports.json'), encoding='utf-8') as f: report_list = json.load(f) -report_bp = Blueprint('report_bp', __name__, template_folder='templates') +report_bp = Blueprint('report_bp', __name__, template_folder='templates', static_folder='static') @report_bp.route('/menu') @check_auth diff --git a/App/static/css/report.css b/App/Report/static/css/report.css similarity index 100% rename from App/static/css/report.css rename to App/Report/static/css/report.css diff --git a/App/static/js/check.js b/App/Report/static/js/check.js similarity index 100% rename from App/static/js/check.js rename to App/Report/static/js/check.js diff --git a/App/Report/templates/report_basic.html b/App/Report/templates/report_basic.html index 03e0f3a..2f79c89 100644 --- a/App/Report/templates/report_basic.html +++ b/App/Report/templates/report_basic.html @@ -4,7 +4,7 @@ {{ title }} - + - +
diff --git a/App/Report/templates/report_menu.html b/App/Report/templates/report_menu.html index d55d621..919bd42 100644 --- a/App/Report/templates/report_menu.html +++ b/App/Report/templates/report_menu.html @@ -29,7 +29,7 @@
diff --git a/App/static/css/auth.css b/App/static/css/auth.css deleted file mode 100644 index 286c3d1..0000000 --- a/App/static/css/auth.css +++ /dev/null @@ -1,5 +0,0 @@ -form[name="auth"] input[type="submit"] { - display: block; - margin: 10px auto; - background-color: #f2c464; -} \ No newline at end of file diff --git a/App/templates/main_menu.html b/App/templates/main_menu.html index 473c62e..0c4fb6c 100644 --- a/App/templates/main_menu.html +++ b/App/templates/main_menu.html @@ -33,8 +33,11 @@ + {% if 'role' in ses and ses['access_user'] == 'internal_users'%} +

Ваша роль: {{ ses['role'] }}

+ {% endif %}
-
+
{% if 'role' not in ses %}

Для доступа к функциям системы необходимо авторизоваться