Commit f4e871e8 by Dányi Bence

webui: use proper template for group-member rendering

parent f10ae4ac
...@@ -10,42 +10,7 @@ ...@@ -10,42 +10,7 @@
{% block content %} {% block content %}
<ul class="entry-list" id="group-members"> <ul class="entry-list" id="group-members">
{% for member in members %} {% for member in members %}
<li class="entry small-row"> {% include "box/person/entry.html" %}
<div class="summary">
<div class="name">
{% if not member.user %}
{{member.code}}
{% else %}
{{member}} ({{member.code}})
{% endif %}
</div>
<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>
<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 %}
<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>
{% endif %}
</div>
</div>
</li>
{% endfor %} {% endfor %}
<li class="entry small-row"> <li class="entry small-row">
<div class="summary" id="new-member"> <div class="summary" id="new-member">
......
...@@ -3,17 +3,23 @@ ...@@ -3,17 +3,23 @@
{% get_current_language as LANGUAGE_CODE %} {% get_current_language as LANGUAGE_CODE %}
{% block content %} {% block content %}
<li class="entry"> <li class="entry small-row" id="member-{{member.code}}">
{{ block.super }} {{block.super}}
</li> </li>
{% endblock content %} {% endblock content %}
{% block summary %} {% block summary %}
<div class="summary"> <div class="summary">
<div class="name">{{ group.name }}</div> <div class="name">
{% if not member.user %}
{{member.code}}
{% else %}
{{member}} ({{member.code}})
{% endif %}
</div>
<div class="actions"> <div class="actions">
<a href="#" class="delete" data-id="{{group.id}}" data-name="{{group.name}}"> <a href="#" class="remove" data-gid="{{group.id}}" data-neptun="{{member.code}}">
<img src="/static/icons/minus-circle.png" alt="{% trans "Delete" %}" /> <img src="/static/icons/minus-circle.png" alt="{% trans 'Remove' %}" />
</a> </a>
</div> </div>
<div class="clear"></div> <div class="clear"></div>
...@@ -21,34 +27,19 @@ ...@@ -21,34 +27,19 @@
{% endblock summary %} {% endblock summary %}
{% block details %} {% block details %}
<ul> {% if not member.user %}
<li> {% trans "This user never logged in, no data available" %}
{% trans "Course" %}: {% else %}
<span class="value"> <ul>
{% if group.course %} <li>
{{group.course.name}} {% trans "Name" %}<span class="value">{{member}}</span>
{% else %} </li>
{% trans "Not assigned" %} <li>
{% endif %} {% trans "NEPTUN" %}<span class="value">{{member.code}}</span>
</span> </li>
</li> <li>
<li> E-mail:<span class="value"><a href="mailto:{{member.user.email}}">{{member.user.email}}</a></span>
{% trans "Semester" %}: </li>
<span class="value">{{group.semester.name}}</span> </ul>
</li> {% endif %}
<li>
{% trans "Owner(s)" %}:
<span class="value">{{group.owner_list}}</span>
</li>
<li>
{% trans "Member count" %}:
<span class="value">{{group.member_count}}</span>
</li>
<li>
&nbsp;
<span class="value">
<a href="/group/show/{{group.id}}">{% trans "More details" %}</a>
</span>
</li>
</ul>
{% endblock details %} {% endblock details %}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment