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

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

improve display of files list

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