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

Last change on this file since 3791 was 3791, checked in by nikrou, 15 years ago

Allow admin to change number of column
Use $confdir_thumbnail and $confprefix_thumbnail in ak_jquery-load.js for replace('thumbnail\/TN-', )

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Author Date Id Revision
File size: 3.0 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      <table class="thumbnails">
32        {foreach from=$thumbnails item=thumbnail name=tn}
33        {if $smarty.foreach.tn.index % $AK_BY_LINE == 0}
34        <tr class="nline">
35          {/if}
36          <td class="ncol">
37            <a href="{$thumbnail.AK_URL}" class="load">
38              <img class="thumbnail" src="{$thumbnail.TN_SRC}"
39             alt="{$thumbnail.TN_ALT}" title="{$thumbnail.TN_TITLE}">
40            </a>
41          </td>
42        {if ($smarty.foreach.tn.iteration % $AK_BY_LINE == 0) or $smarty.foreach.tn.last }
43        </tr>
44        {/if}
45        {/foreach}
46       
47        {if !empty($NAV_BAR) } {* thumbnails navigation bar *}
48        <tr class="nline">
49          <td class="left">
50            {if isset($AK_NAV_PREV)}
51            <a class="navButton" href="{$AK_NAV_PREV}"
52               title="{'previous_page'|@translate}">
53              <img src="{$ROOT_URL}{$themeconf.icon_dir}/left.png"
54             class="button" alt="{'previous_page'|@translate}">
55            </a>
56            {/if}
57          </td>
58          <td class="right">
59            {if isset($AK_NAV_NEXT)}
60            <a class="navButton" href="{$AK_NAV_NEXT}"
61               title="{'next_page'|@translate}">
62              <img src="{$ROOT_URL}{$themeconf.icon_dir}/right.png"
63             class="button" alt="{'next_page'|@translate}">
64            </a>
65            {/if}
66          </td>
67        </tr>
68        {/if}
69      </table> {* end of Thumbnails *}
70
71    </td>
72   
73    <td> {* Picture *}
74      {include file=$AK_RELOADED_IMAGE_TPL|@get_extent:'picture_reload'}
75    </td>
76  </tr>
77</table>
78{/if}
79
80{known_script id="jquery" src=$ROOT_URL|cat:"template-common/lib/jquery.packed.js"}
81{html_head}
82<link rel="stylesheet" type="text/css" href="{$AK_PLUGIN_CSS}/ak_style.css">
83<script type="text/javascript">
84var dir_thumbnail = '{$AK_DIR_THUMBNAIL}';prefix_thumbnail = '{$AK_PREFIX_THUMBNAIL}';
85</script>
86<script type="text/javascript" src="{$AK_PLUGIN_JS}/ak_jquery-load.js"></script>
87{/html_head}
Note: See TracBrowser for help on using the repository browser.