Fork de wikipp, le moteur de wiki en c++, basé sur cppcms. Le fork ajoute la langue française
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.

page.tmpl 3.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. <% skin view %>
  2. <% view page uses content::page extends master %>
  3. <% template sidebar() %>
  4. <% if not empty sidebar %>
  5. <hr/>
  6. <div id="navbar_links" >
  7. <%= sidebar | ext markdown %>
  8. </div>
  9. <% end %>
  10. <% end %>
  11. <% template title() %><%= title %><% end %>
  12. <% template navigation() %>
  13. <% if not empty edit_link %>
  14. <a href="<%= edit_link %>"><% gt "Edit" %></a>
  15. &nbsp;/&nbsp;
  16. <a href="<%= history_link %>"><% gt "History" %></a>
  17. &nbsp;/&nbsp;
  18. <% end %>
  19. <% include master::navigation() %>
  20. <% end template %>
  21. <% template main() %>
  22. <%= content | ext markdown %>
  23. <% end %>
  24. <% end view %>
  25. <% view edit_page uses content::edit_page extends page %>
  26. <% template title() %><% if new_page %><% gt "New Article" %><% else %><% gt "Edit" %><% if not empty title %>:<%= title %><% end %><% end %><% end %>
  27. <% template navigation() %>
  28. <% if not empty edit_link %>
  29. <a href="<%= back %>"><% gt "Back to page" %></a>
  30. &nbsp;/&nbsp;
  31. <a href="<%= history_link %>"><% gt "History" %></a>
  32. &nbsp;/&nbsp;
  33. <% end %>
  34. <% include master::navigation() %>
  35. <% end template %>
  36. <% template main() %>
  37. <% if not empty title %>
  38. <% include page::main() %>
  39. <% end %>
  40. <script type="text/javascript">
  41. <!--
  42. document.write('<for')
  43. document.write('m actio')
  44. document.write('n="')
  45. document.write('<%= submit %>" me')
  46. document.write('thod="po')
  47. document.write('st">')
  48. -->
  49. </script>
  50. <% csrf %>
  51. <table>
  52. <% form as_table form.fields %>
  53. </table>
  54. <p><% form as_space form.buttons %></p>
  55. <script type="text/javascript">
  56. <!--
  57. document.write('</fo')
  58. document.write('rm>')
  59. -->
  60. </script>
  61. <% end template %>
  62. <% end view %>
  63. <% view page_hist uses content::page_hist extends page %>
  64. <% template title() %>
  65. <% include page::title() %>
  66. <% end template %>
  67. <% template navigation() %>
  68. <a href="<%= rollback %>"><% gt "Edit this version (rollback)" %></a>
  69. &nbsp;/&nbsp;
  70. <% include page::navigation() %>
  71. <% end template %>
  72. <% template main() %>
  73. <div class="published"><% gt "(version {1,num}, from {2,dt=s})" using version, date %></div>
  74. <% include page::main() %>
  75. <% end template %>
  76. <% end view %>
  77. <% view diff uses content::diff extends master %>
  78. <% template title() %><% gt "Difference \"{1}\" ver. {2} versus ver. {3}" using title,v1,v2 %><% end template %>
  79. <% template navigation() %>
  80. <a href="<%= edit_v1 %>"><% gt "Edit version {1,num}" using v1 %></a>
  81. &nbsp;/&nbsp;
  82. <a href="<%= edit_v2 %>"><% gt "Edit version {1,num}" using v2 %></a>
  83. &nbsp;/&nbsp;
  84. <% include master::navigation() %>
  85. <% end template %>
  86. <% template show_diff(content::diff_t &content) %>
  87. <table style="width:100%" >
  88. <% foreach r in content %>
  89. <% item %>
  90. <tr class="<% if (r.first<0) %>d_del<% elif (r.first>0) %>d_add<% else %>d_no<% end %>" >
  91. <td><code><%= r.second %></code></td>
  92. </tr>
  93. <% end %>
  94. <% end %>
  95. </table>
  96. <% end template %>
  97. <% template main() %>
  98. <% if no_versions %>
  99. <h2><% gt "No such page or version exist" %></h2>
  100. <% elif no_diff %>
  101. <h2><% gt "No difference between these versions" %></h2>
  102. <% else %>
  103. <% if title_diff %>
  104. <h2><% gt "Titles" %>:</h2>
  105. <table style="width:100%">
  106. <tr><th><% gt "Version {1}" using v1 %></th><th><% gt "Version {1}" using v2 %></th>
  107. <tr><td><%= title_1 %></td><td><%= title_2 %></td></tr>
  108. </table>
  109. <% end %>
  110. <% if content_diff %>
  111. <h2><% gt "Content" %>:</h2>
  112. <% include show_diff(content_diff_content) %>
  113. <% end %>
  114. <% if pad_url_diff %>
  115. <h2><% gt "Pad URL" %>:</h2>
  116. <% include show_diff(pad_url_diff_content) %>
  117. <% end %>
  118. <% if sidebar_diff %>
  119. <h2><% gt "Sidebar" %>:</h2>
  120. <% include show_diff(sidebar_diff_content) %>
  121. <% end %>
  122. </table>
  123. <% end %>
  124. <% end template %>
  125. <% end view %>
  126. <% end skin %>