Piki is a minimal wiki
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

help.py 1.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. from django.utils.translation import gettext as _
  2. import mycreole
  3. import pages
  4. from themes import color_icon_url
  5. HELP_UID = 'help'
  6. MAIN = mycreole.render_simple(_(
  7. """
  8. = Piki
  9. **piki** is a minimal wiki implemented with python and django.
  10. == Help
  11. * [[creole|Creole Markup Language]]
  12. * [[access|Access Control for the site content]]
  13. * [[search|Help on Search]]
  14. """))
  15. CREOLE = mycreole.mycreole_help_pagecontent()
  16. CREOLE += mycreole.render_simple("""
  17. = Piki Markup
  18. | {{{[[rel_path_to_page|Name]]}}} | will result in a Link to the given wiki page. |
  19. | {{{<<subpages>>}}} | will result in a list of all subpages below the current page. |
  20. | {{{<<subpages=N,startswith>>}}} | will result in a list of subpages below the current page.\
  21. N will reduce the depth of the subpages to N. \
  22. startswith will reduce the hits to all pages starting with the given string.
  23. You can give one or both Parameters. |
  24. """)
  25. ACCESS = mycreole.render_simple(_("""
  26. = TBD
  27. """))
  28. SEARCH = mycreole.render_simple(_("""
  29. = TBD
  30. """))
  31. help_pages = {
  32. 'main': MAIN,
  33. 'creole': CREOLE,
  34. 'access': ACCESS,
  35. 'search': SEARCH,
  36. }
  37. def actionbar(context, request, current_help_page=None, **kwargs):
  38. actionbar_entries = (
  39. ('1', 'Main'),
  40. ('2', 'Creole'),
  41. ('3', 'Access'),
  42. ('4', 'Search'),
  43. )
  44. for num, name in actionbar_entries:
  45. context[context.ACTIONBAR].append_entry(
  46. HELP_UID + '-%s' % name.lower(), # uid
  47. _(name), # name
  48. color_icon_url(request, num + '.png'), # icon
  49. pages.url_helpview(request, name.lower()), # url
  50. True, # left
  51. name.lower() == current_help_page, # active
  52. )