Skip to content

Commit

Permalink
contactlist: Use name_and_title
Browse files Browse the repository at this point in the history
Save vertical space by combining names and titles into one column.
  • Loading branch information
donald committed Feb 9, 2025
1 parent 148f103 commit 9b17dc6
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions mpicms/templates/personal/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,7 @@ <h1 class="title has-text-centered">{% trans 'Contact List' %}</h1>
<table class="table" style="width: 100%;">
<thead>
<tr>
<th class="sort" data-sort="degree"><a>{% trans 'Title' %}</a></th>
<th class="sort" data-sort="first_name"><a>{% trans 'First Name' %}</a></th>
<th class="sort" data-sort="last_name"><a>{% trans 'Last Name' %}</a></th>
<th class="sort" data-sort="name"><a>{% trans 'Name' %}</a></th>
<th class="sort" data-sort="email"><a>{% trans 'Email' %}</a></th>
<th class="sort" data-sort="phone"><a>{% trans 'Phone' %}</a></th>
<th class="sort" data-sort="room"><a>{% trans 'Room' %}</a></th>
Expand All @@ -103,9 +101,7 @@ <h1 class="title has-text-centered">{% trans 'Contact List' %}</h1>
<tbody class="jslist">
{% for contact in object_list %}
<tr>
<td class="degree">{{ contact.title }}</td>
<td class="first_name">{{ contact.first_name }}</td>
<td class="last_name">{{ contact.last_name }}</td>
<td class="name">{{ contact.name_and_title }}</td>
<td class="email"><a href="mailto:{{ contact.email }}">{{ contact.email }}</a></td>
<td class="phone">{{ contact.phone }}</td>
<td class="room">{{ contact.room | add_room_links }}</td>
Expand All @@ -120,7 +116,7 @@ <h1 class="title has-text-centered">{% trans 'Contact List' %}</h1>
<script>
var options = {
listClass: 'jslist',
valueNames: [ 'degree', 'first_name', 'last_name', 'email', 'phone', 'room', 'positions', 'special_functions', 'groups' ]
valueNames: [ 'name', 'email', 'phone', 'room', 'groups', 'positions', 'special_functions' ]
};

var userList = new List('contacts', options);
Expand Down

0 comments on commit 9b17dc6

Please sign in to comment.