Skip to content
Snippets Groups Projects
Commit b3eca646 authored by Jae Beojkkoch's avatar Jae Beojkkoch
Browse files

Added possibility for users to list their profiles.

parent 9fcadc52
No related branches found
No related tags found
No related merge requests found
......@@ -3,4 +3,4 @@ import flask
blueprint = flask.Blueprint("account", __name__, template_folder="templates")
from hiboo.account import login, home, settings
from hiboo.account import login, home, settings, profiles
\ No newline at end of file
from hiboo.account import blueprint
from hiboo import security
import flask
import flask_login
@blueprint.route("/profiles")
@security.authentication_required()
def profiles():
history = flask_login.current_user.history
return flask.render_template("account_profiles.html", history=history)
\ No newline at end of file
{% extends "base.html" %}
{% block title %}{% trans %}My account{% endtrans %}{% endblock %}
{% block subtitle %}{% trans %}my profiles{% endtrans %}{% endblock %}
{% block content %}
<div class="row">
<div class="col-xs-12">
<div class="box">
<div class="box-body table-responsive no-padding">
<table class="table table-hover">
<tr>
{% if not service %}
<th>{% trans %}Service{% endtrans %}</th>
{% endif %}
<th>{% trans %}Profile username{% endtrans %}</th>
<th>{% trans %}Owned by{% endtrans %}</th>
<th>{% trans %}Status{% endtrans %}</th>
<th>{% trans %}Created on{% endtrans %}</th>
</tr>
{% for profile in current_user.profiles %}
<tr>
<td>{{ profile.service.name }}</td>
<td>{{ profile.username }}</td>
<td>{{ profile.user.username }}</td>
<td>{{ profile.status }}</td>
<td>{{ profile.created_at.date() }}</td>
</tr>
{% endfor %}
</table>
</div>
</div>
</div>
</div>
{% endblock %}
\ No newline at end of file
......@@ -5,6 +5,11 @@
<i class="fa fa-home"></i> <span>{% trans %}My account{% endtrans %}</span>
</a>
</li>
<li>
<a href="{{ url_for("account.profiles") }}">
<i class="fa fa-address-card"></i> <span>{% trans %}My profiles{% endtrans %}</span>
</a>
</li>
<li>
<a href="{{ url_for("account.password") }}">
<i class="fa fa-lock"></i> <span>{% trans %}Change password{% endtrans %}</span>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment