source: extensions/akBookStyle/trunk/template/ak_thumbnails.tpl @ 3781

Last change on this file since 3781 was 3781, checked in by vdigital, 15 years ago

First version of ak_loader.php

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Author Date Id Revision
File size: 3.1 KB
Line 
1{* variables to be set
2 => by plugin:
3 $AK_BY_LINE : thumbnails columns
4 $thumbnails[*]['AK_URL']): additional url to reloader ./picloader.php?cat=xx/yyy
5 $AK_NAV_PREV (explode($NAV_BAR)): url to previous index (save it in session)
6 $AK_NAV_NEXT (explode($NAV_BAR)): url to next index (save it in session)
7 Save all current image ids in session to reduce the reloader workload.
8 
9 => by plugin and reloader:
10 $AK_PIC_SRC : src of new current pic
11 $AK_PIC_ALT : alt of new current pic
12 $AK_PIC_TITLE : title of new current pic
13 
14 $AK_PREVIOUS['U_PIC'] : additional url to reloader of previous pic
15         (or url to previous index, taken from session)
16 $AK_PREVIOUS['load'] = if reloadable 'load ' else ''
17 $AK_PREVIOUS['TITLE'] : title of previous pic
18 
19 $AK_NEXT['U_PIC'] : additional url to reloader of next pic
20         (or url to next index, taken from session)
21 $AK_NEXT['load'] = if reloadable 'load ' else ''
22 $AK_NEXT['TITLE'] : title of next pic
23*}
24
25{* all the following code will be splitted in different includes *}
26
27{if !empty($thumbnails)}
28<table class="ak_display"> 
29  <tr>
30    <td>
31
32      <table class="thumbnails">
33        {foreach from=$thumbnails item=thumbnail name=tn}
34        {if $smarty.foreach.tn.index % $AK_BY_LINE == 0}
35        <tr class="nline">
36          {/if}
37          <td class="ncol">
38            <a href="{$thumbnail.URL}" class="load">
39              <img class="thumbnail" src="{$thumbnail.TN_SRC}"
40             alt="{$thumbnail.TN_ALT}" title="{$thumbnail.TN_TITLE}">
41            </a>
42          </td>
43        {if ($smarty.foreach.tn.iteration % $AK_BY_LINE == 0) or $smarty.foreach.tn.last }
44        </tr>
45        {/if}
46        {/foreach}
47       
48        {if !empty($NAV_BAR) } {* thumbnails navigation bar *}
49        <tr class="nline">
50          <td class="left">
51            {if isset($AK_NAV_PREV)}
52            <a class="navButton" href="{$AK_NAV_PREV}"
53               title="{'previous_page'|@translate}">
54              <img src="{$ROOT_URL}{$themeconf.icon_dir}/left.png"
55             class="button" alt="{'previous_page'|@translate}">
56            </a>
57            {/if}
58          </td>
59          <td class="right">
60            {if isset($AK_NAV_NEXT)}
61            <a class="navButton" href="{$AK_NAV_NEXT}"
62               title="{'next_page'|@translate}">
63              <img src="{$ROOT_URL}{$themeconf.icon_dir}/right.png"
64             class="button" alt="{'next_page'|@translate}">
65            </a>
66            {/if}
67          </td>
68        </tr>
69        {/if}
70      </table> {* end of Thumbnails *}
71
72    </td>
73   
74    <td> <!-- Picture -->
75      {include file=$AK_RELOADED_IMAGE_TPL|@get_extent:'picture_reload'}
76    </td>
77  </tr>
78</table>
79{/if}
80
81{known_script id="jquery" src=$ROOT_URL|cat:"template-common/lib/jquery.packed.js"}
82{html_head}
83<link rel="stylesheet" type="text/css" href="{$AK_PLUGIN_CSS}/ak_style.css">
84{literal}
85<script type="text/javascript">// <![CDATA[
86$(document).ready(function() {
87  $("a.load")
88  .click(function() {
89  $("#reload").load(this.href+"/reload");
90    return false;
91  });
92});
93 // ]]>
94</script>
95{/literal}
96{/html_head}
Note: See TracBrowser for help on using the repository browser.