source: extensions/gally/gally-minimalist/template/picture_nav_buttons.tpl @ 16022

Last change on this file since 16022 was 16022, checked in by grum, 12 years ago

new theme gally-minimalist

File size: 3.6 KB
Line 
1<div class="navButtons">
2{if $DISPLAY_NAV_BUTTONS or isset($slideshow)}
3
4{strip}{if isset($next)}
5    <a href="{$next.U_IMG}"
6       title="<span class='navDesc'><span class='navAction'>{'Next'|@translate}</span>{if $DISPLAY_NAV_THUMB}<br><img src='{$next.derivatives.square->get_url()}' class='thumbLink thumbNav' id='linkPrev' alt=''>{/if}<br><span class='navTitle'>{$next.TITLE}</span></span>"
7       id="icon_right" class="navButton"
8       rel="next"></a>
9  {else}
10    <a id="icon_right_unactive" class="navButton"></a>
11  {/if}{/strip}
12
13{strip}{if isset($slideshow.U_START_PLAY)}
14    <a href="{$slideshow.U_START_PLAY}" title="{'Play of slideshow'|@translate}" id="icon_play" class="navButton" ></a>
15  {/if}{/strip}
16
17{strip}{if isset($slideshow.U_STOP_PLAY)}
18    <a href="{$slideshow.U_STOP_PLAY}" title="{'Pause of slideshow'|@translate}" id="icon_pause" class="navButton" ></a>
19  {/if}{/strip}
20
21{strip}{if isset($U_UP) and !isset($slideshow)}
22    <a href="{$U_UP}" title="{'Thumbnails'|@translate}" rel="up" id="icon_up" class="navButton"></a>
23  {/if}{/strip}
24
25{strip}{if isset($previous)}
26    <a href="{$previous.U_IMG}"
27       title="<span class='navDesc'><span class='navAction'>{'Previous'|@translate}</span>{if $DISPLAY_NAV_THUMB}<br><img src='{$previous.derivatives.square->get_url()}' class='thumbLink' id='linkPrev' alt=''>{/if}<br><span class='navTitle'>{$previous.TITLE}</span></span>"
28       id="icon_left" class="navButton"
29       rel="prev"></a>
30  {else}
31    <a id="icon_left_unactive" class="navButton"></a>
32  {/if}{/strip}
33
34  {if isset($slideshow.U_START_REPEAT)}
35    <a href="{$slideshow.U_START_REPEAT}" title="{'Repeat the slideshow'|@translate}" id="icon_start_repeat" class="navButton" ></a>
36  {/if}
37
38  {if isset($slideshow.U_STOP_REPEAT)}
39    <a href="{$slideshow.U_STOP_REPEAT}" title="{'Not repeat the slideshow'|@translate}" id="icon_stop_repeat" class="navButton" ></a>
40  {/if}
41
42  {if isset($slideshow)}
43    {if isset($slideshow.U_DEC_PERIOD)}
44      <a href="{$slideshow.U_DEC_PERIOD}" title="{'Accelerate diaporama speed'|@translate}" id="icon_dec_period" class="navButton"></a>
45    {else}
46      <a id="icon_dec_period_unactive" class="navButton" ></a>
47    {/if}
48
49    {if isset($slideshow.U_INC_PERIOD)}
50      <a href="{$slideshow.U_INC_PERIOD}" title="{'Reduce diaporama speed'|@translate}" id="icon_inc_period" class="navButton" ></a>
51    {else}
52      <a id="icon_inc_period_unactive" class="navButton"></a>
53    {/if}
54  {/if}
55{/if}
56</div>
57{strip}
58{footer_script}
59document.onkeydown = function(e){ldelim}
60        e=e||window.event;
61  if (e.altKey) return true;
62        var target=e.target||e.srcElement;
63        if (target && target.type) return true;{* an input editable element *}
64        var keyCode=e.keyCode||e.which, docElem=document.documentElement, url;
65        switch(keyCode){ldelim}
66{if isset($next)}
67        case 63235: case 39: if (e.ctrlKey || docElem.scrollLeft==docElem.scrollWidth-docElem.clientWidth)url="{$next.U_IMG}"; break;
68{/if}
69{if isset($previous)}
70        case 63234: case 37: if (e.ctrlKey || docElem.scrollLeft==0)url="{$previous.U_IMG}"; break;
71{/if}
72{if isset($first)}
73        {* Home *}case 36: if (e.ctrlKey)url="{$first.U_IMG}"; break;
74{/if}
75{if isset($last)}
76        {* End *}case 35: if (e.ctrlKey)url="{$last.U_IMG}"; break;
77{/if}
78{if isset($U_UP) and !isset($slideshow)}
79        {* Up *}case 38: if (e.ctrlKey)url="{$U_UP}"; break;
80{/if}
81{if isset($slideshow.U_START_PLAY)}
82        {* Pause *}case 32: url="{$slideshow.U_START_PLAY}"; break;
83{/if}
84{if isset($slideshow.U_STOP_PLAY)}
85        {* Play *}case 32: url="{$slideshow.U_STOP_PLAY}"; break;
86{/if}
87  }
88  if (url) {ldelim}window.location=url.replace("&amp;","&"); return false;}
89  return true;
90}
91{/footer_script}
92{/strip}
Note: See TracBrowser for help on using the repository browser.