Commit 2d64e7fb authored by Nics De Vega's avatar Nics De Vega

edited announcement_board templates

parent 586a30f2
{% extends 'base.html' %}
{% load static %}
{% block title %}Add Announcement{% endblock %}
{% block content %}
<h2>Add a new Announcement</h2>
<h1>Add a new Announcement</h1>
<form method="post">
{% csrf_token %}
{% for field in form %}
<h3>{{field.label}}: {{field}} <br><br></h3>
{% endfor %}
{{ form.as_p }}
<input type="submit" value="Add Announcement">
</form>
{% endblock %}
{% extends 'base.html' %}
{% load static %}
{% block title %}{{object.title}}{% endblock %}
{% block content %}
<h2>{{object.title}}</h2>
<ul>
<li><h3>by {{object.author.first_name}} {{object.author.last_name}}</h3></li>
<li><h3>{{object.pub_datetime|date:'m/d/Y h:i A'}}</h3></li>
<li><h3>{{object.body}}</h4></li>
<h1>{{object.title}}</h1>
<h3>by {{object.author.first_name}} {{object.author.last_name}}</h3>
<h3>{{object.pub_datetime|date:'m/d/Y, h:i A'}}</h3>
<h3>{{object.body}}</h3>
{%for key, value in object.get_reactions.items%}
<li><h3>{{key}}: {{value}}</h3></li>
<h3>{{key}}: {{value}}</h3>
{% endfor%}
<h3><a href="../edit/">Edit Announcement</a></h3>
</ul>
<form action="../edit">
<input type="submit" value="Edit Announcement">
</form>
{% endblock %}
{% extends 'base.html' %}
{% load static %}
{% block title %}Edit Announcement{% endblock %}
{% block content %}
<h2>Edit Announcement</h2>
<h1>Edit Announcement</h1>
<form method="post">
{% csrf_token %}
{% for field in form %}
<h3>{{field.label}}: {{field}} <br><br></h3>
{% endfor %}
{{ form.as_p }}
<input type="submit" value="Save Changes to Announcement">
</form>
......
......@@ -3,23 +3,27 @@
{% block title %}Widget's Announcement Board{% endblock %}
{% block content %}
<h2>Welcome to Widget's Announcement Board!</h2>
<br>
<h1>Welcome to Widget's Announcement Board!</h1>
<h3>
{% for object in announcements %}
<h3><a href="{{ object.get_absolute_url }}">{{object.title}} by {{object.author.first_name}} {{object.author.last_name}}</a></h3>
{% endfor %}
<a href="{{ object.get_absolute_url }}">
{{object.title}} by {{object.author.first_name}} {{object.author.last_name}}
</a>
<br>
{% endfor %}
</h3>
<h3><a href="add/">Add Announcement</a></h3>
<br>
<form action="add">
<input type="submit" value="Add Announcement">
</form>
<h2>
<small>
<h3>
<a href="../dashboard/">Dashboard</a><br>
<a href="../forum/">Forum</a><br>
<a href="../assignments/">Assignments</a><br>
<a href="../calendar/">Calendar</a><br>
</h3>
</small>
</h2>
{% endblock %}
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