[PatchDiscussion] split links macro so we can omit the page-specific nav links on forms
[email protected] (zwiki-repo)
| Newsgroups | gmane.comp.web.zope.zwiki |
|---|---|
| Message-ID | <20080214202302.6DC9378001__35814.6083927297$1203020689$gmane$org@mail.joyful.com> |
Thu Feb 14 12:00:45 PST 2008 Simon Michael <[email protected]> * split links macro so we can omit the page-specific nav links on forms diff -rN -u old-ZWiki/skins/zwiki/helppage.pt new-ZWiki/skins/zwiki/helppage.pt --- old-ZWiki/skins/zwiki/helppage.pt 2008-02-14 12:23:01.000000000 -0800 +++ new-ZWiki/skins/zwiki/helppage.pt 2008-02-14 12:23:01.000000000 -0800 @@ -9,7 +9,7 @@ <body> <div metal:fill-slot="main"> <metal:macro metal:use-macro="here/macros/accesskeys" /> - <div metal:use-macro="here/macros/links" /> + <div metal:use-macro="here/macros/sitelinks" /> <h1 i18n:translate="">Help page</h1> <div class="formcontent" tal:content="structure python:here.talsafe( diff -rN -u old-ZWiki/skins/zwiki/links.pt new-ZWiki/skins/zwiki/links.pt --- old-ZWiki/skins/zwiki/links.pt 2008-02-14 12:23:01.000000000 -0800 +++ new-ZWiki/skins/zwiki/links.pt 2008-02-14 12:23:01.000000000 -0800 @@ -1,109 +1,126 @@ <html> <body> + <div metal:define-macro="links" class="linkpanel"> <table class="shade1" width="100%" border="0" cellspacing="0"> <tr> <td align="right"> - <!-- standard wiki links --> - <a href="" tal:attributes="href here/homeUrl" - accesskey="f" - title="show front page" - i18n:attributes="title"> - <span i18n:translate="">home</span></a> - <a href="" tal:attributes="href here/contentsUrl" - accesskey="c" - title="show wiki contents" - i18n:attributes="title"> - <span i18n:translate="">contents</span></a> - <a href="" tal:attributes="href here/changesUrl" - accesskey="r" - title="show wiki recent changes" - i18n:attributes="title"> - <span i18n:translate="">changes</span></a> - <a href="" tal:attributes="href here/discussionUrl" - tal:condition="here/discussionUrl" - title="show discussion page" - i18n:attributes="title"> - <span i18n:translate="">discussion</span></a> - <a href="" tal:attributes="href here/trackerUrl" - tal:condition="here/hasIssueTracker" - title="show issue tracker" - i18n:attributes="title"> - <span i18n:translate="">issues</span></a> - <a tal:attributes="href here/indexUrl" accesskey="i" - tal:condition="here/indexUrl" - title="show wiki index" - i18n:attributes="title"> - <span i18n:translate="">index</span></a> - <a href="" tal:attributes="href here/uploadsUrl" - tal:condition="here/uploadsUrl" - title="show upload page" - i18n:attributes="title"> - <span i18n:translate="">uploads</span></a> - <a tal:attributes="href python:here.preferencesUrl()" - accesskey="o" - title="show wiki options" - i18n:attributes="title"> - <span i18n:translate="">options</span></a> - <a tal:attributes="href here/helpUrl" - accesskey="h" - tal:condition="here/helpUrl" - title="show help page" - i18n:attributes="title"> - <span i18n:translate="">help</span></a> + <metal:macro metal:use-macro="here/macros/sitenavlinks" /> + <metal:macro metal:use-macro="here/macros/pagenavlinks" /> + </td> + </tr> + </table> + </div> - <!-- standard page links --> - <a tal:condition="python:0" - tal:attributes="href python:here.pageUrl() + '/backlinks';" - href="" - title="which pages link to this one ?" - i18n:attributes="title" - accesskey="b" - ><span i18n:translate="">backlinks</span></a> - <a tal:condition="here/isMailoutEnabled" - tal:attributes="href python:here.pageUrl() + '/subscribeform'" - href="page_url/subscribeform" - accesskey="m" - title="configure email subscription to this page or site" - i18n:attributes="title" - > - <span tal:condition="python:0 - #here.allSubscriptionsFor(request.get('email','')) - #show subscription status - too expensive " >(un)</span > - <span i18n:translate="">subscribe</span></a> - <a tal:condition="python:0 #user.has_permission('Zwiki: Edit pages',here)" - tal:attributes="href python:here.pageUrl() + '/diff';" - href="" - title="show this page's change history" - i18n:attributes="title" - accesskey="d" - ><span i18n:translate="">diff</span></a> - <a tal:condition="python:user.has_permission('Zwiki: Edit pages',here)" - tal:attributes=" - href python:here.pageUrl() + '/editform'; - title python: here.translateHelper('edit-page') + ' (' + here.linkTitle() + ')'" - href="page_url/editform" - title="edit this page (last edited n days ago by so-and-so)" - accesskey="e" - > - <span i18n:translate="">edit</span></a> - <a tal:condition="python: - user.has_permission('Zwiki: Edit pages',here) and - getattr(root.misc_,'ExternalEditor',False) and - user.has_permission('Use external editor',here)" - tal:attributes="href python: - here.wiki_url() + '/externalEdit_/' + - modules['Products.PythonScripts.standard'].url_quote(here.id()) + - '?borrow_lock=1'" - href="wiki_url/externalEdit_/id" - title="edit using external editor" - i18n:attributes="title" - accesskey="x" - ><img src="misc_/ExternalEditor/edit_icon" border="0" - alt="(external edit)" i18n:attributes="alt" /></a> + <div metal:define-macro="sitelinks" class="linkpanel"> + <table class="shade1" width="100%" border="0" cellspacing="0"> + <tr> + <td align="right"> + <metal:macro metal:use-macro="here/macros/sitenavlinks" /> </td> </tr> </table> </div> + + <metal:macro metal:define-macro="sitenavlinks"> + <a href="" tal:attributes="href here/homeUrl" + accesskey="f" + title="show front page" + i18n:attributes="title"> + <span i18n:translate="">home</span></a> + <a href="" tal:attributes="href here/contentsUrl" + accesskey="c" + title="show wiki contents" + i18n:attributes="title"> + <span i18n:translate="">contents</span></a> + <a href="" tal:attributes="href here/changesUrl" + accesskey="r" + title="show wiki recent changes" + i18n:attributes="title"> + <span i18n:translate="">changes</span></a> + <a href="" tal:attributes="href here/discussionUrl" + tal:condition="here/discussionUrl" + title="show discussion page" + i18n:attributes="title"> + <span i18n:translate="">discussion</span></a> + <a href="" tal:attributes="href here/trackerUrl" + tal:condition="here/hasIssueTracker" + title="show issue tracker" + i18n:attributes="title"> + <span i18n:translate="">issues</span></a> + <a tal:attributes="href here/indexUrl" accesskey="i" + tal:condition="here/indexUrl" + title="show wiki index" + i18n:attributes="title"> + <span i18n:translate="">index</span></a> + <a href="" tal:attributes="href here/uploadsUrl" + tal:condition="here/uploadsUrl" + title="show upload page" + i18n:attributes="title"> + <span i18n:translate="">uploads</span></a> + <a tal:attributes="href python:here.preferencesUrl()" + accesskey="o" + title="show wiki options" + i18n:attributes="title"> + <span i18n:translate="">options</span></a> + <a tal:attributes="href here/helpUrl" + accesskey="h" + tal:condition="here/helpUrl" + title="show help page" + i18n:attributes="title"> + <span i18n:translate="">help</span></a> + </metal:macro> + + <metal:macro metal:define-macro="pagenavlinks"> + <a tal:condition="python:0" + tal:attributes="href python:here.pageUrl() + '/backlinks';" + href="" + title="which pages link to this one ?" + i18n:attributes="title" + accesskey="b" + ><span i18n:translate="">backlinks</span></a> + <a tal:condition="here/isMailoutEnabled" + tal:attributes="href python:here.pageUrl() + '/subscribeform'" + href="page_url/subscribeform" + accesskey="m" + title="configure email subscription to this page or site" + i18n:attributes="title" + > + <span tal:condition="python:0 + #here.allSubscriptionsFor(request.get('email','')) + #show subscription status - too expensive " >(un)</span > + <span i18n:translate="">subscribe</span></a> + <a tal:condition="python:0 #user.has_permission('Zwiki: Edit pages',here)" + tal:attributes="href python:here.pageUrl() + '/diff';" + href="" + title="show this page's change history" + i18n:attributes="title" + accesskey="d" + ><span i18n:translate="">diff</span></a> + <a tal:condition="python:user.has_permission('Zwiki: Edit pages',here)" + tal:attributes=" + href python:here.pageUrl() + '/editform'; + title python: here.translateHelper('edit-page') + ' (' + here.linkTitle() + ')'" + href="page_url/editform" + title="edit this page (last edited n days ago by so-and-so)" + accesskey="e" + > + <span i18n:translate="">edit</span></a> + <a tal:condition="python: + user.has_permission('Zwiki: Edit pages',here) and + getattr(root.misc_,'ExternalEditor',False) and + user.has_permission('Use external editor',here)" + tal:attributes="href python: + here.wiki_url() + '/externalEdit_/' + + modules['Products.PythonScripts.standard'].url_quote(here.id()) + + '?borrow_lock=1'" + href="wiki_url/externalEdit_/id" + title="edit using external editor" + i18n:attributes="title" + accesskey="x" + ><img src="misc_/ExternalEditor/edit_icon" border="0" + alt="(external edit)" i18n:attributes="alt" /></a> + </metal:macro> + </body> </html> -- forwarded from http://zwiki.org/PatchDiscussion#[email protected]