update sidebar schema
This commit is contained in:
parent
bf5fa6469d
commit
18d3d8cec1
10 changed files with 50 additions and 28 deletions
|
@ -6,6 +6,8 @@ from flask_sqlalchemy import SQLAlchemy
|
||||||
from flask_login import LoginManager
|
from flask_login import LoginManager
|
||||||
from flask_wtf.csrf import CSRFProtect, CSRFError
|
from flask_wtf.csrf import CSRFProtect, CSRFError
|
||||||
from flask_babel import Babel, lazy_gettext
|
from flask_babel import Babel, lazy_gettext
|
||||||
|
from flask_moment import Moment
|
||||||
|
|
||||||
from werkzeug.contrib.fixers import ProxyFix
|
from werkzeug.contrib.fixers import ProxyFix
|
||||||
from config import config
|
from config import config
|
||||||
|
|
||||||
|
@ -30,6 +32,8 @@ csrf = CSRFProtect(app)
|
||||||
#csrf.init_app(app)
|
#csrf.init_app(app)
|
||||||
babel = Babel()
|
babel = Babel()
|
||||||
babel.init_app(app)
|
babel.init_app(app)
|
||||||
|
moment = Moment(app)
|
||||||
|
moment.init_app(app)
|
||||||
|
|
||||||
from .main import main as main_blueprint
|
from .main import main as main_blueprint
|
||||||
app.register_blueprint(main_blueprint)
|
app.register_blueprint(main_blueprint)
|
||||||
|
|
|
@ -252,4 +252,9 @@ a:active {
|
||||||
border-color: #070;
|
border-color: #070;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.panel > .panel-heading {
|
||||||
|
padding: 6px 15px;
|
||||||
|
border-bottom: 1px solid transparent;
|
||||||
|
border-top-left-radius: 3px;
|
||||||
|
border-top-right-radius: 3px;
|
||||||
|
}
|
||||||
|
|
|
@ -20,6 +20,8 @@
|
||||||
|
|
||||||
{% block scripts %}
|
{% block scripts %}
|
||||||
{{ super() }}
|
{{ super() }}
|
||||||
|
{{ moment.lang("bg") }}
|
||||||
|
{{ moment.include_moment() }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block navbar %}
|
{% block navbar %}
|
||||||
|
|
|
@ -1,14 +1,10 @@
|
||||||
<div class="col-md-4">
|
|
||||||
<div class="panel panel-info">
|
<div class="panel panel-info">
|
||||||
<div class="panel-heading">{{ current_user.name }}</div>
|
<div class="panel-heading">{{ current_user.name }}</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<a href="https://en.gravatar.com/site/signup/"><img class="roundavatar" align="right" src="{{ current_user.gravatar(128) }}"></img></a>
|
<a href="https://en.gravatar.com/site/signup/"><img class="roundavatar" align="right" src="{{ current_user.gravatar(128) }}"></img></a>
|
||||||
<p><br />
|
<p><br />
|
||||||
<b>Wallet:</b> {{ current_user.wallet|round(2) }} {{ current_user.currency }}<br />
|
<b>Wallet:</b> {{ current_user.wallet|round(2) }}<br />
|
||||||
<b>Group:</b> {{ current_user.group }}<br />
|
<b>Currenty:</b> {{ current_user.currency }}<br />
|
||||||
<b>2-Factor:</b> {{ current_user.twofactor }}<br />
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
10
app/templates/settings/acc_info.html
Normal file
10
app/templates/settings/acc_info.html
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<div class="panel panel-info">
|
||||||
|
<div class="panel-heading">Details</div>
|
||||||
|
<div class="panel-body">
|
||||||
|
<p>
|
||||||
|
<b>Member Since:</b> {{ moment(current_user.member_since).fromNow() }}<br />
|
||||||
|
<b>Group:</b> {{ current_user.group }}<br />
|
||||||
|
<b>2-Factor:</b> {{ current_user.twofactor }}<br />
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -25,21 +25,25 @@ $("#{{ form.org_account.id }}").click(function() {
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block page_content %}
|
{% block page_content %}
|
||||||
<div class="page-header">
|
|
||||||
<h1>Edit Your Profile</h1>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<br />
|
<br />
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
{% block sidebar %}
|
||||||
{% block sidebar %}
|
<div class="col-md-4">
|
||||||
{% include "/sidebar.html" %}
|
<div class="row">
|
||||||
{% endblock %}
|
<div class="col-md-12">
|
||||||
|
{% include "/settings/acc_avatar.html" %}
|
||||||
|
</div>
|
||||||
|
<div class="col-md-12">
|
||||||
|
{% include "/settings/acc_info.html" %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">Данни на профила</div>
|
<div class="panel-heading">Profile Info</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<form method="POST" action="{{ url_for('settings.profile') }}">
|
<form method="POST" action="{{ url_for('settings.profile') }}">
|
||||||
<p>
|
<p>
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
{% block sidebar %}
|
{% block sidebar %}
|
||||||
{% include "/sidebar.html" %}
|
{% include "/settings/acc_avatar.html" %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
|
|
|
@ -10,12 +10,7 @@
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<br />
|
<br />
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
{% block sidebar %}
|
|
||||||
{% include "/sidebar.html" %}
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
<div class="col-md-8">
|
|
||||||
<div class="panel panel-info">
|
<div class="panel panel-info">
|
||||||
<div class="panel-heading">Издадени Фактури</div>
|
<div class="panel-heading">Издадени Фактури</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
{% block sidebar %}
|
{% block sidebar %}
|
||||||
{% include "/sidebar.html" %}
|
{% include "/settings/acc_avatar.html" %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
|
|
|
@ -66,11 +66,17 @@ addEventListener("DOMContentLoaded", function() {
|
||||||
<br />
|
<br />
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
{% block sidebar %}
|
{% block sidebar %}
|
||||||
{% include "/sidebar.html" %}
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
{% include "/settings/acc_avatar.html" %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
<div class="col-md-8">
|
||||||
<div class="panel panel-default" id="contracts">
|
<div class="panel panel-default" id="contracts">
|
||||||
<div class="panel-heading">Services</div>
|
<div class="panel-heading">Services</div>
|
||||||
<div class="panel-body"><p>
|
<div class="panel-body"><p>
|
||||||
|
|
Loading…
Reference in a new issue