aboutsummaryrefslogtreecommitdiffstats
path: root/jm2l/templates/list_tiers.mako
blob: eec4df974080a1debd58bda7761e4d9c54d69386 (plain)
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<%inherit file="jm2l:templates/layout.mako"/>

<a class="pull-right" href="/categorie/entity">Editer les catégories</a>
<br>
<div class="tabbable" id="main_tab">
    <ul class="nav nav-tabs" style="margin-bottom: 5px;">
        % for Num, Entity_Type in enumerate(entities.keys()):
        <li class="${["","active"][Num==0]}">
            <a href="#${Entity_Type}" id="Map_${Entity_Type}" data-toggle="tab">${Entity_Type}s</a>
        </li>
        % endfor
    </ul>

    <div class="tab-content" style="padding:0 10px">

% for Num, Entity_Type in enumerate(entities.keys()):
        <div class="tab-pane fade ${["","active "][Num==0]} in" id="${Entity_Type}">

<table width="100%" class="table table-striped table-bordered table-hover">
  <thead>
    <tr>
        <th style="width:7em;text-align:center;">Type</th>
        <th style="text-align:center;">Nom</th>
    </tr>
  </thead>
  <tbody>
    % for entity in entities[Entity_Type].all():
        <tr>
            <td style="text-align:center;">
                % for img_path in entity.ThumbLinks:
                    <img src="${img_path}" alt="logo" />
                % endfor
            </td>        
            <td style="text-align:center;">
                ${entity.get_entity_type.entity_subtype}
            </td>
            <td style="position: relative;">
                <strong>
                    <a href="/entity/${entity.get_entity_type.entity_type}/${entity.slug}">${entity.name}</a>
                </strong>
                <span style="float:right;">
                    <a href="/entity/${entity.get_entity_type.entity_type}/${entity.slug}/edit">edit</a>
                </span>
            </td>
        </tr>
    % endfor
  </tbody>
</table>
            </div>
% endfor
    </div>