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

Revision 3764, 2.8 KB checked in by nikrou, 11 years ago (diff)

Reorganize files (template, css, js, ...)
wip : plugin management

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