Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / modules / contrib / devel / webprofiler / templates / Collector / translations.html.twig
1 {% block toolbar %}
2     {% set icon %}
3     <a href="{{ url("webprofiler.dashboard", {profile: token}, {fragment: "translations"}) }}"
4        title="{{ 'Translations'|t }}">
5         <img height="28" alt="{{ 'Translations'|t }}"
6              src="data:image/png;base64,{{ collector.icon }}"/>
7         <span class="sf-toolbar-status">{{ collector.untranslatedCount }}</span>
8     </a>
9     {% endset %}
10     {% set text %}
11     <div class="sf-toolbar-info-piece">
12         <b>{{ 'Translated'|t }}</b>
13         <span>{{ collector.translatedCount }}</span>
14     </div>
15     <div class="sf-toolbar-info-piece">
16         <b>{{ 'Untranslated'|t }}</b>
17         <span>{{ collector.untranslatedCount }}</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="translations" type="text/template">
29         <h2 class="panel__title">{{ 'Translations'|t }}</h2>
30         <div class="tabs">
31             <input class="tabs__radio" type="radio" id="translated" name="tabs" checked/>
32             <input class="tabs__radio" type="radio" id="untranslated" name="tabs"/>
33             <ul class="tabs__tabs list--inline">
34                 <li><label class="tabs__label" for="translated">{{ 'Translated'|t }}</label></li>
35                 <li><label class="tabs__label" for="untranslated">{{ 'Unranslated'|t }}</label></li>
36             </ul>
37
38             <div class="tabs__panels">
39                 <div class="tabs__panel">
40                     <div class="panel__container">
41                         <table class="table--duo">
42                             <thead>
43                             <tr>
44                                 <th>{{ 'Original'|t }}</th>
45                                 <th>{{ 'Tanslation'|t }}</th>
46                                 <th>{{ 'Action'|t }}</th>
47                             </tr>
48                             </thead>
49                             <tbody>
50                             <% _.each( data.translations.translated, function( value, key ){ %>
51                             <tr>
52                                 <td><%= key %></td>
53                                 <td><%= value %></td>
54                                 <td><a href="<%- data.user_interface_translations_path %>?string=<%- key%>" target="_blank" class="h--word-intact">{{ 'Edit'|t }}</a></td>
55                             </tr>
56                             <% }); %>
57                             </tbody>
58                         </table>
59                     </div>
60                 </div>
61
62                 <div class="tabs__panel">
63                     <div class="panel__container">
64                         <table class="table--duo">
65                             <thead>
66                             <tr>
67                                 <th>{{ 'Original'|t }}</th>
68                                 <th>{{ 'Action'|t }}</th>
69                             </tr>
70                             </thead>
71                             <tbody>
72                             <% _.each( data.translations.untranslated, function( value, key ){ %>
73                             <tr>
74                                 <td><%= key %></td>
75                                 <td><a href="<%- data.user_interface_translations_path %>?string=<%- key%>" target="_blank" class="h--word-intact">{{ 'Edit'|t }}</a></td>
76                             </tr>
77                             <% }); %>
78                             </tbody>
79                         </table>
80                     </div>
81                 </div>
82             </div>
83         </div>
84     </script>
85 {% endblock %}