forked from gergely/calendar-social
Move account related views to a separate blueprint
This commit is contained in:
27
calsocial/templates/account/first-steps.html
Normal file
27
calsocial/templates/account/first-steps.html
Normal file
@@ -0,0 +1,27 @@
|
||||
{% extends 'base.html' %}
|
||||
{% from '_macros.html' import field %}
|
||||
|
||||
{% block content %}
|
||||
<h1>{% trans %}First steps{% endtrans %}</h1>
|
||||
<p>
|
||||
{% trans %}Welcome to Calendar.social!{% endtrans %}
|
||||
</p>
|
||||
<p>
|
||||
{% trans %}These are the first steps you should make before you can start using the site.{% endtrans %}
|
||||
</p>
|
||||
<form method="post" class="ui form">
|
||||
{{ form.hidden_tag() }}
|
||||
|
||||
{% if form.errors %}
|
||||
{% for error in form.errors %}
|
||||
{{ error }}
|
||||
{% endfor %}
|
||||
<br>
|
||||
{% endif %}
|
||||
|
||||
{{ field(form.display_name) }}
|
||||
{{ field(form.time_zone) }}
|
||||
|
||||
<button type="submit" class="ui primary button">{% trans %}Save{% endtrans %}</button>
|
||||
</form>
|
||||
{% endblock content %}
|
23
calsocial/templates/account/follow-requests.html
Normal file
23
calsocial/templates/account/follow-requests.html
Normal file
@@ -0,0 +1,23 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
<h2>{% trans %}Follow requests{% endtrans %}</h2>
|
||||
{% if requests.count() %}
|
||||
<ul>
|
||||
{% for req in requests %}
|
||||
<li>
|
||||
{{ req.follower }}
|
||||
<a href="{{ url_for('account.accept_follow', follower_id=req.follower_id) }}" class="ui button">{% trans %}Accept{% endtrans %}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
{% trans %}No requests to display.{% endtrans %}
|
||||
{% endif %}
|
||||
{% if not current_user.profile.locked %}
|
||||
<p>
|
||||
{% trans %}Your profile is not locked.{% endtrans %}
|
||||
{% trans %}Anyone can follow you without your consent.{% endtrans %}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% endblock content %}
|
9
calsocial/templates/account/notifications.html
Normal file
9
calsocial/templates/account/notifications.html
Normal file
@@ -0,0 +1,9 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
{% for notif in notifs %}
|
||||
{{ notif.html }}<br>
|
||||
{% else %}
|
||||
{% trans %}Nothing to show.{% endtrans %}
|
||||
{% endfor %}
|
||||
{% endblock content %}
|
21
calsocial/templates/account/profile-edit.html
Normal file
21
calsocial/templates/account/profile-edit.html
Normal file
@@ -0,0 +1,21 @@
|
||||
{% extends 'account/settings-base.html' %}
|
||||
{% from '_macros.html' import field %}
|
||||
|
||||
{% block settings_content %}
|
||||
<h2>{% trans %}Edit profile{% endtrans %}</h2>
|
||||
<form method="post" class="ui form">
|
||||
{{ form.hidden_tag() }}
|
||||
|
||||
{% if form.errors %}
|
||||
{% for error in form.errors %}
|
||||
{{ error }}
|
||||
{% endfor %}
|
||||
<br>
|
||||
{% endif %}
|
||||
|
||||
{{ field(form.display_name) }}
|
||||
{{ field(form.locked, inline=true) }}
|
||||
|
||||
<button type="submit" class="ui primary button">{% trans %}Save{% endtrans %}</button>
|
||||
</form>
|
||||
{% endblock settings_content %}
|
19
calsocial/templates/account/registration.html
Normal file
19
calsocial/templates/account/registration.html
Normal file
@@ -0,0 +1,19 @@
|
||||
{% extends 'base.html' %}
|
||||
{% from '_macros.html' import field %}
|
||||
|
||||
{% block content %}
|
||||
<form method="post" class="ui form">
|
||||
{{ form.hidden_tag() }}
|
||||
|
||||
{% for error in form.errors %}
|
||||
{{ form.errors }}
|
||||
{% endfor %}
|
||||
|
||||
{{ field(form.username) }}
|
||||
{{ field(form.email) }}
|
||||
{{ field(form.password) }}
|
||||
{{ field(form.password_retype) }}
|
||||
|
||||
<button type="submit" class="ui primary button">{% trans %}Register{% endtrans %}</button>
|
||||
</form>
|
||||
{% endblock %}
|
15
calsocial/templates/account/settings-base.html
Normal file
15
calsocial/templates/account/settings-base.html
Normal file
@@ -0,0 +1,15 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
<div class="ui grid">
|
||||
<div class="four wide column">
|
||||
<div class="ui secondary pointing vertical menu">
|
||||
<a class="item{% if request.endpoint == 'account.edit_profile' %} active{% endif %}" href="{{ url_for('account.edit_profile') }}">{% trans %}Edit profile{% endtrans %}</a>
|
||||
<a class="item{% if request.endpoint == 'account.settings' %} active{% endif %}" href="{{ url_for('account.settings') }}">{% trans %}Settings{% endtrans %}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="twelve wide stretched column">
|
||||
{% block settings_content %}{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
20
calsocial/templates/account/user-settings.html
Normal file
20
calsocial/templates/account/user-settings.html
Normal file
@@ -0,0 +1,20 @@
|
||||
{% extends 'account/settings-base.html' %}
|
||||
{% from '_macros.html' import field %}
|
||||
|
||||
{% block settings_content %}
|
||||
<h2>{% trans %}Settings{% endtrans %}</h2>
|
||||
<form method="post" class="ui form">
|
||||
{{ form.hidden_tag() }}
|
||||
|
||||
{% if form.errors %}
|
||||
{% for error in form.errors %}
|
||||
{{ error }}
|
||||
{% endfor %}
|
||||
<br>
|
||||
{% endif %}
|
||||
|
||||
{{ field(form.timezone) }}
|
||||
|
||||
<button type="submit" class="ui primary button">{% trans %}Save{% endtrans %}</button>
|
||||
</form>
|
||||
{% endblock settings_content %}
|
Reference in New Issue
Block a user