source: extensions/Comments_on_Albums/template/albums.tpl @ 19762

Last change on this file since 19762 was 18927, checked in by mistic100, 12 years ago

update with Piwigo 2.5 features (website url, email, mandatory email and username)

File size: 5.1 KB
Line 
1{* this is inspired by theme/defaults/template/picture.tpl *}
2 
3{* <!-- need some css modifications, specific to each theme --> *}
4{html_head}
5<style type="text/css">
6#comments .commentElement {ldelim} width:98%;}
7{if $COMMENTS_ON_TOP}
8#commentAdd, #pictureCommentList {ldelim} float:none; display:inline-block; width:47.5%; vertical-align:top;}
9#commentsSwitcher {ldelim} float:none; display:inline-block; margin: 2px 0; cursor:pointer;}
10.noCommentContent #commentsSwitcher  {ldelim} display: none;}
11.switchArrow{ldelim} width: 16px; height: 16px; margin: 5px;}
12.commentshidden #pictureComments {ldelim} display: none;}
13.commentContent .comments_toggle   {ldelim} cursor: pointer;}
14{/if}
15{if $themeconf.name == 'Sylvia'}
16#comments .description {ldelim} padding: 15px 2px 6px 12px;}
17#comments .commentElement {ldelim} border: 1px solid #666;}
18{/if}
19{if $themeconf.name|strstr:"stripped"}
20#comments {ldelim} text-align: left;}
21#comments .description {ldelim} height:auto;}
22#thumbnails_block2 {ldelim} min-height:0;}
23{/if}
24
25</style>
26{/html_head}
27
28{* <!-- if RV Thumb Scroller is installed comments block is displayed on top with a drop-down --> *}
29{if $COMMENTS_ON_TOP}
30{footer_script}{literal}
31  // comments show/hide
32  var commentsswicther=jQuery("#commentsSwitcher");
33  var comments=jQuery("#theCategoryPage #comments");
34 
35  commentsswicther.html('<div class="switchArrow">&nbsp;</div>');
36  {/literal}{if $themeconf.name != 'elegant'}switcharrow = commentsswicther.children(".switchArrow");{else}switcharrow = $('<div></div>');{/if}{literal}
37 
38  if (comments.length == 1) {
39    var comments_button=jQuery("#comments h3");
40
41    if (comments_button.length == 0) {
42      jQuery("#addComment").before('<h3>Comments</h3>');
43      comments_button=jQuery("#comments h3");
44    }
45 
46    {/literal}{if $DISPLAY_COMMENTS_BLOCK}
47    comments.addClass("commentsshown");
48    comments_button.addClass("comments_toggle").addClass("comments_toggle_on");
49    switcharrow.html("&uarr;");
50    {else}
51    comments.addClass("commentshidden");
52    comments_button.addClass("comments_toggle").addClass("comments_toggle_off");
53    switcharrow.html("&darr;");
54    {/if}{literal}
55   
56    comments_button.click(function() { commentsToggle() });
57    commentsswicther.click(function() { commentsToggle() });
58 
59  }
60 
61  function commentsToggle() {
62    var comments=jQuery("#theCategoryPage #comments");
63    var comments_button=jQuery("#comments h3");
64
65    if (comments.hasClass("commentshidden")) {
66        comments.removeClass("commentshidden").addClass("commentsshown");
67        comments_button.addClass("comments_toggle_off").removeClass("comments_toggle_off");
68        switcharrow.html("&uarr;");
69      } else {
70        comments.addClass("commentshidden").removeClass("commentsshown");
71        comments_button.addClass("comments_toggle_on").removeClass("comments_toggle_on");
72        switcharrow.html("&darr;");
73      }
74
75  }
76{/literal}{/footer_script}
77{/if}
78
79{if isset($COMMENT_COUNT)}
80<div id="comments" style="margin:10px 0 10px 0;" {if (!isset($comment_add) && ($COMMENT_COUNT == 0))}class="noCommentContent"{else}class="commentContent"{/if}>
81  <h3 style="margin:0 0 0 5px;"><div id="commentsSwitcher"></div>{$pwg->l10n_dec('%d comment', '%d comments',$COMMENT_COUNT)}</h3>
82
83  <div id="pictureComments"><fieldset>
84    {if isset($comment_add)}
85    <div id="commentAdd">
86      <h4>{'Add a comment'|@translate}</h4>
87      <form method="post" action="{$comment_add.F_ACTION}" id="addComment">
88        {if $comment_add.SHOW_AUTHOR}
89          <p><label for="author">{'Author'|@translate}{if $comment_add.AUTHOR_MANDATORY} ({'mandatory'|@translate}){/if} :</label></p>
90          <p><input type="text" name="author" id="author" value="{$comment_add.AUTHOR}"></p>
91        {/if}
92        {if $comment_add.SHOW_EMAIL}
93          <p><label for="email">{'Email'|@translate}{if $comment_add.EMAIL_MANDATORY} ({'mandatory'|@translate}){/if} :</label></p>
94          <p><input type="text" name="email" id="email" value="{$comment_add.EMAIL}"></p>
95        {/if}
96        <p><label for="website_url">{'Website'|@translate} :</label></p>
97        <p><input type="text" name="website_url" id="website_url" value="{$comment_add.WEBSITE_URL}"></p>
98        <p><label for="contentid">{'Comment'|@translate} ({'mandatory'|@translate}) :</label></p>
99        <p><textarea name="content" id="contentid" rows="5" cols="50">{$comment_add.CONTENT}</textarea></p>
100        <p><input type="hidden" name="key" value="{$comment_add.KEY}">
101          <input type="submit" value="{'Submit'|@translate}"></p>
102      </form>
103    </div>
104    {/if}
105    {if isset($comments)}
106    <div id="pictureCommentList">
107      {if (($COMMENT_COUNT > 2) || !empty($comment_navbar))}
108        <div id="pictureCommentNavBar">
109          {if $COMMENT_COUNT > 2}
110            <a href="{$COMMENTS_ORDER_URL}#comments" rel="nofollow" class="commentsOrder">{$COMMENTS_ORDER_TITLE}</a>
111          {/if}
112          {if !empty($comment_navbar) }{include file=$COA_ABSOLUTE_PATH|@cat:'template/navigation_bar.tpl'|@get_extent:'navbar'}{/if}
113        </div>
114      {/if}
115      {include file='comment_list.tpl'}
116    </div>
117    {/if}
118    {if not $COMMENTS_ON_TOP}<div style="clear:both"></div>{/if}
119  </fieldset></div>
120
121</div>
122{/if}{*comments*}
Note: See TracBrowser for help on using the repository browser.