Version 1
[yaffs-website] / web / modules / contrib / devel / webprofiler / templates / Collector / events.html.twig
1 {% block toolbar %}
2     {% set icon %}
3     <a href="{{ url("webprofiler.dashboard", {profile: token}, {fragment: 'events'}) }}" title="{{ 'Events'|t }}">
4         <img width="20" height="28" alt="{{ 'Events'|t }}"
5              src="data:image/png;base64,{{ collector.icon }}">
6         <span class="sf-toolbar-info-piece-additional sf-toolbar-status">{{ collector.getCalledListenersCount }}</span>
7     </a>
8     {% endset %}
9
10     {% set text %}
11     <div class="sf-toolbar-info-piece">
12         <b>{{ 'Triggered'|t }}</b>
13         <span>{{ collector.getCalledListenersCount }}</span>
14     </div>
15     <div class="sf-toolbar-info-piece">
16         <b>{{ 'Not triggered'|t }}</b>
17         <span>{{ collector.getNotCalledListenersCount }}</span>
18     </div>
19     {% endset %}
20
21     <div class="sf-toolbar-block">
22         <div class="sf-toolbar-icon">{{ icon|default('') }}</div>
23         <div class="sf-toolbar-info">{{ text|default('') }}</div>
24     </div>
25 {% endblock %}
26
27 {% block panel %}
28     <script id="events" type="text/template">
29
30         <h2 class="panel__title">{{ 'Events'|t }}</h2>
31         <div class="panel__container">
32
33             <table class="table--duo">
34                 <thead>
35                 <th>{{ 'Called listeners'|t }}</th>
36                 <th>{{ 'Class'|t }}</th>
37                 <th>{{ 'Priority'|t }}</th>
38                 </thead>
39                 <tbody> <% _.each( data.called_listeners, function( item ){ %>
40                 <tr>
41                     <td><%= item.event %></td>
42                     <% if(item.type == 'Method') { %>
43                     <td>
44                         <%= Drupal.webprofiler.helpers.classLink(item) %>
45                     </td>
46                     <% } else { %>
47                     <td>{{ 'Closure'|t }}</td>
48                     <% } %>
49                     <td><%= item.priority %></td>
50                 </tr>
51                 <% }); %>
52                 </tbody>
53             </table>
54         </div>
55         <div class="panel__container">
56
57             <table class="table--duo">
58                 <thead>
59                 <th>{{ 'Non called listeners'|t }}</th>
60                 <th>{{ 'Class'|t }}</th>
61                 </thead>
62                 <tbody>
63                 <% _.each( data.not_called_listeners, function( item ){ %>
64                 <tr>
65                     <td><%= item.event %></td>
66                     <% if(item.type == 'Method') { %>
67                     <td>
68                         <%= Drupal.webprofiler.helpers.classLink(item) %>
69                     </td>
70                     <% } else { %>
71                     <td>{{ 'Closure'|t }}</td>
72                     <% } %>
73                 </tr>
74                 <% }); %>
75                 </tbody>
76             </table>
77         </div>
78     </script>
79 {% endblock %}