old_revision.html 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. {% extends 'editor/editor.html' %}
  2. {% block css %}
  3. <link href = "{{ url('static_assets', filename='js/codemirror/lib/codemirror.css') }}"
  4. rel = "stylesheet" />
  5. {{ super() }}
  6. {% endblock %}
  7. {% block javascript %}
  8. {{ super() }}
  9. <script src="{{ url('static_assets', filename='js/codemirror/lib/codemirror.js') }}"></script>
  10. <script src="{{ url('static_assets', filename='js/codemirror/mode/jinja2/jinja2.js') }}"></script>
  11. <script src="{{ url('static_assets', filename='js/codemirror/mode/markdown/markdown.js') }}"></script>
  12. <script src="{{ url('static_assets', filename='js/codemirror/mode/sparql/sparql.js') }}"></script>
  13. <script src="{{ url('static_assets', filename='js/codemirror/mode/turtle/turtle.js') }}"></script>
  14. <script src="{{ url('static_assets', filename='js/commonmark.js') }}"></script>
  15. <script src="{{ url('static_assets', filename='js/editor/revision.js') }}" id="editor_script" data-type="{{ type }}"></script>
  16. {% endblock %}
  17. {% block main %}
  18. <div class="old_revision">
  19. <div class="info">
  20. <p>
  21. {% if revision['dokk:revision_number'] == current_revision['dokk:revision_number'] %}
  22. This is the current revision
  23. {% else %}
  24. This is an old revision
  25. {% endif %}
  26. of the page <strong>{{ page_name }}</strong>,
  27. as edited by <strong>{{ revision['author'] }}</strong> at
  28. <strong>{{ revision['datetime']|simple_date }}</strong>.
  29. You can also look at the
  30. <a href="{{ url('revisions', type=type, id=node_id) }}">complete history</a>
  31. of this page.
  32. <br />
  33. Revisions cannot be modified; but you can
  34. <a href="{{ url('edit', type=type, id=node_id) }}">create a new one</a>.
  35. </p>
  36. </div>
  37. <div class="edit_summary">
  38. <strong>#{{ revision['dokk:revision_number'] }}</strong> <em>{{ revision['edit_summary'] }}</em>
  39. </div>
  40. </div>
  41. {% if type == 'article' %}
  42. <div class="article">
  43. <div>
  44. <textarea id="content" maxlength="10485760">{{ revision['content'] }}</textarea>
  45. </div>
  46. <div id="preview"></div>
  47. </div>
  48. {% endif %}
  49. {% if type == 'file' %}
  50. <div class="file">
  51. <textarea id="content" maxlength="10485760">{{ revision['content'] }}</textarea>
  52. </div>
  53. {% endif %}
  54. {% if type == 'query' %}
  55. <div class="query">
  56. <textarea id="content" maxlength="10485760">{{ revision['content'] }}</textarea>
  57. </div>
  58. {% endif %}
  59. {% if type == 'template' %}
  60. <div class="template">
  61. <textarea id="content" maxlength="10485760">{{ revision['content'] }}</textarea>
  62. </div>
  63. {% endif %}
  64. {% if type == 'topic' %}
  65. <div class="topic">
  66. <textarea id="content" maxlength="10485760">{{ revision['content'] }}</textarea>
  67. </div>
  68. {% endif %}
  69. {% endblock %}