source: extensions/plugin_lang_analysis/template/analysis.tpl @ 26059

Last change on this file since 26059 was 26059, checked in by mistic100, 10 years ago

minor gui improvments + parse get_l10n_args

File size: 4.7 KB
Line 
1{footer_script}{literal}
2$('.strings tr.string td.toggler').click(function() {
3  if ($(this).hasClass('iconpla-plus-circled')) {
4    $(this).removeClass('iconpla-plus-circled').addClass('iconpla-minus-circled');
5    $(this).parent().nextUntil('tr.string').show();
6  }
7  else {
8    $(this).removeClass('iconpla-minus-circled').addClass('iconpla-plus-circled');
9    $(this).parent().nextUntil('tr.string').hide();
10  }
11});
12
13$('.strings tr.string').hover(
14  function() {
15    $(this).addClass('hover').nextUntil('tr.string').addClass('hover');
16  },
17  function() {
18    $(this).removeClass('hover').nextUntil('tr.string').removeClass('hover');
19  }
20);
21$('.strings tr.file').hover(
22  function() {
23    $(this).prevAll('tr.string:first').addClass('hover').nextUntil('tr.string').addClass('hover');
24  },
25  function() {
26    $(this).prevAll('tr.string:first').removeClass('hover').nextUntil('tr.string').removeClass('hover');
27  }
28);
29
30$('.open-all').click(function() {
31  $('.strings tr.string td.toggler').removeClass('iconpla-plus-circled').addClass('iconpla-minus-circled');
32  $('.strings tr.file').show();
33});
34$('.open-missing').click(function() {
35  $('.strings tr.string.missing td.toggler').removeClass('iconpla-plus-circled').addClass('iconpla-minus-circled');
36  $('.strings tr.file.string-missing').show();
37});
38$('.close-all').click(function() {
39  $('.strings tr.string td.toggler').removeClass('iconpla-minus-circled').addClass('iconpla-plus-circled');
40  $('.strings tr.file').hide();
41});
42
43$('.tiptip').tipTip({
44  delay: 0,
45  fadeIn: 200,
46  fadeOut: 200,
47  defaultPosition: 'right'
48});
49{/literal}{/footer_script}
50
51{html_style}
52.strings tr td:nth-last-child(-n+{math equation="2+x" x=$PLA_LANG_FILES|@count}) {ldelim}
53  text-align:center;
54}
55{/html_style}
56
57<form class="properties">
58<fieldset>
59  <legend>{'Analysis results'|translate}</legend>
60 
61  <p style="text-align:left;">
62    <a class="open-all">{'Expand all'|translate}</a>
63    / <a class="open-missing">{'Expand missing'|translate}</a>
64    / <a class="close-all">{'Collapse all'|translate}</a>
65  </p>
66 
67  <table class="strings">
68  <thead>
69    <tr>
70      <th></th>
71      <th class="legend">
72        <span class="missing">{'Missing'|translate}</span>
73        <span class="useless">{'Useless'|translate}</span>
74      </th>
75      <th>{'Dependency'|translate}</th>
76    {foreach from=$PLA_LANG_FILES item=lang_file}
77      <th>{$lang_file}</th>
78    {/foreach}
79      <th>common.lang</th>
80      <th>admin.lang</th>
81    </tr>
82  </thead>
83   
84  <tbody>
85  {foreach from=$PLA_STRINGS item=data key=string}
86    <!-- begin string -->
87    <tr class="string {$data.stat}">
88      <td class="toggler iconpla-plus-circled"></td>
89      <td>
90        {$string|htmlspecialchars}
91        {if isset($data.warnings)}<span class="iconpla-attention-circled tiptip" title="{'<br>'|@implode:$data.warnings}"></span>{/if}
92      </td>
93      {if $data.is_admin}<td class="text-admin">{'Admin'|translate}</td>
94      {else}<td class="text-common">{'Common'|translate}</td>{/if}
95    {foreach from=$PLA_LANG_FILES item=lang_file}
96      <td>{if $lang_file|in_array:$data.in_plugin}<b>{'Yes'|translate}</b>{else}{'No'|translate}{/if}</td>
97    {/foreach}
98      <td>{if $data.in_common}<b>{'Yes'|translate}</b>{else}{'No'|translate}{/if}</td>
99      <td>{if $data.in_admin}<b>{'Yes'|translate}</b>{else}{'No'|translate}{/if}</td>
100    </tr>
101    {foreach from=$data.files item=file_data key=file}
102      <!-- begin file -->
103      <tr class="file string-{$data.stat} {$file_data.stat}">
104        <td></td>
105        <td>{$file} <i>({', '|@implode:$file_data.lines})</i></td>
106        {if $file_data.is_admin}<td class="text-admin">{'Admin'|translate}</td>
107        {else}<td class="text-common">{'Common'|translate}</td>{/if}
108      {foreach from=$PLA_LANG_FILES item=lang_file}
109        <td>{if $lang_file|in_array:$file_data.lang_files}<b>{'Yes'|translate}</b>{else}{'No'|translate}{/if}</td>
110      {/foreach}
111        <td></td>
112        <td></td>
113      </tr>
114    {foreachelse}
115      <tr class="file string-{$data.stat} useless">
116        <td></td>
117        <td><i>{'Unused'|translate}</i></td>
118        {'<td></td>'|str_repeat:(3+$PLA_LANG_FILES|@count)}
119      </tr>
120    {/foreach} {* <!-- end file --> *}
121  {/foreach} {* <!-- end string --> *}
122  </tbody>
123 
124  <tfoot>
125    <tr>
126      <th></th>
127      <th>{'%d strings : %d missing and %d useless.'|translate|sprintf:$PLA_COUNTS.total:$PLA_COUNTS.missing:$PLA_COUNTS.useless}</th>
128      {'<th></th>'|str_repeat:(3+$PLA_LANG_FILES|@count)}
129    </tr>
130  </tfoot>
131  </table>
132 
133  <p class="formButtons"><a href="{$U_REFRESH}" class="buttonLike">{'Refresh'|translate}</a></p>
134</fieldset>
135</form>
Note: See TracBrowser for help on using the repository browser.