From: <ch...@us...> - 2004-09-14 08:32:05
|
Update of /cvsroot/tikiwiki/tiki/templates/styles/moreneat In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6641/moreneat Modified Files: tiki-show_page.tpl Log Message: Ported 1.9 comment button enhancements to styles with custom tiki-show_page.tpl Index: tiki-show_page.tpl =================================================================== RCS file: /cvsroot/tikiwiki/tiki/templates/styles/moreneat/tiki-show_page.tpl,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- tiki-show_page.tpl 12 Aug 2004 22:32:15 -0000 1.42 +++ tiki-show_page.tpl 14 Sep 2004 08:31:56 -0000 1.43 @@ -169,16 +169,13 @@ <span class="tabbut"><a href="tiki-view_forum.php?forumId={$wiki_forum_id}&comments_postComment=post&comments_title={$page|escape:"url"}&comments_data={"Use this thread to discuss the [tiki-index.php?page="}{$page}{"|"}{$page}{"] page."|escape:"url"}&comment_topictype=n" class="tablink">{tr}discuss{/tr}</a></span> {/if} -{if $feature_wiki_comments eq 'y' and $show_page eq 'y' && ($tiki_p_read_comments eq 'y' || $tiki_p_admin_wiki eq 'y' || $tiki_p_admin eq 'y')} -{if $comments_cant > 0 || $tiki_p_post_comments eq 'y'} - <span class="tabbut"> - {if $comments_cant > 0} - <a href="#comments" onclick="javascript:flip('comzone{if $comments_show eq 'y'}open{/if}');" class="tablink" style="background: #FFAAAA">{if $comments_cant eq 1}1 {tr}comment{/tr}{else}{$comments_cant} {tr}comments{/tr}{/if}</a></span> - {else} - <a href="#comments" onclick="javascript:flip('comzone{if $comments_show eq 'y'}open{/if}');" class="tablink">{tr}post comment{/tr}</a> - {/if} - </span> -{/if} +{* don't show comments if feature disabled or not enough rights *} +{if $feature_wiki_comments == 'y' +&& (($tiki_p_read_comments == 'y' && $comments_cant != 0) +|| $tiki_p_post_comments == 'y' +|| $tiki_p_edit_comments == 'y')} + <span class="tabbut"> + <a href="#comments" onclick="javascript:flip('comzone{if $comments_show eq 'y'}open{/if}');" class="tablink"{if $comments_cant != 0} style="background: #FFAAAA"{/if}>{if $comments_cant == 0}{tr}add comment{/tr}{elseif $comments_cant == 1}{tr}1 comment{/tr}{else}{$comments_cant} {tr}comments{/tr}{/if}</a></span> {/if} {php} global $atts; global $smarty; $smarty->assign('atts_cnt', count($atts["data"])); {/php} |