profile_form.html 2.78 KB
Newer Older
1 2
{% extends "dashboard/base.html" %}
{% load i18n %}
3
{% load crispy_forms_tags %}
4
{% load render_table from django_tables2 %}
5 6 7

{% block title-page %}{% trans "Profile" %}{% endblock %}

8 9 10 11 12 13
{% block content %}

<div class="row">
  <div class="col-md-12">
    <div class="panel panel-default">
      <div class="panel-heading">
14
        <a class="pull-right btn btn-default btn-xs"
15 16
          href="{% url "dashboard.views.profile" username=object.user.username %}">
          {% trans "Go to my profile" %}</a>
17
        <h3 class="no-margin"><i class="fa fa-desktop"></i> {% trans "My profile" %}</h3>
18 19
      </div>
      <div class="panel-body">
20
        <div class="row">
21
          <div class="col-md-4" style="margin-bottom: 50px;">
22 23 24 25 26
            <fieldset>
              <legend>{% trans "Password change" %}</legend>
              {% crispy forms.change_password %}
            </fieldset>
          </div>
27
          <div class="col-md-4" style="margin-bottom: 50px;">
28
            <fieldset>
29
              <legend>{% trans "My preferences" %}</legend>
30 31 32
              {% crispy forms.change_language %}
            </fieldset>
          </div>
33 34 35 36
          <div class="col-md-4">
            <fieldset>
              <legend>{% trans "Current avatar" %}</legend>
              <p>
37
                <img id="dashboard-profile-avatar"
38 39 40 41 42 43 44 45 46
                 class="img-rounded" src="{{ object.get_avatar_url }}"/>
              </p>
              <p>
                <a href="{% url "dashboard.views.profile" username=profile.user.username %}">
                  {% trans "Go to my profile" %}
                </a>
              </p>
            </fieldset>
          </div>
47
        </div>
48 49 50 51 52
      </div>
    </div>
  </div>
</div>

53 54 55 56 57
<div class="row">
  <div class="col-md-12">
    <div class="panel panel-default">
      <div class="panel-heading">
        <a href="{% url "dashboard.views.userkey-create" %}" class="pull-right btn btn-success btn-xs" style="margin-right: 10px;">
58
          <i class="fa fa-plus"></i> {% trans "add SSH key" %}
59
        </a>
60
        <h3 class="no-margin"><i class="fa fa-key"></i> {% trans "SSH public keys" %}</h3>
61 62 63 64 65 66 67 68
      </div>
      <div class="panel-body">
        {% render_table userkey_table %}
      </div>
    </div>
  </div>
</div>

69 70 71 72
<div class="row">
  <div class="col-md-12">
    <div class="panel panel-default">
      <div class="panel-heading">
73
        <a href="{% url "dashboard.views.connect-command-create" %}"
74
          class="pull-right btn btn-success btn-xs" style="margin-right: 10px;">
75
          <i class="fa fa-plus"></i> {% trans "add command template" %}
76
        </a>
77
        <h3 class="no-margin"><i class="fa fa-code"></i> {% trans "Command templates" %}</h3>
78 79 80 81 82 83 84
      </div>
      <div class="panel-body">
        {% render_table connectcommand_table %}
      </div>
    </div>
  </div>
</div>
85
{% endblock %}