ajout d'une action pour ajouter d'un clic la recherche dans le wiki dans la
boite de recherche de firefox darcs-hash:20061213214545-f46e9-fa8ce6a5109f48d8aee162e1dcfd8e713863ab90.gz
This commit is contained in:
parent
d315e506b3
commit
ab6ee89076
1 changed files with 12 additions and 48 deletions
|
@ -234,7 +234,7 @@ class ThemeCrans(ThemeBase):
|
||||||
'SpellCheck': _('Check Spelling', formatted=False), # rename action!
|
'SpellCheck': _('Check Spelling', formatted=False), # rename action!
|
||||||
'RenamePage': _('Rename Page', formatted=False),
|
'RenamePage': _('Rename Page', formatted=False),
|
||||||
'DeletePage': _('Delete Page', formatted=False),
|
'DeletePage': _('Delete Page', formatted=False),
|
||||||
'LikePages': _('Show Like Pages', formatted=False),
|
'LikePages': _('Show Like Pages', formatted=False),
|
||||||
'LocalSiteMap': _('Show Local Site Map', formatted=False),
|
'LocalSiteMap': _('Show Local Site Map', formatted=False),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -426,57 +426,21 @@ class ThemeCrans(ThemeBase):
|
||||||
]
|
]
|
||||||
return ''.join(html)
|
return ''.join(html)
|
||||||
|
|
||||||
def pageinfo(self, page):
|
|
||||||
""" Simple override from base class.
|
|
||||||
Remove <p> so footer isn't too big
|
|
||||||
"""
|
|
||||||
_ = self.request.getText
|
|
||||||
|
|
||||||
if self.shouldShowPageinfo(page):
|
|
||||||
info = page.lastEditInfo()
|
|
||||||
if info:
|
|
||||||
if info['editor']:
|
|
||||||
info = _("last edited %(time)s by %(editor)s") % info
|
|
||||||
else:
|
|
||||||
info = _("last modified %(time)s") % info
|
|
||||||
return info
|
|
||||||
return ''
|
|
||||||
|
|
||||||
def rtl_stylesheet(self, d):
|
|
||||||
""" monobook uses a separate css page for rtl alterations.
|
|
||||||
Add the rtl stylesheet if the user needs it
|
|
||||||
"""
|
|
||||||
link = ('<link rel="stylesheet" type="text/css" charset="%s"'
|
|
||||||
' media="%s" href="%s">')
|
|
||||||
html = []
|
|
||||||
if i18n.getDirection(self.request.lang) == 'rtl':
|
|
||||||
prefix = self.cfg.url_prefix
|
|
||||||
href = '%s/%s/css/%s.css' % (prefix, self.name, 'rtl')
|
|
||||||
html.append(link % (self.stylesheetsCharset, 'all', href))
|
|
||||||
return '\n'.join(html)
|
|
||||||
|
|
||||||
def html_head(self, d):
|
def html_head(self, d):
|
||||||
""" Tweak the sending of the head, to include right-to-left
|
""" add opensearch description to html head
|
||||||
alterations if necessary
|
|
||||||
"""
|
"""
|
||||||
html = [
|
# common prefix for static content
|
||||||
u'<title>%(title)s - %(sitename)s</title>' % d,
|
prefix = self.cfg.url_prefix
|
||||||
self.headscript(d), # Should move to separate .js file
|
open_search_desc = """
|
||||||
self.html_stylesheets(d),
|
<link rel="search" type="application/opensearchdescription+xml" href="%(page)s?action=opensearch&searchtype=Titres" title="%(sitename)s, Rechercher dans les titres" />
|
||||||
self.rtl_stylesheet(d),
|
<link rel="search" type="application/opensearchdescription+xml" href="%(page)s?action=opensearch&searchtype=Texte" title="%(sitename)s, Rechercher dans le texte" />
|
||||||
self.rsslink(),
|
""" % {'page':self.request.path_info, 'sitename':d['sitename']}
|
||||||
]
|
|
||||||
return u' \n'.join(html)
|
|
||||||
|
|
||||||
def html_stylesheets(self, d):
|
|
||||||
"""
|
|
||||||
On fixe le chemin d'acces vers les feuilles de style
|
|
||||||
"""
|
|
||||||
html = []
|
|
||||||
for media, nom in self.stylesheets:
|
|
||||||
html.append(u'<link rel="stylesheet" type="text/css" media="%s" href="/wiki/crans/css/%s.css">' % (media, nom))
|
|
||||||
return u'\n'.join(html)
|
|
||||||
|
|
||||||
|
#d['page'].request.script_name, 'sitename':d['sitename']}
|
||||||
|
|
||||||
|
classic_head = ThemeBase.html_head(self, d)
|
||||||
|
return classic_head + open_search_desc + str(self.request.path_info)
|
||||||
|
|
||||||
class Theme(ThemeCrans):
|
class Theme(ThemeCrans):
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue