Piki is a minimal wiki
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

help.py 2.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. | {{{<<allpages>>}}} | will result in a last of all pages. You can use [N,startswith] as with subpages. |
  25. """)
  26. ACCESS = mycreole.render_simple(_("""
  27. = TBD
  28. """))
  29. SEARCH = mycreole.render_simple(_("""
  30. = TBD
  31. """))
  32. help_pages = {
  33. 'main': MAIN,
  34. 'creole': CREOLE,
  35. 'access': ACCESS,
  36. 'search': SEARCH,
  37. }
  38. def actionbar(context, request, current_help_page=None, **kwargs):
  39. actionbar_entries = (
  40. ('1', 'Main'),
  41. ('2', 'Creole'),
  42. ('3', 'Access'),
  43. ('4', 'Search'),
  44. )
  45. for num, name in actionbar_entries:
  46. context[context.ACTIONBAR].append_entry(
  47. HELP_UID + '-%s' % name.lower(), # uid
  48. _(name), # name
  49. color_icon_url(request, num + '.png'), # icon
  50. pages.url_helpview(request, name.lower()), # url
  51. True, # left
  52. name.lower() == current_help_page, # active
  53. )