Lösungen der Aufgaben vom Kurs MEIM1 - Web Engineering von Prof. Hofmann
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 1.0KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. {% extends 'base.html' %}
  2. {% block title %}
  3. Index
  4. {% endblock %}
  5. {% block content %}
  6. <script>
  7. var es = new ReconnectingEventSource('/events/');
  8. es.addEventListener('message', function (e) {console.log(e.data); location.reload();});
  9. </script>
  10. <div class=container>
  11. <h1 class="display-4">Your Posts</h1>
  12. <div class=container>
  13. {% for notice in notices %}
  14. <div class="jumbotron">
  15. <h3>{{ notice.notice_title }}</h3>
  16. <p>{{ notice.notice_text }}</p>
  17. <p>
  18. <a href="{% url 'delete' deleteId=notice.id %}" class="btn btn-danger" role="button">Delete</a>
  19. </p>
  20. {% if message %}
  21. <script>
  22. alert('{{ message }}');
  23. </script>
  24. {% endif %}
  25. </div>
  26. {% endfor %}
  27. <div class=container>
  28. <p><a href="{% url 'new' %}" class="btn btn-info" role="button">Neue Nachricht</a></p>
  29. </div>
  30. </div>
  31. <!--p class="lead">Some placeholder Text</p-->
  32. </div>
  33. {% endblock %}