]>
Commit | Line | Data |
---|---|---|
19514d9c MT |
1 | {% import westferry.ui.graphs %} |
2 | ||
3 | {# | |
4 | Render the tab navigation bar | |
5 | #} | |
6 | <ul class="tabs" data-tabs id="{{ tabs.id }}"> | |
7 | {% for i, tab in enumerate(tabs) %} | |
8 | {# | |
9 | Select the first tab | |
10 | #} | |
11 | {% set selected = i == 0 %} | |
12 | ||
13 | <li class="tabs-title {% if selected %}is-active{% end %}"> | |
14 | <a href="#{{ tab.id }}" {% if selected %}aria-selected="true"{% end %}> | |
15 | {{ tab.title }} | |
16 | </a> | |
17 | </li> | |
18 | {% end %} | |
19 | </ul> | |
20 | ||
21 | <div class="tabs-content" data-tabs-content="{{ tabs.id }}"> | |
22 | {% for i, tab in enumerate(tabs) %} | |
23 | {# | |
24 | Select the first tab | |
25 | #} | |
26 | {% set selected = i == 0 %} | |
27 | ||
28 | <div class="tabs-panel {% if selected %}is-active{% end %}" id="{{ tab.id }}"> | |
29 | {% for item in tab.items %} | |
30 | {% if isinstance(item, westferry.ui.graphs.Graph) %} | |
ba5eadb9 | 31 | {% module GraphBox(item, show_title=False) %} |
19514d9c MT |
32 | {% else %} |
33 | {% module WarningBox(_("Unknown UI Element"), | |
34 | _("A UI element which was supposed to be at this place could not be rendered: %r") % item) %} | |
35 | {% end %} | |
36 | {% end %} | |
37 | </div> | |
38 | {% end %} | |
39 | </div> |