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.

index.html 884B

3 years ago
1234567891011121314151617181920212223242526
  1. {% extends "base.html" %}
  2. {% block title %}
  3. News
  4. {% endblock %}
  5. {% block body %}
  6. <div>
  7. {% if user.is_authenticated %}
  8. <p><a href="{% url 'logout' %}?next=/posts" class="btn btn-warning">Abmelden</a></p>
  9. {% endif %}
  10. {% if not user.is_authenticated %}
  11. <p><a href="{% url 'login' %}?next=/posts" class="btn btn-warning">Anmelden</a></p>
  12. {% endif %}
  13. </div>
  14. <div>
  15. {% for notice in notices %}
  16. <h3> {{ notice.notice_title }}</h3>
  17. <p> {{ notice.notice_text }}</p>
  18. {% if user.is_staff %}
  19. <p><a href="{% url 'delete' deleteId=notice.id %}" class="btn btn-danger"> Meldung löschen </a></p>
  20. {% endif %}
  21. {% endfor %}
  22. </div>
  23. <p><a href="{% url 'new' %}" class="btn btn-info" role="button">Neue Nachricht</a></p>
  24. {% endblock %}