in phpfspot we talk about photos not images
[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="header_title">
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="header_menu">
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="tagresulttags" style="float: left;">
56   Tags:
57  </div>
58  <div class="tagresulttags">
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     { if $user_friendly_url }
73     <a href="{$web_path}/photoview/{$images[thumb]}" onclick="showPhoto({$images[thumb]}, 'scrollup'); return false;" id="thumblink{$images[thumb]}" name="image{$img_id[thumb]}" class="thumblink" onfocus="click(this);" title="{$img_title[thumb]}">
74     { else }
75     <a href="{$web_path}/index.php?mode=showp&amp;id={$images[thumb]}" onclick="showPhoto({$images[thumb]}, 'scrollup'); return false;" id="thumblink{$images[thumb]}" name="image{$img_id[thumb]}" class="thumblink" onfocus="click(this);" title="{$img_title[thumb]}">
76     { /if }
77      <img class="thumb" id="thumbimg{$images[thumb]}" width="{$img_width[thumb]}" height="{$img_height[thumb]}" src="{$web_path}/phpfspot_img.php?idx={$images[thumb]}&width={$width}" />
78      <br />
79     {$img_name[thumb]}
80     </a>
81     { if $use_lightbox }
82     <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>
83     { /if }
84    </div>
85
86   {/if}
87
88  {/section} 
89
90 </div>
91 <br class="cb" />
92 <div class="indexnavigation">
93
94  <!-- the right nav arrow -->
95  <div class="indexnavigationright">
96  { if $next_url == "" }
97   { if $count != 0 }
98    <img src="{$web_path}/resources/arrow_right_gray.png" alt="last page reached" />
99   { /if }
100  { else }
101   <a href="{$next_url}" id="next_link" title="click for the next page (right cursor)">
102    <img src="{$web_path}/resources/arrow_right.png" alt="next photo" />
103   </a>
104  { /if}
105  </div>
106
107  <!-- the left nav arrow -->
108  <div class="indexnavigationleft">
109  { if $previous_url == "" }
110   { if $count != 0 }
111    <img src="{$web_path}/resources/arrow_left_gray.png" alt="first page reached" />
112   { /if }
113  { else }
114   <a href="{$previous_url}" id="prev_link" title="click for the previous page (left cursor)">
115   <img src="{$web_path}/resources/arrow_left.png" alt="previous photo" />
116   </a>
117  { /if }
118  </div>
119
120  <!-- the middle page selector -->
121  <div class="indexnavigationcenter">
122  { if $page_selector != "" }
123   {$page_selector}
124  { /if}
125  </div>
126 </div>
127 <br class="cb" />
128 <script type="text/javascript" language="JavaScript">
129 <!--
130    /*** image preloading ***/
131    { counter start=-1 }
132
133    var current;
134    var image_urls = new Array();
135    var last_thumb;
136
137    {section name="thumb" loop=$thumbs step=1}
138       {if $images[thumb] }
139          image_urls[{counter}] = '{$web_path}/phpfspot_img.php?idx={$images[thumb]}&width={$width}';
140          last_thumb = {$images[thumb]};
141       {/if}
142    {/section}
143
144    preloadPhotos(image_urls);
145
146    // auto-scroll
147    //
148    // if browser is to far down the page, that he can't see the photo at all
149    // scroll it up so that at least the last photo becomes visisble.
150    { literal }
151
152    var ywnd = 0;
153    var yimg = 0;
154    // check where we are with the browser
155    if (window.pageYOffset) {
156       ywnd = window.pageYOffset;
157    } else if (document.body && document.body.scrollTop) {
158       ywnd = document.body.scrollTop;
159    }
160    // check the y-pos of the last thumbnail
161    if(thumbimg = document.getElementById('thumbimg' + last_thumb)) {
162       yimg = findPos(thumbimg,'top');
163    }
164    // if the browser-window is scrolled further then the last_thumb, scroll back
165    if(ywnd > yimg) {
166       window.scrollTo(0, yimg-100);
167    }
168
169    { /literal }
170    // auto-scroll
171
172 -->
173 </script>
174 <!-- /Photo Index -->