source: trunk/themes/default/template/picture_nav_buttons.tpl @ 8299

Last change on this file since 8299 was 8299, checked in by rvelices, 10 years ago
  • simplified inneficient css rules
  • template language key
  • group picture scripts on the bottom of the page
  • Property svn:eol-style set to LF
File size: 5.5 KB
Line 
1<div class="navigationButtons">
2{if $DISPLAY_NAV_BUTTONS or isset($slideshow)}
3{if isset($slideshow)}
4{if isset($slideshow.U_INC_PERIOD)}
5        <a href="{$slideshow.U_INC_PERIOD}" title="{'Accelerate diaporama speed'|@translate}" class="pwg-state-default pwg-button">
6                <span class="pwg-icon pwg-icon-clock-minus">&nbsp;</span><span class="pwg-button-text">{'Accelerate diaporama speed'|@translate}</span>
7        </a>
8{else}
9        <span class="pwg-state-disabled pwg-button">
10                <span class="pwg-icon pwg-icon-clock-minus">&nbsp;</span><span class="pwg-button-text">{'Accelerate diaporama speed'|@translate}</span>
11        </span>
12{/if}
13{if isset($slideshow.U_DEC_PERIOD)}
14        <a href="{$slideshow.U_DEC_PERIOD}" title="{'Accelerate diaporama speed'|@translate}" class="pwg-state-default pwg-button">
15                <span class="pwg-icon pwg-icon-clock-plus">&nbsp;</span><span class="pwg-button-text">{'Accelerate diaporama speed'|@translate}</span>
16        </a>
17{else}
18        <span class="pwg-state-disabled pwg-button">
19                <span class="pwg-icon pwg-icon-clock-plus">&nbsp;</span><span class="pwg-button-text">{'Accelerate diaporama speed'|@translate}</span>
20        </span>
21{/if}
22{/if}
23{if isset($slideshow.U_START_REPEAT)}
24        <a href="{$slideshow.U_START_REPEAT}" title="{'Repeat the slideshow'|@translate}" class="pwg-state-default pwg-button">
25                <span class="pwg-icon pwg-icon-repeat-play">&nbsp;</span><span class="pwg-button-text">{'Repeat the slideshow'|@translate}</span>
26        </a>
27{/if}
28{if isset($slideshow.U_STOP_REPEAT)}
29        <a href="{$slideshow.U_STOP_REPEAT}" title="{'Not repeat the slideshow'|@translate}" class="pwg-state-default pwg-button">
30                <span class="pwg-icon pwg-icon-repeat-stop">&nbsp;</span><span class="pwg-button-text">{'Not repeat the slideshow'|@translate}</span>
31        </a>
32{/if}
33{if isset($first)}
34        <a href="{$first.U_IMG}" title="{'First'|@translate} : {$first.TITLE}" class="pwg-state-default pwg-button">
35                <span class="pwg-icon pwg-icon-arrowstop-w">&nbsp;</span><span class="pwg-button-text">{'First'|@translate}</span>
36        </a>
37{else}
38        <span class="pwg-state-disabled pwg-button">
39                <span class="pwg-icon pwg-icon-arrowstop-w">&nbsp;</span><span class="pwg-button-text">{'First'|@translate}</span>
40        </span>
41{/if}
42{if isset($previous)}
43        <a href="{$previous.U_IMG}" title="{'Previous'|@translate} : {$previous.TITLE}" class="pwg-state-default pwg-button">
44                <span class="pwg-icon pwg-icon-arrow-w">&nbsp;</span><span class="pwg-button-text">{'Previous'|@translate}</span>
45        </a>
46{else}
47        <span class="pwg-state-disabled pwg-button">
48                <span class="pwg-icon pwg-icon-arrow-w">&nbsp;</span><span class="pwg-button-text">{'Previous'|@translate}</span>
49        </span>
50{/if}
51{if isset($slideshow.U_START_PLAY)}
52        <a href="{$slideshow.U_START_PLAY}" title="{'Play of slideshow'|@translate}" class="pwg-state-default pwg-button">
53                <span class="pwg-icon pwg-icon-play">&nbsp;</span><span class="pwg-button-text">{'Play of slideshow'|@translate}</span>
54        </a>
55{/if}
56{if isset($slideshow.U_STOP_PLAY)}
57        <a href="{$slideshow.U_STOP_PLAY}" title="{'Pause of slideshow'|@translate}" class="pwg-state-default pwg-button">
58                <span class="pwg-icon pwg-icon-pause">&nbsp;</span><span class="pwg-button-text">{'Pause of slideshow'|@translate}</span>
59        </a>
60{/if}
61{if isset($U_UP) and !isset($slideshow)}
62        <a href="{$U_UP}" title="{'Thumbnails'|@translate}" class="pwg-state-default pwg-button">
63                <span class="pwg-icon pwg-icon-arrow-n">&nbsp;</span><span class="pwg-button-text">{'Thumbnails'|@translate}</span>
64        </a>
65{/if}
66{if isset($next)}
67        <a href="{$next.U_IMG}" title="{'Next'|@translate} : {$next.TITLE}" class="pwg-state-default pwg-button pwg-button-icon-right">
68                <span class="pwg-icon pwg-icon-arrow-e">&nbsp;</span><span class="pwg-button-text">{'Next'|@translate}</span>
69        </a>
70{else}
71        <span class="pwg-state-disabled pwg-button pwg-button-icon-right">
72                <span class="pwg-icon pwg-icon-arrow-e">&nbsp;</span><span class="pwg-button-text">{'Next'|@translate}</span>
73        </span>
74{/if}
75{if isset($last)}
76        <a href="{$last.U_IMG}" title="{'Last'|@translate} : {$last.TITLE}" class="pwg-state-default pwg-button pwg-button-icon-right">
77                <span class="pwg-icon pwg-icon-arrowstop-e"></span><span class="pwg-button-text">{'Last'|@translate}</span>
78        </a>
79{else}
80        <span class="pwg-state-disabled pwg-button pwg-button-icon-right">
81                <span class="pwg-icon pwg-icon-arrowstop-e">&nbsp;</span><span class="pwg-button-text">{'Last'|@translate}</span>
82        </span>
83{/if}
84{/if}
85</div>
86
87{footer_script}{literal}
88document.onkeydown = function(e)
89{
90        e=e||window.event;
91        if (e.altKey) return true;
92        var target = e.target||e.srcElement;
93        if (target && target.type) return true; //an input editable element
94        var keyCode = e.keyCode||e.which;
95        var docElem = document.documentElement;
96        var url;
97        switch(keyCode) {
98{/literal}
99{if isset($next)}
100        case 63235: case 39: if (e.ctrlKey || docElem.scrollLeft==docElem.scrollWidth-docElem.clientWidth)url="{$next.U_IMG}";  break;
101{/if}
102{if isset($previous)}
103        case 63234: case 37: if (e.ctrlKey || docElem.scrollLeft==0)url="{$previous.U_IMG}"; break;
104{/if}
105{if isset($first)}
106        /*Home*/case 36: if (e.ctrlKey)url="{$first.U_IMG}"; break;
107{/if}
108{if isset($last)}
109        /*End*/case 35: if (e.ctrlKey)url="{$last.U_IMG}"; break;
110{/if}
111{if isset($U_UP) and !isset($slideshow)}
112        /*Up*/case 38: if (e.ctrlKey)url="{$U_UP}"; break;
113{/if}
114{if isset($slideshow.U_START_PLAY)}
115        /*Pause*/case 32: url="{$slideshow.U_START_PLAY}"; break;
116{/if}
117{if isset($slideshow.U_STOP_PLAY)}
118        /*Play*/case 32: url="{$slideshow.U_STOP_PLAY}"; break;
119{/if}
120        }
121        if (url) {ldelim}window.location=url.replace("&amp;","&"); return false;}
122        return true;
123}
124{/footer_script}
Note: See TracBrowser for help on using the repository browser.