From 18d3d8cec1a4a4e98eee907d6c0f901035c3055b Mon Sep 17 00:00:00 2001 From: deflax Date: Wed, 31 May 2017 18:20:53 +0300 Subject: [PATCH] update sidebar schema --- app/__init__.py | 4 ++++ app/static/css/style.css | 7 +++++- app/templates/base.html | 2 ++ .../acc_avatar.html} | 8 ++----- app/templates/settings/acc_info.html | 10 +++++++++ app/templates/settings/profile.html | 22 +++++++++++-------- app/templates/uinvoice/charge.html | 2 +- app/templates/uinvoice/documents.html | 7 +----- app/templates/uinvoice/invoice.html | 2 +- app/templates/vmanager/dashboard.html | 14 ++++++++---- 10 files changed, 50 insertions(+), 28 deletions(-) rename app/templates/{sidebar.html => settings/acc_avatar.html} (57%) create mode 100644 app/templates/settings/acc_info.html diff --git a/app/__init__.py b/app/__init__.py index 4e6e2ad..573e32b 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -6,6 +6,8 @@ from flask_sqlalchemy import SQLAlchemy from flask_login import LoginManager from flask_wtf.csrf import CSRFProtect, CSRFError from flask_babel import Babel, lazy_gettext +from flask_moment import Moment + from werkzeug.contrib.fixers import ProxyFix from config import config @@ -30,6 +32,8 @@ csrf = CSRFProtect(app) #csrf.init_app(app) babel = Babel() babel.init_app(app) +moment = Moment(app) +moment.init_app(app) from .main import main as main_blueprint app.register_blueprint(main_blueprint) diff --git a/app/static/css/style.css b/app/static/css/style.css index c8fa599..483749f 100644 --- a/app/static/css/style.css +++ b/app/static/css/style.css @@ -252,4 +252,9 @@ a:active { border-color: #070; } - +.panel > .panel-heading { + padding: 6px 15px; + border-bottom: 1px solid transparent; + border-top-left-radius: 3px; + border-top-right-radius: 3px; +} diff --git a/app/templates/base.html b/app/templates/base.html index 9feaef9..aef96ee 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -20,6 +20,8 @@ {% block scripts %} {{ super() }} +{{ moment.lang("bg") }} +{{ moment.include_moment() }} {% endblock %} {% block navbar %} diff --git a/app/templates/sidebar.html b/app/templates/settings/acc_avatar.html similarity index 57% rename from app/templates/sidebar.html rename to app/templates/settings/acc_avatar.html index 8031b43..ec46eef 100644 --- a/app/templates/sidebar.html +++ b/app/templates/settings/acc_avatar.html @@ -1,14 +1,10 @@ -
{{ current_user.name }}


- Wallet: {{ current_user.wallet|round(2) }} {{ current_user.currency }}
- Group: {{ current_user.group }}
- 2-Factor: {{ current_user.twofactor }}
+ Wallet: {{ current_user.wallet|round(2) }}
+ Currenty: {{ current_user.currency }}

-
- diff --git a/app/templates/settings/acc_info.html b/app/templates/settings/acc_info.html new file mode 100644 index 0000000..16c37c1 --- /dev/null +++ b/app/templates/settings/acc_info.html @@ -0,0 +1,10 @@ +
+
Details
+
+

+ Member Since: {{ moment(current_user.member_since).fromNow() }}
+ Group: {{ current_user.group }}
+ 2-Factor: {{ current_user.twofactor }}
+

+
+
diff --git a/app/templates/settings/profile.html b/app/templates/settings/profile.html index 2cee29d..0ae48ea 100644 --- a/app/templates/settings/profile.html +++ b/app/templates/settings/profile.html @@ -25,21 +25,25 @@ $("#{{ form.org_account.id }}").click(function() { {% endblock %} {% block page_content %} - -

- -{% block sidebar %} -{% include "/sidebar.html" %} -{% endblock %} + {% block sidebar %} +
+
+
+ {% include "/settings/acc_avatar.html" %} +
+
+ {% include "/settings/acc_info.html" %} +
+
+
+ {% endblock %}
-
Данни на профила
+
Profile Info

diff --git a/app/templates/uinvoice/charge.html b/app/templates/uinvoice/charge.html index de07daf..cd29201 100644 --- a/app/templates/uinvoice/charge.html +++ b/app/templates/uinvoice/charge.html @@ -12,7 +12,7 @@

{% block sidebar %} -{% include "/sidebar.html" %} +{% include "/settings/acc_avatar.html" %} {% endblock %}
diff --git a/app/templates/uinvoice/documents.html b/app/templates/uinvoice/documents.html index ba51c5f..dbeedab 100644 --- a/app/templates/uinvoice/documents.html +++ b/app/templates/uinvoice/documents.html @@ -10,12 +10,7 @@

- -{% block sidebar %} -{% include "/sidebar.html" %} -{% endblock %} - -
+
Издадени Фактури
diff --git a/app/templates/uinvoice/invoice.html b/app/templates/uinvoice/invoice.html index 37c385a..c1d1f59 100644 --- a/app/templates/uinvoice/invoice.html +++ b/app/templates/uinvoice/invoice.html @@ -12,7 +12,7 @@
{% block sidebar %} -{% include "/sidebar.html" %} +{% include "/settings/acc_avatar.html" %} {% endblock %}
diff --git a/app/templates/vmanager/dashboard.html b/app/templates/vmanager/dashboard.html index e203d86..65d3f8c 100644 --- a/app/templates/vmanager/dashboard.html +++ b/app/templates/vmanager/dashboard.html @@ -66,11 +66,17 @@ addEventListener("DOMContentLoaded", function() {
-{% block sidebar %} -{% include "/sidebar.html" %} -{% endblock %} + {% block sidebar %} +
+
+
+ {% include "/settings/acc_avatar.html" %} +
+
+
+ {% endblock %} -
+
Services