refix some introduced template-errors in the HTML code
[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 class="subheader">
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 class="textright">
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 <!-- seperator -->
53 <div class="tagresult"></div>
54 <!-- /seperator -->
55 <div class="subheader">
56  <div class="tagresulttags">
57   Tags:
58  </div>
59  { $selected_tags }
60 </div>
61 { /if }
62
63 <!-- the photo matrix itself -->
64
65 <div id="index">
66
67  {section name="thumb" loop=$thumbs step=1}
68
69   {if $images[thumb] }
70
71    <div class="thumb" onmouseover="setBackGrdColor(this, 'mouseover');" onmouseout="setBackGrdColor(this, 'mouseout');" style="width: { $thumb_container_width }px; height: { $thumb_container_height }px;">
72     <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]}">
73      <img class="thumb" id="thumbimg{$images[thumb]}" width="{$img_width[thumb]}" height="{$img_height[thumb]}" />
74      <br />
75     {$img_name[thumb]}
76     </a>
77     { if $use_lightbox }
78     <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>
79     { /if }
80    </div>
81
82   {/if}
83
84  {/section} 
85
86 </div>
87 <br class="clearboth" />
88 <div class="indexnavigation">
89
90  <!-- the right nav arrow -->
91  <div class="indexnavigationright">
92  { if $next_url == "" }
93   { if $count != 0 }
94    <img src="{$web_path}/resources/arrow_right_gray.png" alt="last page reached" />
95   { /if }
96  { else }
97   <a href="{$next_url}" id="next_link" title="click for the next page (right cursor)">
98    <img src="{$web_path}/resources/arrow_right.png" alt="next photo" />
99   </a>
100  { /if}
101  </div>
102
103  <!-- the left nav arrow -->
104  <div class="indexnavigationleft">
105  { if $previous_url == "" }
106   { if $count != 0 }
107    <img src="{$web_path}/resources/arrow_left_gray.png" alt="first page reached" />
108   { /if }
109  { else }
110   <a href="{$previous_url}" id="prev_link" title="click for the previous page (left cursor)">
111   <img src="{$web_path}/resources/arrow_left.png" alt="previous photo" />
112   </a>
113  { /if }
114  </div>
115
116  <!-- the middle page selector -->
117  <div class="indexnavigationcenter">
118  { if $page_selector != "" }
119   {$page_selector}
120  { /if}
121  </div>
122 </div>
123 <br class="clearboth" />
124 <script type="text/javascript" language="JavaScript">
125 <!--
126    /*** image preloading ***/
127    { counter start=-1 }
128
129    var current;
130    var image_urls = new Array();
131    var last_thumb;
132
133    {section name="thumb" loop=$thumbs step=1}
134       {if $images[thumb] }
135          image_urls[{counter}] = '{$web_path}/phpfspot_img.php?idx={$images[thumb]}&width={$width}';
136          last_thumb = {$images[thumb]};
137       {/if}
138    {/section}
139
140    preloadPhotos(image_urls);
141
142    // auto-scroll
143    //
144    // if browser is to far down the page, that he can't see the photo at all
145    // scroll it up so that at least the last photo becomes visisble.
146    { literal }
147
148    var ywnd = 0;
149    var yimg = 0;
150    // check where we are with the browser
151    if (window.pageYOffset) {
152       ywnd = window.pageYOffset;
153    } else if (document.body && document.body.scrollTop) {
154       ywnd = document.body.scrollTop;
155    }
156    // check the y-pos of the last thumbnail
157    if(thumbimg = document.getElementById('thumbimg' + last_thumb)) {
158       yimg = findPos(thumbimg,'top');
159    }
160    // if the browser-window is scrolled further then the last_thumb, scroll back
161    if(ywnd > yimg) {
162       window.scrollTo(0, yimg-100);
163    }
164
165    { /literal }
166    // auto-scroll
167
168 -->
169 </script>
170 <!-- /Photo Index -->