show-group.html 5.48 KB
Newer Older
1 2 3 4
{% extends "base.html" %}
{% load i18n %}
{% get_current_language as LANGUAGE_CODE %}
{% block content %}
Dányi Bence committed
5 6
<div class="boxes">
    <div class="contentblock" id="group-members">
Dányi Bence committed
7
        <h2>{% trans "Members of" %}: {{group.name}}</h2>
Dányi Bence committed
8 9 10 11 12 13 14 15 16 17 18
        <ul class="wm-list">
            {% for member in members %}
            <li class="wm small-row">
                <div class="summary">
                    <div class="name">
                        {% if not member.user %}
                        {{member.code}}
                        {% else %}
                        {{member}} ({{member.code}})
                        {% endif %}
                    </div>
19 20 21 22 23
                    <div class="actions">
                        <a href="#" class="remove" data-gid="{{group.id}}" data-neptun="{{member.code}}">
                            <img src="/static/icons/minus-circle.png" alt="{% trans 'Remove' %}" />
                        </a>
                    </div>
Dányi Bence committed
24 25 26 27 28 29 30
                    <div class="clear"></div>
                </div>
                <div class="details">
                    <div class="container">
                        {% if not member.user %}
                        {% trans "This user never logged in, no data available" %}
                        {% else %}
31 32 33 34 35 36 37 38 39 40 41
                        <ul>
                            <li>
                                {% trans "Name" %}<span class="value">{{member}}</span>
                            </li>
                            <li>
                                {% trans "NEPTUN" %}<span class="value">{{member.code}}</span>
                            </li>
                            <li>
                                E-mail:<span class="value"><a href="mailto:{{member.user.email}}">{{member.user.email}}</a></span>
                            </li>
                        </ul>
Dányi Bence committed
42 43 44 45 46 47 48 49 50 51
                        {% endif %}
                    </div>
                </div>
            </li>
            {% endfor %}
            <li class="wm small-row">
                <div class="summary" id="new-member">
                    <div class="name">{% trans "Add user" %}</div>
                    <div id="new-member-form">
                        <input type="text" placeholder="{% trans "User NEPTUN code" %}" />
52
                        <input type="submit" value="{% trans "Add user" %}" data-id="{{group.id}}"/>
Dányi Bence committed
53 54 55 56 57 58
                    </div>
                    <div class="clear"></div>
                </div>
            </li>
        </ul>
    </div>
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
    <div class="contentblock" id="group-owners">
        <h2>{% trans "Owners of" %}: {{group.name}}</h2>
        <ul class="wm-list">
            {% for owner in owners %}
            <li class="wm small-row">
                <div class="summary">
                    <div class="name">
                        {% if not owner.user %}
                        {{owner.code}}
                        {% else %}
                        {{owner}} ({{owner.code}})
                        {% endif %}
                    </div>
                    <div class="actions">
                        <a href="#" class="remove" data-gid="{{group.id}}" data-neptun="{{owner.code}}">
                            <img src="/static/icons/minus-circle.png" alt="{% trans 'Remove' %}" />
                        </a>
                    </div>
                    <div class="clear"></div>
                </div>
                <div class="details">
                    <div class="container">
                        {% if not owner.user %}
                        {% trans "This user never logged in, no data available" %}
                        {% else %}
84 85 86 87 88 89 90 91 92 93 94
                        <ul>
                            <li>
                                {% trans "Name" %}<span class="value">{{owner}}</span>
                            </li>
                            <li>
                                {% trans "NEPTUN" %}<span class="value">{{owner.code}}</span>
                            </li>
                            <li>
                                E-mail:<span class="value"><a href="mailto:{{owner.user.email}}">{{owner.user.email}}</a></span>
                            </li>
                        </ul>
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
                        {% endif %}
                    </div>
                </div>
            </li>
            {% endfor %}
            <li class="wm small-row">
                <div class="summary" id="new-owner">
                    <div class="name">{% trans "Add owner" %}</div>
                    <div id="new-owner-form">
                        <input type="text" placeholder="{% trans "Owner name/NEPTUN" %}" />
                        <input type="submit" value="{% trans "Add owner" %}" data-id="{{group.id}}"/>
                    </div>
                    <div class="clear"></div>
                </div>
            </li>
        </ul>
    </div>
Dányi Bence committed
112 113
</div>
<div class="boxes">
114
    {% if noshare %}
Dányi Bence committed
115 116 117 118 119 120 121 122 123
        <div id="new-wm-tooltip" style="position:absolute">
            <div id="new-wm-tooltip-container">
                <p>
                    {% trans "This group has no shared templates." %}
                </p>
                <p>
                    {% trans "Share one, and the group members can start their own virtual machine." %}
                </p>
                <div id="new-wm-tooltip-tail"></div>
Dányi Bence committed
124
            </div>
Dányi Bence committed
125 126 127
        </div>
    {% endif %}
        {% include "box-templatelist.html" %}
Dányi Bence committed
128
</div>
129
{% endblock %}