From: <za...@us...> - 2003-07-18 23:34:30
|
Update of /cvsroot/tikiwiki/tiki/templates In directory sc8-pr-cvs1:/tmp/cvs-serv21688 Modified Files: Tag: release_eta_carinea_rc1 tiki-page_bar.tpl Log Message: Quick fix Index: tiki-page_bar.tpl =================================================================== RCS file: /cvsroot/tikiwiki/tiki/templates/tiki-page_bar.tpl,v retrieving revision 1.20.2.2 retrieving revision 1.20.2.3 diff -u -d -r1.20.2.2 -r1.20.2.3 --- tiki-page_bar.tpl 18 Jul 2003 18:46:13 -0000 1.20.2.2 +++ tiki-page_bar.tpl 18 Jul 2003 23:34:26 -0000 1.20.2.3 @@ -1,3 +1,5 @@ +{* $Header$ *} + <hr/> <div id="page-bar"> <table> @@ -54,23 +56,72 @@ <td><div class="button2"><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|escape:"url"}{"|"}{$page|escape:"url"}{"] page."}&comment_topictype=n" class="linkbut">{tr}discuss{/tr}</a></div></td> {/if} -{if $edit_page eq 'y'} -<td><div class="button2"><a href="javascript:flip('edithelpzone');" class="linkbut">{tr}Wiki quick help{/tr}</a></div> -</td> -{/if} -{if $show_page eq 'y'} -<td><div class="button2"> -{if $comments_cant > 0} - <a style="background: #FFAAAA" href="javascript:flip('comzone{if $comments_show eq 'y'}open{/if}');" class="linkbut">{if $comments_cant eq 1}1 {tr}comment{/tr}{else}{$comments_cant} {tr}comments{/tr}{/if} -{else} - <a style="background: #FFAAAA" href="javascript:flip('comzone{if $comments_show eq 'y'}open{/if}');" class="linkbut">{tr}comment{/tr} -{/if} -</a></div></td> +{if $edit_page eq 'y'} {* Show this button only in editing mode *} + <td> + <div class="button2"> + <a title="Show quick help for wiki syntax" + href="javascript:flip('edithelpzone');" class="linkbut">{tr}wiki help{/tr}</a> + </div> + </td> {/if} -{if $feature_wiki_attachments eq 'y' and $show_page eq 'y'} -<td><div class="button2"><a href="javascript:flip('attzone{if $atts_show eq 'y'}open{/if}');" class="linkbut">{if $atts_count eq 0}{tr}attach file{/tr}{elseif $atts_count eq 1}1 {tr}attachment{/tr}{else}{$atts_count} {tr}attachments{/tr}{/if}</a></div></td> +{if $show_page == 'y'} {* Show this buttons only if page view mode *} + + {* don't show comments if feature disabled or not enough rights *} + {if $feature_wiki_comments == 'y' + && ($tiki_p_read_comments == 'y' + || $tiki_p_post_comments == 'y' + || $tiki_p_edit_comments == 'y')} + <td> + <div class="button2"> + <a title="View/post comments" + href="javascript:flip('comzone{if $comments_show eq 'y'}open{/if}');" + class="linkbut"> + {if $comments_cant == 0} + {tr}add comment{/tr} + {elseif $comments_cant == 1} + <span class="highlight">{tr}1 comment{/tr}</span> + {else} + <span class="highlight">{$comments_cant} {tr}comments{/tr}</span> + {/if} + </a> + </div> + </td> + {/if} + + {* don't show attachments button if feature disabled or no corresponding rights or no attached files and r/o*} + + {php} global $atts; global $smarty; $smarty->assign('atts_cnt', count($atts["data"])); {/php} + {if $feature_wiki_attachments == 'y' + && ($tiki_p_wiki_view_attachments == 'y' + && count($atts) > 0 + || $tiki_p_wiki_attach_files == 'y' + || $tiki_p_wiki_admin_attachments == 'y')} + + <td> + + <div class="button2"> + <a title="Manage attachments for this page" href="javascript:flip('attzone');" class="linkbut"> + + {* display 'attach file' only if no attached files or + * only $tiki_p_wiki_attach_files perm + *} + {if $atts_cnt == 0 + || $tiki_p_wiki_attach_files == 'y' + && $tiki_p_wiki_view_attachments == 'n' + && $tiki_p_wiki_admin_attachments == 'n'} + {tr}attach file{/tr} + {elseif $atts_cnt == 1} + <span class="highlight">{tr}1 file attached{/tr}</span> + {else} + <span class="highlight">{tr}{$atts_cnt} files attached{/tr}</span> + {/if} + </a> + </div> + </td> + {/if}{* attachments *} + {/if} </tr> @@ -85,4 +136,3 @@ {include file=comments.tpl} {/if} {/if} - |