source: extensions/luciano/template/picture.tpl @ 26003

Last change on this file since 26003 was 18606, checked in by plg, 12 years ago

add class imageComment

File size: 5.8 KB
Line 
1{if !empty($PLUGIN_PICTURE_BEFORE)}{$PLUGIN_PICTURE_BEFORE}{/if}
2
3{include file='picture_nav_keys.tpl'|@get_extent:'picture_nav_keys'}
4
5<div id="imageHeaderBar">
6    <div class="browsePath">
7      {$SECTION_TITLE}
8      {$LEVEL_SEPARATOR}{$current.TITLE}
9    </div>
10  <div class="imageNumber">{$PHOTO}</div>
11  <ul class="randomButtons">
12    {if isset($U_SLIDESHOW_START)               }<li><a href="{$U_SLIDESHOW_START}" title="{'slideshow'|@translate}" id="bn-slideshowPlay" rel="nofollow">{'slideshow'|@translate}</a></li>{/if}
13    {if isset($U_SLIDESHOW_STOP)                }<li><a href="{$U_SLIDESHOW_STOP}" title="{'slideshow_stop'|@translate}" id="bn-slideshowStop" rel="nofollow">{'slideshow_stop'|@translate}</a></li>{/if}
14    {if isset($PLUGIN_PICTURE_ACTIONS)  }<li>{$PLUGIN_PICTURE_ACTIONS}</li>{/if}
15    {if isset($favorite)                                }<li><a href="{$favorite.U_FAVORITE}" title="{$favorite.FAVORITE_HINT}" id="bn-favourite">{$favorite.FAVORITE_HINT}</a></li>{/if}
16    {if !empty($U_SET_AS_REPRESENTATIVE)}<li><a href="{$U_SET_AS_REPRESENTATIVE}" title="{'set as category representative'|@translate}" id="bn-higlight">{'representative'|@translate}</a></li>{/if}
17    {if isset($U_ADMIN)                                 }<li><a href="{$U_ADMIN}" title="{'link_info_image'|@translate}" id="bn-edit">{'edit'|@translate}</a></li>{/if}
18    {if isset($U_CADDIE)                                }{*caddie management BEGIN*}
19                      <script type="text/javascript">{literal}function addToCadie(aElement, rootUrl, id){if (aElement.disabled) return;aElement.disabled=true;var y=new PwgWS(rootUrl);y.callService("pwg.caddie.add",{image_id: id},{onFailure:function(num,text){alert(num+" "+text);document.location=aElement.href;},onSuccess:function(result){aElement.disabled=false;}});}{/literal}</script>
20                      <li><a href="{$U_CADDIE}" onclick="addToCadie(this, '{$ROOT_URL|@escape:'javascript'}', {$current.id}); return false;" title="{'add to caddie'|@translate}" id="bn-caddie">{'caddie'|@translate}</a></li>
21    {/if}{*caddie management END*}
22  </ul>
23</div>
24
25{footer_script require='jquery'}{literal}
26jQuery("#linkPrev img, #linkNext img").css("opacity", 0);
27
28jQuery("#linkPrev").mouseenter(function() {
29  jQuery("#linkPrev img").css("opacity", 1);
30});
31jQuery("#linkPrev").mouseleave(function() {
32  jQuery("#linkPrev img").css("opacity", 0);
33});
34
35jQuery("#linkNext").mouseenter(function() {
36  jQuery("#linkNext img").css("opacity", 1);
37});
38jQuery("#linkNext").mouseleave(function() {
39  jQuery("#linkNext img").css("opacity", 0);
40});
41{/literal}{/footer_script}
42
43<div id="theImage">
44  <div id="imageContainer">
45    {if isset($previous) }<a class="navThumb" id="linkPrev" href="{$previous.U_IMG}" title="{'Previous'|@translate} : {$previous.TITLE}" rel="prev"><img src="{$previous.THUMB_SRC}" alt="{$previous.TITLE}" /></a>{/if}
46    {if isset($next) }<a class="navThumb" id="linkNext" href="{$next.U_IMG}" title="{'Next'|@translate} : {$next.TITLE}" rel="next"><img src="{$next.THUMB_SRC}" alt="{$next.TITLE}" /></a>{/if}
47    <div id="theImg">{$ELEMENT_CONTENT}</div>
48  </div>
49  {if isset($U_SLIDESHOW_STOP) }<p>[ <a href="{$U_SLIDESHOW_STOP}">{'slideshow_stop'|@translate}</a>]</p>{/if}
50</div>
51
52{if isset($COMMENT_IMG)}
53<p class="imageComment">{$COMMENT_IMG}</p>
54{/if}
55
56<div id="imageInfo">
57  <div id="imageInfoLeft">
58    <div id="viewRatign"><span class="viewTxt">{'Visits'|@translate} </span><span class="viewValue">{$INFO_VISITS}</span></div>
59    {if isset($related_tags)}
60    <div id="imageTags"><span class="tagTxt">{'Tags'|@translate}: </span><span class="tagValue">{foreach from=$related_tags item=tag name=tag_loop}{if !$smarty.foreach.tag_loop.first}, {/if}<a href="{$tag.URL}">{$tag.name}</a>{/foreach}</span></div>
61    {/if}
62  </div>
63
64  {if $display_info.rating_score and isset($rate_summary) }
65  <div id="imageInfoRight">
66    <div class="value" id="ratingSummary">
67        {'Rating score'|@translate}:
68    {if $rate_summary.count}
69        <span id="ratingScore">{$rate_summary.score}</span> <span id="ratingCount">({assign var='rate_text' value='%d rates'|@translate}{$pwg->sprintf($rate_text, $rate_summary.count)})</span>
70    {else}
71        <span id="ratingScore">{'no rate'|@translate}</span> <span id="ratingCount"></span>
72    {/if}
73    </div>
74   
75    {if isset($rating)}
76    <form action="{$rating.F_ACTION}" method="post" id="rateForm">
77      <div>
78      {assign var="ratingExploded" value=$rate_summary.score|@explode:'.'}
79      {foreach from=$rating.marks item=mark name=rate_loop}
80        {if !$smarty.foreach.rate_loop.first} | {/if}
81       
82        <input type="{if isset($rating.USER_RATE) && $mark==$rating.USER_RATE}button{else}submit{/if}" name="rate" value="{$mark}" class="
83        {if $smarty.foreach.rate_loop.first} rateButtonReset
84        {elseif $mark<=$rating.USER_RATE}
85            rateButtonUser{if $mark<=$ratingExploded[0]}Full{elseif $mark==$ratingExploded[0]+1 && $ratingExploded[1]>49}Half{else}Empty{/if}
86          {elseif $mark<=$ratingExploded[0]} rateButtonFull
87          {elseif $mark==$ratingExploded[0]+1 && $ratingExploded[1]>49} rateButtonHalf
88        {else}
89        rateButtonEmpty
90        {/if}
91       
92        " title="{$mark}" />
93        {/foreach}
94
95{combine_script id='rating' load='header' require='core.scripts' path='themes/default/js/rating.js'}
96{footer_script}
97makeNiceRatingForm({ldelim}
98  rootUrl: '{$ROOT_URL|@escape:"javascript"}',
99  image_id: {$current.id},
100  ratingSummaryText: "{'Rating score'|@translate}: %.2f ({'%d rates'|@translate|@escape:'javascript'})",
101  ratingSummaryElement: document.getElementById("ratingSummary")
102{rdelim});
103{/footer_script}
104      </div>
105    </form>
106    {else}
107    <div class="rateShow">
108      {assign var="ratingExploded" value=$rate_summary.average|@explode:'.'}
109      <span class="rateFull{$ratingExploded[0]}"></span>{if $ratingExploded[1]>49}<span class="rateHalf"></span>{/if}
110    </div>
111    {/if}
112  </div>
113  {/if}
114  <div class="clear"></div>
115</div>
116{if !empty($PLUGIN_PICTURE_AFTER)}{$PLUGIN_PICTURE_AFTER}{/if}
Note: See TracBrowser for help on using the repository browser.