You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

70 line
2.1 KiB

  1. {% block title %} {{ title }} {% endblock %}
  2. {% block header %}{% if show_title %}<h2>{{ title }}</h2>{% endif %}{% endblock %}
  3. {% block content %}
  4. <div class="webpage-content">
  5. {# title, breadcrumbs, table of contents #}
  6. {% block pre_content -%}
  7. {% if show_breadcrumbs and breadcrumbs -%}
  8. <ul class="breadcrumb">
  9. {% for b in breadcrumbs -%}
  10. <li><a href="{{ b.page_name }}">{{ b.title }}</a></li>
  11. {%- endfor %}
  12. <li class="active">{{ title }}</li>
  13. </ul>
  14. {%- endif %}
  15. {%- endblock %}
  16. {% include "templates/includes/slideshow.html" %}
  17. <div class="web-page-content" id="{{ name }}">
  18. {{ main_section or "" }}
  19. </div>
  20. {# toc, parent, child, next sibling #}
  21. {% block post_content -%}
  22. {% if show_toc and toc_list -%}
  23. <div class="well">
  24. <h4>Contents</h4>
  25. <ol>
  26. {% for t in toc_list -%}
  27. <li><a href="{{ t.page_name }}">{{ t.title }}</a></li>
  28. {%- endfor %}
  29. </ol>
  30. </div>
  31. {%- endif %}
  32. {% if links and links.get("parent") -%}
  33. <div class="btn-group pull-right" style="margin: 15px 0px;">
  34. <a class='btn btn-default' href="{{ links.parent.page_name }}">
  35. <i class="icon-arrow-up"></i> {{ links.parent.title }}</a>
  36. {% if links.get("next") -%}
  37. <a class='btn btn-default' href="{{ links.next.page_name }}">
  38. <i class="icon-arrow-right"></i> {{ links.next.title }}</a>
  39. {%- endif -%}
  40. {% if links.get("child") -%}
  41. <a class='btn btn-default' href="{{ links.child.page_name }}">
  42. <i class="icon-arrow-down"></i> {{ links.child.title }}</a>
  43. {%- endif -%}
  44. </div>
  45. <div class="clearfix"></div>
  46. {%- endif %}
  47. {% if enable_comments -%}
  48. <hr>
  49. <h3>Discuss</h3>
  50. {% include 'templates/includes/comments.html' %}
  51. {%- endif %}
  52. {%- endblock %}
  53. </div>
  54. <script>
  55. $(function() {
  56. if(window.logged_in && getCookie("system_user")==="yes") {
  57. wn.has_permission("Web Page", "{{ name }}", "write", function(r) {
  58. wn.require("assets/webnotes/js/wn/website/editable.js");
  59. wn.make_editable($(".web-page-content"), "Web Page", "{{ name }}", "main_section");
  60. });
  61. }
  62. });
  63. </script>
  64. {% endblock %}
  65. {% block sidebar %}{% include "templates/includes/sidebar.html" %}{% endblock %}