Commit 211a8543 authored by Carlo Joseph Echon's avatar Carlo Joseph Echon 🐟

Added templates for Announcements

parent a59f4b66
{% extends 'base.html' %}
{% block title %}{{announcement.announcement_title}}{% endblock %}
{% block content %}
<h1>{{announcement.announcement_title}}</h1>
<div>
<h2>by {{announcement.author.first_name}} {{announcement.author.last_name}}, {{announcement.pub_date}}</h2>
<p>
Description: {{announcement.announcement_body}}<br><br>
Reaction:<br>
{% for reaction in reaction_list %}
{% if reaction.announcement.id == announcement.id %}
{{reaction.reaction_name}}: {{reaction.tally}}<br>
{% endif %}
{% endfor %}
</p>
</div>
{% endblock %}
\ No newline at end of file
{% extends 'base.html' %}
{% block title %}Announcements{% endblock %}
{% block content %}
<h1>Announcement Board </h1>
<div>
<h2>Important Announcements:</h2>
{% if announcement_list %}
<ul>
{% for announcement in announcement_list %}
<li><a href="{% url 'announcements:details' announcement.id %}">{{announcement.announcement_title}}</a> by {{announcement.author.first_name}} {{announcement.author.last_name}} dated {{announcement.pub_date}}</li>
{% endfor %}
</ul>
{% else %}
<p>There are no announcements.</p>
{% endif %}
</div>
{% endblock %}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment