source: trunk/themes/default/template/index.tpl @ 23263

Revision 23263, 8.4 KB checked in by mistic100, 7 years ago (diff)

feature:2785 Improve template method to sort actions buttons
+ add default rank = 50

  • Property svn:eol-style set to LF
Line 
1{$MENUBAR}
2
3{if isset($errors) or isset($infos)}
4<div class="content messages{if isset($MENUBAR)} contentWithMenu{/if}">
5{include file='infos_errors.tpl'}
6</div>
7{/if}
8
9{if !empty($PLUGIN_INDEX_CONTENT_BEFORE)}{$PLUGIN_INDEX_CONTENT_BEFORE}{/if}
10<div id="content" class="content{if isset($MENUBAR)} contentWithMenu{/if}">
11<div class="titrePage{if isset($chronology.TITLE)} calendarTitleBar{/if}">
12        <ul class="categoryActions">
13{if !empty($image_orders)}
14                <li>{strip}<a id="sortOrderLink" title="{'Sort order'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
15                        <span class="pwg-icon pwg-icon-sort">&nbsp;</span><span class="pwg-button-text">{'Sort order'|@translate}</span>
16                </a>
17                <div id="sortOrderBox" class="switchBox">
18                        <div class="switchBoxTitle">{'Sort order'|@translate}</div>
19                        {foreach from=$image_orders item=image_order name=loop}{if !$smarty.foreach.loop.first}<br>{/if}
20                        {if $image_order.SELECTED}
21                        <span>&#x2714; </span>{$image_order.DISPLAY}
22                        {else}
23                        <span style="visibility:hidden">&#x2714; </span><a href="{$image_order.URL}" rel="nofollow">{$image_order.DISPLAY}</a>
24                        {/if}
25                        {/foreach}
26                </div>
27                {footer_script require='jquery'}{literal}
28jQuery("#sortOrderLink").click(function() {
29        var elt = jQuery("#sortOrderBox");
30        elt.css("left", Math.min( jQuery(this).offset().left, jQuery(window).width() - elt.outerWidth(true) - 5))
31                .css("top", jQuery(this).offset().top + jQuery(this).outerHeight(true))
32                .toggle();
33});
34jQuery("#sortOrderBox").on("mouseleave", function() {
35        jQuery(this).hide();
36});
37                {/literal}{/footer_script}
38                {/strip}</li>
39{/if}
40{if !empty($image_derivatives)}
41                <li>{strip}<a id="derivativeSwitchLink" title="{'Photo sizes'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
42                        <span class="pwg-icon pwg-icon-sizes">&nbsp;</span><span class="pwg-button-text">{'Photo sizes'|@translate}</span>
43                </a>
44                <div id="derivativeSwitchBox" class="switchBox">
45                        <div class="switchBoxTitle">{'Photo sizes'|@translate}</div>
46                        {foreach from=$image_derivatives item=image_derivative name=loop}{if !$smarty.foreach.loop.first}<br>{/if}
47                        {if $image_derivative.SELECTED}
48                        <span>&#x2714; </span>{$image_derivative.DISPLAY}
49                        {else}
50                        <span style="visibility:hidden">&#x2714; </span><a href="{$image_derivative.URL}" rel="nofollow">{$image_derivative.DISPLAY}</a>
51                        {/if}
52                        {/foreach}
53                </div>
54                {footer_script require='jquery'}{literal}
55jQuery("#derivativeSwitchLink").click(function() {
56        var elt = jQuery("#derivativeSwitchBox");
57        elt.css("left", Math.min( jQuery(this).offset().left, jQuery(window).width() - elt.outerWidth(true) - 5))
58                .css("top", jQuery(this).offset().top + jQuery(this).outerHeight(true))
59                .toggle();
60});
61jQuery("#derivativeSwitchBox").on("mouseleave", function() {
62        jQuery(this).hide();
63});
64                {/literal}{/footer_script}
65                {/strip}</li>
66{/if}
67
68{if isset($favorite)}
69                <li><a href="{$favorite.U_FAVORITE}" title="{'delete all photos from your favorites'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
70                        <span class="pwg-icon pwg-icon-favorite-del">&nbsp;</span><span class="pwg-button-text">{'delete all photos from your favorites'|@translate}</span>
71                </a></li>
72{/if}
73{if isset($U_CADDIE)}
74                <li><a href="{$U_CADDIE}" title="{'Add to caddie'|@translate}" class="pwg-state-default pwg-button">
75                        <span class="pwg-icon pwg-icon-caddie-add">&nbsp;</span><span class="pwg-button-text">{'Caddie'|@translate}</span>
76                </a></li>
77{/if}
78{if isset($U_EDIT)}
79                <li><a href="{$U_EDIT}" title="{'Edit album'|@translate}" class="pwg-state-default pwg-button">
80                        <span class="pwg-icon pwg-icon-category-edit">&nbsp;</span><span class="pwg-button-text">{'Edit'|@translate}</span>
81                </a></li>
82{/if}
83{if isset($U_SEARCH_RULES)}
84                {combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'}
85                <li><a href="{$U_SEARCH_RULES}" onclick="popuphelp(this.href); return false;" title="{'Search rules'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
86                        <span class="pwg-icon pwg-icon-help">&nbsp;</span><span class="pwg-button-text">(?)</span>
87                </a></li>
88{/if}
89{if isset($U_SLIDESHOW)}
90                <li>{strip}<a href="{$U_SLIDESHOW}" title="{'slideshow'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
91                        <span class="pwg-icon pwg-icon-slideshow">&nbsp;</span><span class="pwg-button-text">{'slideshow'|@translate}</span>
92                </a>{/strip}</li>
93{/if}
94{if isset($U_MODE_FLAT)}
95                <li>{strip}<a href="{$U_MODE_FLAT}" title="{'display all photos in all sub-albums'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
96                        <span class="pwg-icon pwg-icon-category-view-flat">&nbsp;</span><span class="pwg-button-text">{'display all photos in all sub-albums'|@translate}</span>
97                </a>{/strip}</li>
98{/if}
99{if isset($U_MODE_NORMAL)}
100                <li>{strip}<a href="{$U_MODE_NORMAL}" title="{'return to normal view mode'|@translate}" class="pwg-state-default pwg-button">
101                        <span class="pwg-icon pwg-icon-category-view-normal">&nbsp;</span><span class="pwg-button-text">{'return to normal view mode'|@translate}</span>
102                </a>{/strip}</li>
103{/if}
104{if isset($U_MODE_POSTED)}
105                <li>{strip}<a href="{$U_MODE_POSTED}" title="{'display a calendar by posted date'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
106                        <span class="pwg-icon pwg-icon-calendar">&nbsp;</span><span class="pwg-button-text">{'Calendar'|@translate}</span>
107                </a>{/strip}</li>
108{/if}
109{if isset($U_MODE_CREATED)}
110                <li>{strip}<a href="{$U_MODE_CREATED}" title="{'display a calendar by creation date'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
111                        <span class="pwg-icon pwg-icon-camera-calendar">&nbsp;</span><span class="pwg-button-text">{'Calendar'|@translate}</span>
112                </a>{/strip}</li>
113{/if}
114{foreach from=$PLUGIN_INDEX_BUTTONS item=button}<li>{$button}</li>{/foreach}
115{if !empty($PLUGIN_INDEX_ACTIONS)}{$PLUGIN_INDEX_ACTIONS}{/if}
116        </ul>
117
118<h2>{$TITLE}</h2>
119
120{if isset($chronology_views)}
121<div class="calendarViews">{'View'|@translate}:
122        <a id="calendarViewSwitchLink" href="javascript:toggleCalendarViewsBox()">
123        {foreach from=$chronology_views item=view}{if $view.SELECTED}{$view.CONTENT}{/if}{/foreach}
124        </a>
125        <div id="calendarViewSwitchBox" class="switchBox">
126                {foreach from=$chronology_views item=view name=loop}{if !$smarty.foreach.loop.first}<br>{/if}
127                <span{if !$view.SELECTED} style="visibility:hidden"{/if}>&#x2714; </span><a href="{$view.VALUE}">{$view.CONTENT}</a>
128                {/foreach}
129        </div>
130        {footer_script require='jquery'}{literal}
131function toggleCalendarViewsBox() {
132        var elt = jQuery("#calendarViewSwitchBox")
133                , ePos = jQuery("#calendarViewSwitchLink");
134        elt.css("left", Math.min( ePos.offset().left, jQuery(window).width() - elt.outerWidth(true) - 5))
135                .css("top", ePos.offset().top + ePos.outerHeight(true))
136                .toggle();
137};
138jQuery("#calendarViewSwitchBox").on("mouseleave", function() {
139        jQuery(this).hide();
140});
141        {/literal}{/footer_script}
142</div>
143{/if}
144
145{if isset($chronology.TITLE)}
146<h2 class="calendarTitle">{$chronology.TITLE}</h2>
147{/if}
148
149</div>{* <!-- titrePage --> *}
150
151{if !empty($PLUGIN_INDEX_CONTENT_BEGIN)}{$PLUGIN_INDEX_CONTENT_BEGIN}{/if}
152
153{if !empty($category_search_results)}
154<div class="category_search_results">{'Album results for'|@translate} <strong>{$QUERY_SEARCH}</strong> :
155        <em><strong>
156        {foreach from=$category_search_results item=res name=res_loop}
157        {if !$smarty.foreach.res_loop.first} &mdash; {/if}
158        {$res}
159        {/foreach}
160        </strong></em>
161</div>
162{/if}
163
164{if !empty($tag_search_results)}
165<div class="tag_search_results">{'Tag results for'|@translate} <strong>{$QUERY_SEARCH}</strong> :
166        <em><strong>
167        {foreach from=$tag_search_results item=tag name=res_loop}
168        {if !$smarty.foreach.res_loop.first} &mdash; {/if} <a href="{$tag.URL}">{$tag.name}</a>
169        {/foreach}
170        </strong></em>
171</div>
172{/if}
173
174{if isset($FILE_CHRONOLOGY_VIEW)}
175{include file=$FILE_CHRONOLOGY_VIEW}
176{/if}
177
178{if !empty($CONTENT_DESCRIPTION)}
179<div class="additional_info">
180        {$CONTENT_DESCRIPTION}
181</div>
182{/if}
183
184{if !empty($CATEGORIES)}{$CATEGORIES}{/if}
185{if !empty($cats_navbar)}
186        {include file='navigation_bar.tpl'|@get_extent:'navbar' navbar=$cats_navbar}
187{/if}
188
189{if !empty($THUMBNAILS)}
190<div class="loader"><img src="{$ROOT_URL}{$themeconf.img_dir}/ajax_loader.gif"></div>
191<ul class="thumbnails" id="thumbnails">
192  {$THUMBNAILS}
193</ul>
194{/if}
195{if !empty($thumb_navbar)}
196        {include file='navigation_bar.tpl'|@get_extent:'navbar' navbar=$thumb_navbar}
197{/if}
198
199{if !empty($PLUGIN_INDEX_CONTENT_END)}{$PLUGIN_INDEX_CONTENT_END}{/if}
200</div>{* <!-- content --> *}
201{if !empty($PLUGIN_INDEX_CONTENT_AFTER)}{$PLUGIN_INDEX_CONTENT_AFTER}{/if}
Note: See TracBrowser for help on using the repository browser.