profile.html 3.54 KB
Newer Older
1
{% extends "base.html" %}
2
{% load i18n %}
3
{% load staticfiles %}
4 5

{% block title %}{% trans "My profile" %}{% endblock %}
6 7
{% block contentplaceholder %}
<div class="row">
8 9 10 11 12
    <div class="col-lg-12">
        <h1 class="page-header">{% trans "My profile" %}</h1>
    </div>
    <!-- /.col-lg-12 -->
</div>
13

14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
<div class="row">
    <div class="col-md-8">
    	<div class="panel panel-primary">
            <div class="panel-heading">
                <i class="fa fa-bolt"></i> {% trans "My Networks" %}
            </div>
            <!-- /.panel-heading -->
            <div class="panel-body">
            	<table class="table table-striped table-bordered">
                	<thead>
                    	<tr>
                    	<th>{% trans "Organization" %}</th><th>{% trans "Networks" %}</th>
                    	</tr>
                	</thead>
                	{% for peer in peers %}
                	<tr>
                		<td>{{peer}} </td>
                		<td>
                		{% for network in peer.networks.all %}
                		{{network}}<br>
                		{% empty %}
                	    <span style="color:red">{% blocktrans %}Ooops! Seems you have no networks associated with your peer. Contact Helpdesk to resolve this issue.{% endblocktrans %}</span>
                		{% endfor %}
                		</td>
                    </tr>
                	{% endfor %}
                </table>
        	</div>
        </div>
    </div>
    <div class="col-md-4">
        <div class="panel panel-default">
            <div class="panel-heading">
                <i class="fa fa-tags"></i> Shortcuts
            </div>
            <!-- /.panel-heading -->
            <div class="panel-body">
51 52 53
				<a class="btn btn-sm btn-outline btn-success" id="routebutton" href="{% url add-route %}"><i class="fa fa-plus-circle"></i> {% trans "Add Rule" %}</a>
				<a class="btn btn-sm btn-outline btn-primary"  href="{% url group-routes %}"><i class="fa fa-shield fa-fw"></i> {% trans "My Rules" %}</a>
				<a class="btn btn-sm btn-outline btn-info"  href="{% url dashboard %}"><i class="fa fa-dashboard"></i> {% trans "Dashboard" %}</a>
54 55 56
            </div>
        <!-- /.panel-body -->
        </div>
57

58 59 60 61 62 63 64 65 66
	    <div class="panel panel-info">
            <div class="panel-heading">
                <i class="fa fa-user"></i> {% trans "My Profile" %}
            </div>
            <!-- /.panel-heading -->
            <div class="panel-body">
                <dl class="dl-horizontal">
                    <dt>{% trans "Username" %}:</dt>
                    <dd>{{user.username}}</dd>
67
                    {% if user.first_name %}
68
                    <dt>{% trans "First name" %}:</dt><dd>{{user.first_name}}</dd>
69 70
                    {% endif %}
                    {% if user.last_name %}
71
                    <dt>{% trans "Last name" %}:</dt><dd>{{user.last_name}}</dd>
72 73
                    {% endif %}
                    {% if user.email %}
74
                    <dt>{% trans "Email" %}:</dt><dd>{{user.email}}</dd>
75
                    {% endif %}
76 77 78 79 80 81 82 83 84 85 86 87 88
                    <dt>{% trans "Api Token" %}:</dt>
                    <dd>
                    {% if user.auth_token %}
                        {{ user.auth_token }}
                    {% else %}
                        <a id="generate_token" href="{% url user-profile-token %}">{% trans "Generate One" %}</a>
                    {% endif %}
                    </dd>
                </dl>
        	</div>
        </div>
    </div>
</div>
89
{% endblock %}
90

91 92 93
{% block pagejs %}
    <script type="text/javascript" src="{% static 'js/accounts.js' %}"></script>
{% endblock %}