The version of vichan running on lainchan.org
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

72 lignes
2.0KB

  1. {% if mod|hasPermission(config.mod.news) %}
  2. <fieldset>
  3. <legend>{% trans 'New post' %}</legend>
  4. <form style="margin:0" action="" method="post">
  5. <input type="hidden" name="token" value="{{ token }}">
  6. <table>
  7. <tr>
  8. <th>
  9. {% if mod|hasPermission(config.mod.news_custom) %}
  10. <label for="name">{% trans 'Name' %}</label>
  11. {% else %}
  12. {% trans 'Name' %}
  13. {% endif %}
  14. </th>
  15. <td>
  16. {% if mod|hasPermission(config.mod.news_custom) %}
  17. <input type="text" size="55" name="name" id="name" value="{{ mod.username|e }}">
  18. {% else %}
  19. {{ mod.username|e }}
  20. {% endif %}
  21. </td>
  22. </tr>
  23. <tr>
  24. <th><label for="subject">{% trans 'Subject' %}</label></th>
  25. <td><input type="text" size="55" name="subject" id="subject"></td>
  26. </tr>
  27. <tr>
  28. <th><label for="body">{% trans 'Body' %}</label></th>
  29. <td><textarea name="body" id="body" style="width:100%;height:100px"></textarea></td>
  30. </tr>
  31. </table>
  32. <p style="text-align:center">
  33. <input type="submit" value="{% trans 'Post news entry' %}">
  34. </p>
  35. </form>
  36. </fieldset>
  37. {% endif %}
  38. {% for post in news %}
  39. <div class="ban">
  40. {% if mod|hasPermission(config.mod.news_delete) %}
  41. <span style="float:right;padding:2px">
  42. <a class="unimportant" href="?/edit_news/delete/{{ post.id }}/{{ post.delete_token }}">[{% trans 'delete' %}]</a>
  43. </span>
  44. {% endif %}
  45. <h2 id="{{ post.id }}">
  46. <small class="unimportant">
  47. <a href="#{{ post.id }}">#</a>
  48. </small>
  49. {% if post.subject %}
  50. {{ post.subject|e }}
  51. {% else %}
  52. <em>{% trans 'no subject' %}</em>
  53. {% endif %}
  54. <small class="unimportant">
  55. &mdash; {% trans 'by' %} {{ post.name }} {% trans 'at' %} {{ post.time|date(config.post_date) }}
  56. </small>
  57. </h2>
  58. <p>
  59. {{ post.body }}
  60. </p>
  61. </div>
  62. {% endfor %}
  63. {% if count > news|count %}
  64. <p class="unimportant" style="text-align:center;word-wrap:break-word">
  65. {% for i in range(0, (count - 1) / config.mod.news_page) %}
  66. <a href="?/news/{{ i + 1 }}">[{{ i + 1 }}]</a>
  67. {% endfor %}
  68. </p>
  69. {% endif %}