Piki is a minimal wiki
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

help.py 1.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. """)
  20. ACCESS = mycreole.render_simple(_("""
  21. = TBD
  22. """))
  23. SEARCH = mycreole.render_simple(_("""
  24. = TBD
  25. """))
  26. help_pages = {
  27. 'main': MAIN,
  28. 'creole': CREOLE,
  29. 'access': ACCESS,
  30. 'search': SEARCH,
  31. }
  32. def actionbar(context, request, current_help_page=None, **kwargs):
  33. actionbar_entries = (
  34. ('1', 'Main'),
  35. ('2', 'Creole'),
  36. ('3', 'Access'),
  37. ('4', 'Search'),
  38. )
  39. for num, name in actionbar_entries:
  40. context[context.ACTIONBAR].append_entry(
  41. HELP_UID + '-%s' % name.lower(), # uid
  42. _(name), # name
  43. color_icon_url(request, num + '.png'), # icon
  44. pages.url_helpview(request, name.lower()), # url
  45. True, # left
  46. name.lower() == current_help_page, # active
  47. )