balise sur les pages du wiki pour indiquer que la page est éditable
darcs-hash:20080707223302-69ccb-660811ad411fa6c2f6244689765fadac23754fbb.gz
This commit is contained in:
parent
f0e5d73c05
commit
1ef282f86b
1 changed files with 13 additions and 4 deletions
|
@ -102,11 +102,20 @@ class ThemeCrans(ThemeBase):
|
||||||
"""
|
"""
|
||||||
# common prefix for static content
|
# common prefix for static content
|
||||||
prefix = self.cfg.url_prefix
|
prefix = self.cfg.url_prefix
|
||||||
open_search_desc = '<link rel="search" type="application/opensearchdescription+xml" href="%(page)s?action=opensearch&searchtype=Titres" title="%(sitename)s, Rechercher dans les titres" />\n<link rel="search" type="application/opensearchdescription+xml" href="%(page)s?action=opensearch&searchtype=Texte" title="%(sitename)s, Rechercher dans le texte" />' % {'page':d['page'].request.script_name, 'sitename':d['sitename']}
|
open_search_desc = '\n<link rel="search" type="application/opensearchdescription+xml" href="%(page)s?action=opensearch&searchtype=Titres" title="%(sitename)s, Rechercher dans les titres" />\n<link rel="search" type="application/opensearchdescription+xml" href="%(page)s?action=opensearch&searchtype=Texte" title="%(sitename)s, Rechercher dans le texte" />' % {'page':d['page'].request.script_name, 'sitename':d['sitename']}
|
||||||
|
if (d['page'].isWritable() and
|
||||||
|
self.request.user.may.write(d['page'].page_name)):
|
||||||
|
edit_link = "/" + wikiutil.quoteWikinameURL(d['page'].page_name) + '?action=edit&editor=text'
|
||||||
|
wiki_rel = '<link rel="alternate" \
|
||||||
|
type="application/x-wiki" title="Modifier" \
|
||||||
|
href="%s" />\n' % edit_link
|
||||||
|
else:
|
||||||
|
wiki_rel = ""
|
||||||
|
|
||||||
|
|
||||||
classic_head = ThemeBase.html_head(self, d)
|
classic_head = ThemeBase.html_head(self, d)
|
||||||
|
|
||||||
return classic_head + open_search_desc
|
return classic_head + open_search_desc + wiki_rel
|
||||||
|
|
||||||
def headscript(self, d):
|
def headscript(self, d):
|
||||||
# Check mode
|
# Check mode
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue