Commit e9de1bf0 authored by Jan Ericsson Ong Ang's avatar Jan Ericsson Ong Ang

simplifiied templates with forms and url requests

parent 2922be19
{% extends 'base.html' %}
{% load static %}
{% block title %}Widget's Calendar of Activities{% endblock %}
{% block content %}
......@@ -6,19 +7,18 @@
{% block header %}<h1>Widget's Calendar of Activities</h1>{% endblock %}
{% for event in events %}
<a href="{{event.id}}>/details"> {{event.activty}} </a><br>
<a href="{{event.get_absolute_url}}"> {{event.activity}} </a><br>
{% endfor %}
<button type="button" onclick="window.location.href='/calendar/events/add/'">
<a >New Activity</a>
</button>
<br>
<form action="events/add">
<button type="submit">New Activity</button>
</form>
<br>
<a href="dashboard/">Dashboard</a><br>
<a href="announcements/">Announcements</a><br>
<a href="forum/">Forum</a><br>
<a href="assignments/">Assignments</a><br>
<a href="/dashboard">Dashboard</a><br>
<a href="/announcements">Announcements</a><br>
<a href="/forum">Forum</a><br>
<a href="/assignments">Assignments</a><br>
{% endblock %}
\ No newline at end of file
{% extends 'base.html'%}
{% load static %}
{% block title %}
Add a new Activity
Add Activity
{% endblock %}
{% block content %}
<p>Add a new assignment:</p>
<form method="post">
<p>Add a new activity:</p>
<form method="POST">
{% csrf_token %}
{{ form.as_p }}
<button type="submit">Save New Activity</button>
</form>
</form>
{% endblock %}
{% extends 'base.html'%}
{% block title %} {{event.activity}} {% endblock %}
{% block title %} {{object.activity}} {% endblock %}
{% block content %}
{% if assignment %}
<h1>{{assignment.name}}</h1>
<ul>
<p>Date and Time: {{event.target_datetime|date:'m/d/Y, 'h:i A''}}</p><br>
<p>Estimated Hours: {{event.target_datetime}}</p><br>
<p>{{event.course}}</p><br>
<p>Mode: {{location.mode}}</p><br>
<p>Venue: {{location.venue}}</p><br>
</ul>
{% else %}
<p>No Available Books.</p>
{% endif %}
<h1>{{object.activity}}</h1>
<ul>
<li ><button type="button" onclick="window.location.href='/calendar/{{event.pk}}/edit'">Edit Event</button></li>
</ul>
<p>Date and Time: {{object.target_datetime|date:'m/d/Y, h:i A'}}</p>
<p>Estimated Hours: {{object.estimated_hours}}</p>
<p>{{object.course}}</p>
<p>Mode: {{object.location.mode}}</p>
<p>Venue: {{object.location.venue}}</p>
</ul>
<form action="./edit">
<button type="submit">Edit Activity</button>
</form>
{% endblock %}
{% extends 'base.html'%}
{% load static %}
{% block title %}
Edit Activity
{% endblock %}
{% block content %}
<p>Edit Activity:</p>>
<form method="post">
<p>Edit Activity:</p>
<form method="POST">
{% csrf_token %}
{{ form.as_p }}
<button type="submit">Save New Activity</button>
</form>
{% endblock %}
{% 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