Source

HackersEdge / he_one / templates / he_one / user_info.html

Full commit
{% extends "base.html" %}
{% load hackers_edge %}
{% load url from future %}

{% block title %}User: {{object}}{% endblock %}

{% block css %}#user_content { height: 490px; padding: 5px; }{% endblock %}

{% block content %}
<h2>{{object}}</h2>
<div id="user_content" class="ui-widget-content ui-corner-all" style="overflow: auto;">
<h4>Owned Hosts</h4>
{% for host in object.hosts.all %}
<a href="{% url 'admin:he_one_host_change' host.pk %}">{{host}}</a><br/>
{% endfor %}
<h4>Hosts with permission</h4>
{% for host in object.host_set.all %}
<a href="{% url 'admin:he_one_host_change' host.pk %}">{{host}}</a><br/>
{% endfor %}
<h4>Mailboxes</h4>
{% for mbx in object.mailbox_set.all %}
 {% for host in mbx.host_set.all %}
  <a href="{% url 'admin:he_one_mailbox_change' mbx.pk %}">{{host}}</a><br/>
 {% endfor %}
{% endfor %}
<h4>Sent messages</h4>
{% for msg in object.sent_set.all %}
<a href="{% url 'admin:he_one_message_change' msg.pk %}">{{msg}}</a><br/>
{% endfor %}
<h4>Files</h4>
{% for pcfile in object.filepermission_set.all %}
<a href="{% url 'admin:he_one_filepermission_change' pcfile.pk %}">{{pcfile}}</a><br/>
{% endfor %}
<h4>Tasks</h4>
{% for task in object.task_set.all %}
<a href="{% url 'admin:he_one_task_change' task.pk %}">{{task}}</a><br/>
{% endfor %}
<h4>Latest actions</h4>
{% for log in object.log_set.all %}
<a href="{% url 'admin:he_one_log_change' log.pk %}">{{log}}</a> - {{log.logged_at}}<br/>
{% endfor %}
<h4>Mission list</h4>
{% for mission in object.mission_set.all %}
<a href="{% url 'admin:he_one_mission_change' mission.pk %}">{{mission}}</a><br/>
{% endfor %}
</div>
{% endblock %}