profile.html 2.94 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 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
{% extends "dashboard/base.html" %}
{% load i18n %}
{% load crispy_forms_tags %} 

{% block title-page %}{{ profile.username}} | {% trans "Profile" %}{% endblock %}

{% block content %}

<div class="row">
  <div class="col-md-12">
    <div class="panel panel-default">
      <div class="panel-heading">
        <a class="pull-right btn btn-default btn-xs" href="{% url "dashboard.index" %}">{% trans "Back" %}</a>
        <h3 class="no-margin">
          <i class="icon-user"></i> 
          {% include "dashboard/_display-name.html" with user=profile show_org=True %}
        </h3>
      </div>
      <div class="panel-body">
        <div>
          <div class="" style="float: left">
            <img src="{{ avatar_url }}?s=200" class="img-rounded"/>
          </div>
          <div class="" style="padding-left: 215px;">
            <p>Username: {{ profile.username }}</p>
            <p>Organisation ID: {{ profile.profile.org_id|default:"-" }}</p>
            <p>First name: {{ profile.first_name|default:"-" }}</p>
            <p>Last name: {{ profile.last_name|default:"-" }}</p>
            <p>Email address: {{ profile.email }}</p>
            <p>
              Use email address as Gravatar profile image:
              <input type="checkbox"/> <a href="https://gravatar.com">What's Gravatar?</a>
            </p> 
          </div>
          <div class="clearfix"></div>
        </div>

38 39 40 41 42 43 44 45 46 47 48 49 50
        {% if perm_group_list %}
          <hr />
          <h4>
            <i class="icon-group"></i> Groups
          </h4>
          <ul class="dashboard-profile-group-list">
          {% for g in groups %}
            <li>{{ g.name }}</li>
            {% empty %}
            {% trans "This user is not in any group." %}
          {% endfor %}
          </ul>
        {% endif %}
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98

        <hr />

        <h4>
          <i class="icon-desktop"></i>
          Virtual machines owned by the user ({{ instances_owned|length }})
        </h4>
        <ul class="dashboard-profile-vm-list">
        {% for i in instances_owned %}
          <li>
            <a href="{{ i.get_absolute_url }}">
              <i class="icon-li {{ i.get_status_icon }}"></i>
              {{ i }}
            </a>
          </li>
          {% empty %}
          <li>
            {% trans "This user have no virtual machines." %}
          </li>
        {% endfor %}
        </ul>

        <hr />

        <h4>
          <i class="icon-desktop"></i> 
          Virtual machines with access ({{ instances_with_access|length }})
        </h4>
        <ul class="dashboard-profile-vm-list">
        {% for i in instances_with_access %}
          <li>
            <a href="{{ i.get_absolute_url }}">
              <i class="icon-li {{ i.get_status_icon }}"></i>
              {{ i }}
            </a>
          </li>
          {% empty %}
          <li>
            {% trans "This user have no access to any virtual machine." %}
          </li>
        {% endfor %}
        </ul>
      </div>
    </div>
  </div>
</div>

{% endblock %}