source: extensions/UserCollections/template/thumbnails.tpl @ 20090

Last change on this file since 20090 was 20090, checked in by mistic100, 11 years ago
  • add webservices
  • add mail function
  • add admin list
  • add admin export function
  • try to deal with Gthumb+
  • activate multisize dropdown menu of collection page

TODO : use webservices instead of toggle_image.php

File size: 3.0 KB
Line 
1{combine_script id='jquery.colorbox' load='footer' require='jquery' path='themes/default/js/plugins/jquery.colorbox.min.js'}
2{combine_css path="themes/default/js/plugins/colorbox/style2/colorbox.css"}
3
4{footer_script}
5jQuery("a.preview-box").colorbox({ldelim}
6  rel: ".preview-box",
7  title: function() {ldelim}
8    var title = $(this).attr("title");
9    {if $F_ACTION} title+= ' · <a href="{$collection_toggle_url}&amp;collection_toggle='+ $(this).data('id') +'" class="addCollection" data-id="'+ $(this).data('id') +'">{'Remove from collection'|@translate}</a>';{/if}
10    title+= ' · <a href="'+ $(this).data('url') +'" target="_blank">{'jump to photo'|@translate} →</a>';
11    return  title;
12  }
13});
14jQuery(document).on("click", "#cboxTitle .addCollection", function() {ldelim}
15  jQuery.colorbox.close();
16  jQuery("#thumbnails a.addCollection[data-id='"+ $(this).data('id')+"']").trigger("click");
17  return false;
18});
19{/footer_script}
20
21{if !empty($thumbnails)}{strip}
22{*define_derivative name='derivative_params' width=160 height=90 crop=true*}
23{html_style}
24{*Set some sizes according to maximum thumbnail width and height*}
25.thumbnails SPAN,
26.thumbnails .wrap2 A,
27.thumbnails LABEL{ldelim}
28        width: {$derivative_params->max_width()+2}px;
29}
30
31.thumbnails .wrap2{ldelim}
32        height: {$derivative_params->max_height()+3}px;
33}
34{if $derivative_params->max_width() > 600}
35.thumbLegend {ldelim}font-size: 130%}
36{else}
37{if $derivative_params->max_width() > 400}
38.thumbLegend {ldelim}font-size: 110%}
39{else}
40.thumbLegend {ldelim}font-size: 90%}
41{/if}
42{/if}
43{/html_style}
44{foreach from=$thumbnails item=thumbnail}
45{assign var=derivative value=$pwg->derivative($derivative_params, $thumbnail.src_image)}
46{if !$derivative->is_cached()}
47{combine_script id='jquery.ajaxmanager' path='themes/default/js/plugins/jquery.ajaxmanager.js' load='footer'}
48{combine_script id='thumbnails.loader' path='themes/default/js/thumbnails.loader.js' require='jquery.ajaxmanager' load='footer'}
49{/if}
50<li>
51        <span class="wrap1">
52                <span class="wrap2">
53                <a href="{$thumbnail.FILE_SRC}" class="preview-box" title="{$thumbnail.NAME}" data-url="{$thumbnail.URL}" data-id="{$thumbnail.id}">
54                        <img class="thumbnail" {if $derivative->is_cached()}src="{$derivative->get_url()}"{else}src="{$ROOT_URL}{$themeconf.img_dir}/ajax-loader-small.gif" data-src="{$derivative->get_url()}"{/if} alt="{$thumbnail.TN_ALT}" title="{$thumbnail.TN_TITLE}">
55                </a>
56                </span>
57                {if $SHOW_THUMBNAIL_CAPTION }
58                <span class="thumbLegend">
59                <span class="thumbName">{$thumbnail.NAME}</span>
60                {if !empty($thumbnail.icon_ts)}
61                <img title="{$thumbnail.icon_ts.TITLE}" src="{$ROOT_URL}{$themeconf.icon_dir}/recent.png" alt="(!)">
62                {/if}
63                {if isset($thumbnail.NB_COMMENTS)}
64                <span class="{if 0==$thumbnail.NB_COMMENTS}zero {/if}nb-comments">
65                <br>
66                {$pwg->l10n_dec('%d comment', '%d comments',$thumbnail.NB_COMMENTS)}
67                </span>
68                {/if}
69
70                {if isset($thumbnail.NB_HITS)}
71                <span class="{if 0==$thumbnail.NB_HITS}zero {/if}nb-hits">
72                <br>
73                {$pwg->l10n_dec('%d hit', '%d hits',$thumbnail.NB_HITS)}
74                </span>
75                {/if}
76                </span>
77                {/if}
78        </span>
79        </li>
80{/foreach}{/strip}
81{/if}
Note: See TracBrowser for help on using the repository browser.