fix conflicts in single_photo.tpl
[phpfspot.git] / themes / default / templates / photo_index.tpl
1 <!-- Photo Index -->
2
3 <!-- Header - displays count of matched photos and some link's -->
4
5 <div class="header">
6  <div style="float: left;">
7   <b>Photo Index</b>
8   {if $searchfor }
9    {if $count == 1}
10     {$count} image is the result for your search about "{$searchfor}".
11    {else}
12     {$count} images are the result for your search about "{$searchfor}".
13    {/if}
14   {elseif $tag_result}
15    {if $count == 1}
16     {$count} image has been found for the selected tags.
17    {else}
18     {$count} images have been found for the selected tags.
19    {/if}
20   {else}
21    {if $count == 1}
22     {$count} image has been found.
23    {else}
24     {$count} images have been found.
25    {/if}
26   {/if}
27   {if $from_date && $to_date }
28    <br />
29    Results are limited to a date within {$from_date} to {$to_date}.
30   {/if}
31  </div>
32  <div style="text-align: right">
33   {if $slideshow_link }
34    <a href="{$slideshow_link}" title="Slideshow" target="_blank"><img src="{$web_path}/resources/slideshow.png" />&nbsp;Slideshow</a>
35   {/if}
36   {if $extern_link }
37    <a href="{$extern_link}" title="Use this link to return to the current view"><img src="{$web_path}/resources/link.png" />&nbsp;External Link</a>
38   {/if} 
39   {if $export_link }
40    <a href="{$export_link}" target="_blank" title="this will open a new browser window where you can export this page in several formats"><img src="{$web_path}/resources/export.png" />&nbsp;Export</a>
41   {/if}
42   {if $rss_link }
43    <a href="{$rss_link}" target="_blank" title="RSS feed"><img src="{$web_path}/resources/rss.png" />&nbsp;RSS-Feed</a>
44   {/if}
45  </div>
46 </div>
47
48 <!-- if result of a tag-search is displayed, show the selected tags
49      with some small pictures in a bar. -->
50
51 { if $tag_result }
52 <div id="whiteline" /></div>
53 <div class="subheader">
54  <div style="display: table-cell; vertical-align: middle;">
55  Tags:
56  </div>
57  { $selected_tags }
58 </div>
59 { /if }
60
61 <!-- the photo matrix itself -->
62
63 <div id="index">
64
65  {section name="thumb" loop=$thumbs step=1}
66
67   {if $images[thumb] }
68
69    <div class="thumb" onmouseover="setBackGrdColor(this, 'mouseover');" onmouseout="setBackGrdColor(this, 'mouseout');" style="width: { $thumb_container_width }px; height: { $thumb_container_height }px;">
70     <a href="javascript:showImage({$images[thumb]}, 'scrollup');" id="thumblink{$images[thumb]}" name="image{$img_id[thumb]}" class="thumblink" onclick="click(this);" title="{$img_title[thumb]}">
71      <img class="thumb" id="thumbimg{$images[thumb]}" width="{$img_width[thumb]}" height="{$img_height[thumb]}" />
72      <br />
73     {$img_name[thumb]}
74     </a>
75     { if $use_lightbox }
76     <a href="{$web_path}/phpfspot_img.php?idx={$images[thumb]}&amp;width={$preview_width}" alt="thumb_{$images[thumb]}" rel="lightbox[photoidx]" title="Preview of {$img_fullname[thumb]}"><img src="{$web_path}/resources/eyes.png" /></a>
77     { /if }
78    </div>
79
80   {/if}
81
82  {/section} 
83
84 </div>
85 <br class="clearboth" />
86 <div style="width: 100%; margin-top: 20px;">
87
88  <!-- the right nav arrow -->
89  <div style="float: right; width: 40px; margin-right: 0px; padding-right: 10px;">
90  { if $next_url == "" }
91   { if $count != 0 }
92    <img src="{$web_path}/resources/arrow_right_gray.png" alt="last page reached" />
93   { /if }
94  { else }
95   <a href="{$next_url}" id="next_link" title="click for the next page (right cursor)">
96    <img src="{$web_path}/resources/arrow_right.png" alt="next photo" />
97   </a>
98  { /if}
99  </div>
100
101  <!-- the left nav arrow -->
102  <div style="float: left; margin: 0px; padding-left: 10px; width: 40px;">
103  { if $previous_url == "" }
104   { if $count != 0 }
105    <img src="{$web_path}/resources/arrow_left_gray.png" alt="first page reached" />
106   { /if }
107  { else }
108   <a href="{$previous_url}" id="prev_link" title="click for the previous page (left cursor)">
109   <img src="{$web_path}/resources/arrow_left.png" alt="previous photo" />
110   </a>
111  { /if }
112  </div>
113
114  <!-- the middle page selector -->
115  <div style="text-align: center;">
116  { if $page_selector != "" }
117   {$page_selector}
118  { /if}
119  </div>
120 </div>
121 <br class="clearboth" />
122 <script type="text/javascript" language="JavaScript">
123 <!--
124    /*** image preloading ***/
125    { counter start=-1 }
126
127    var current;
128    var image_urls = new Array();
129    var last_thumb;
130
131    {section name="thumb" loop=$thumbs step=1}
132       {if $images[thumb] }
133          image_urls[{counter}] = '{$web_path}/phpfspot_img.php?idx={$images[thumb]}&width={$width}';
134          last_thumb = {$images[thumb]};
135       {/if}
136    {/section}
137
138    preloadPhotos(image_urls);
139
140    // auto-scroll
141    //
142    // if browser is to far down the page, that he can't see the photo at all
143    // scroll it up so that at least the last photo becomes visisble.
144    { literal }
145
146    var ywnd = 0;
147    var yimg = 0;
148    // check where we are with the browser
149    if (window.pageYOffset) {
150       ywnd = window.pageYOffset;
151    } else if (document.body && document.body.scrollTop) {
152       ywnd = document.body.scrollTop;
153    }
154    // check the y-pos of the last thumbnail
155    if(thumbimg = document.getElementById('thumbimg' + last_thumb)) {
156       yimg = findPos(thumbimg,'top');
157    }
158    // if the browser-window is scrolled further then the last_thumb, scroll back
159    if(ywnd > yimg) {
160       window.scrollTo(0, yimg-100);
161    }
162
163    { /literal }
164    // auto-scroll
165
166 -->
167 </script>
168 <!-- /Photo Index -->