/
viewModuleList.html.twig
62 lines (62 loc) · 2.77 KB
/
viewModuleList.html.twig
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
52
53
54
55
56
57
58
59
60
61
62
{{ adminHeader() }}
{{ pageSetVar('title', __('Modules list')) }}
<table class="table table-bordered table-striped">
<colgroup>
<col id="cName" />
<col id="cDescription" />
<col id="cVersion" />
<col id="cState" />
<col id="cActions" />
</colgroup>
<thead>
<tr>
<th id="hName" scope="col"><a class='{{ sort.displayname.class }}' href='{{ sort.displayname.url }}'>{{ __('Name') }}</a></th>
<th id="hDescription" scope="col">{{ __('Description') }}</th>
<th id="hVersion" scope="col">{{ __('Version') }}</th>
<th id="hState" scope="col"><a class='{{ sort.state.class }}' href='{{ sort.state.url }}'>{{ __('State') }}</a></th>
<th id="hActions" scope="col" class="text-right">Actions</th>
</tr>
</thead>
<tbody>
{% for module in modules %}
<tr>
<td headers="hName">
{% if adminRoutes[module.name]|default %}
<a title="{{ __("Go to the module's administration panel") }}" href="{{ adminRoutes[module.name] }}"><i class="fa fa-link"></i></a>
{% endif %}
<strong>{{ module.displayname }}</strong>
<a data-toggle="collapse" href="#collapse-{{ module.name }}"><i class="fa fa-caret-down"></i></a>
<ul class="collapse" id="collapse-{{ module.name }}" style="margin-bottom:0">
<li>Internal name: <em>{{ module.name }}</em></li>
<li>Url root: <code>/{{ module.url }}</code></li>
</ul>
</td>
<td headers="hDescription" style="width: 50%">
{% if module.name|isCoreModule %}<span class="label label-info tooltips" title="{{ __('Core Extension') }}">C</span>{% endif %}
{{ module.description }}
</td>
<td headers="hVersion">{{ module.version }}</td>
<td class="nowrap">
{{ stateLabel(module, upgradedExtensions) }}
</td>
{% set rowActions = knp_menu_get('zikulaExtensionsAdminMenu', [], {extension: module}) %}
<th headers="hActions" class="actions text-right">{{ knp_menu_render(rowActions, {template: 'ZikulaMenuModule:Override:actions.html.twig'}) }}</th>
</tr>
{% endfor %}
</tbody>
</table>
{{ pager({rowcount:pager.count, limit:pager.limit, route:'zikulaextensionsmodule_module_viewmodulelist'}) }}
{{ adminFooter() }}
{# todo move to own file #}
{% set initScript %}
<script>
( function($) {
$(document).ready(function() {
$('i[class*=fa-caret-]').on('click', function() {
$(this).toggleClass('fa-caret-down fa-caret-up');
});
});
})(jQuery);
</script>
{% endset %}
{{ pageAddAsset('footer', initScript) }}