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.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. <a href="{% url 'edit' editId=notice.id %}" class="btn btn-info" role="button">Edit</a>
  20. </p>
  21. {% if message %}
  22. <script>
  23. alert('{{ message }}');
  24. </script>
  25. {% endif %}
  26. </div>
  27. {% endfor %}
  28. <div class=container>
  29. <p><a href="{% url 'new' %}" class="btn btn-info" role="button">Neue Nachricht</a></p>
  30. </div>
  31. </div>
  32. <!--p class="lead">Some placeholder Text</p-->
  33. </div>
  34. {% endblock %}