d4a2e2f5c23d41c61fe15940c30f4bbc79e49710
[yaffs-website] / web / modules / contrib / devel / webprofiler / templates / Collector / views.html.twig
1 {% block toolbar %}
2     {% set icon %}
3     <a href="{{ url("webprofiler.dashboard", {profile: token}, {fragment: 'views'}) }}" title="{{ 'Views'|t }}">
4         <img width="20" height="28" alt="{{ 'Views'|t }}"
5              src="data:image/png;base64,{{ collector.icon }}"/>
6         <span class="sf-toolbar-info-piece-additional sf-toolbar-status">{{ collector.getViewsCount }}</span>
7     </a>
8     {% endset %}
9     {% set text %}
10
11     <div class="sf-toolbar-info-piece">
12         <b>{{ 'Views'|t }}</b>
13         <span>{{ collector.getViewsCount }}</span>
14     </div>
15     {% endset %}
16
17     <div class="sf-toolbar-block">
18         <div class="sf-toolbar-icon">{{ icon|default('') }}</div>
19         <div class="sf-toolbar-info">{{ text|default('') }}</div>
20     </div>
21 {% endblock %}
22
23 {% block panel %}
24     <script id="views" type="text/template">
25         <h2 class="panel__title">{{ 'Views'|t }}</h2>
26         <div class="panel__container">
27             <% if( data.views.length != 0){ %>
28             <table class="table--duo">
29                 <thead>
30                 <tr>
31                     <th>{{ 'name'|t }}</th>
32                     <th>{{ 'display'|t }}</th>
33                     <th>{{ 'build time'|t }}</th>
34                     <th>{{ 'execute time'|t }}</th>
35                     <th>{{ 'render time'|t }}</th>
36                     <th>{{ 'Action'|t }}</th>
37                 </tr>
38                 </thead>
39                 <tbody>
40                 <% _.each( data.views, function( item ){ %>
41                 <tr>
42                     <td><%- item.id %></td>
43                     <td><%- item.current_display %></td>
44                     <td><%- Drupal.webprofiler.helpers.printTime(item.build_time) %></td>
45                     <td><%- Drupal.webprofiler.helpers.printTime(item.execute_time) %></td>
46                     <td><%- Drupal.webprofiler.helpers.printTime(item.render_time) %></td>
47                     <td><a href="<%- item.route %>">{{ 'Edit'|t }}</a></td>
48                 </tr>
49                 <% }); %>
50                 </tbody>
51             </table>
52             <% } else { %>
53             <p>{{ 'No results'|t }}</p>
54             <% } %>
55         </div>
56
57     </script>
58 {% endblock %}