summaryrefslogtreecommitdiffstats
path: root/templates/news
diff options
context:
space:
mode:
Diffstat (limited to 'templates/news')
-rw-r--r--templates/news/add.html26
-rw-r--r--templates/news/delete.html16
-rw-r--r--templates/news/list.html26
-rw-r--r--templates/news/view.html13
4 files changed, 81 insertions, 0 deletions
diff --git a/templates/news/add.html b/templates/news/add.html
new file mode 100644
index 0000000..702d7ab
--- /dev/null
+++ b/templates/news/add.html
@@ -0,0 +1,26 @@
+{% extends "base.html" %}
+
+{% block content %}
+ <div class="greybox">
+ {% if news %}
+ <h2 class="title">Edit News</h2>
+ {% else %}
+ <h2 class="title">Add News</h2>
+ {% endif %}
+ <form method="post" action=".">
+ <table>
+ <tr>
+ <td>Title:</td>
+ <td>{{ form.title }}</td>
+ </tr><tr>
+ <td style="vertical-align:top">Content:</td>
+ <td>{{ form.content }}</td>
+ </tr><tr>
+ <td colspan="2" align="right">
+ <input type="submit" value=" Save " />
+ </td>
+ </tr>
+ </table>
+ </form>
+ </div>
+{% endblock %}
diff --git a/templates/news/delete.html b/templates/news/delete.html
new file mode 100644
index 0000000..7ac5e25
--- /dev/null
+++ b/templates/news/delete.html
@@ -0,0 +1,16 @@
+{% extends "base.html" %}
+
+{% block content %}
+ <div class="greybox">
+ <h2>Confirm Delete</h2>
+ <hr />
+ <form method="post" action=".">
+ <table>
+ <tr>
+ <td>Are You Sure?</td>
+ <td>&nbsp; &nbsp; <input name="delete" type="submit" value=" Yes " /></td>
+ </tr>
+ </table>
+ </form>
+ </div>
+{% endblock %}
diff --git a/templates/news/list.html b/templates/news/list.html
new file mode 100644
index 0000000..e188e3c
--- /dev/null
+++ b/templates/news/list.html
@@ -0,0 +1,26 @@
+{% extends "base.html" %}
+
+{% block content %}
+ <div class="greybox">
+ {% if perms.news.add_news %}
+ <div style="float:right">
+ <a href="/news/add/">Add News Item</a>
+ </div>
+ {% endif %}
+ <h2 class="title">News Updates</h2>
+ <table class="results" width="100%">
+ {% for item in news %}
+ <tr>
+ <td>{{ item.postdate }}</td>
+ <td><a href="{{ item.get_absolute_url }}">{{ item.title }}</a></td>
+ <td>
+ {% comment %}{% if item.author %}{% ifequal user.username item.author.username %}{% endcomment %}
+ <a href="/news/edit/{{ item.id }}/">edit</a>
+ <a href="/news/delete/{{ item.id }}/">delete</a>
+ {% comment %}{% endifequal %}{% endif %}{% endcomment %}
+ </td>
+ </tr>
+ {% endfor %}
+ </table>
+ </div>
+{% endblock %}
diff --git a/templates/news/view.html b/templates/news/view.html
new file mode 100644
index 0000000..5d10045
--- /dev/null
+++ b/templates/news/view.html
@@ -0,0 +1,13 @@
+{% extends "base.html" %}
+
+{% block content %}
+ <div class="box">
+ <div style="float: right; font-size: small">
+ {{ news.author.get_full_name }}<br />
+ {{ news.postdate }}
+ </div>
+ <h3>{{ news.title }}</h3>
+ <hr /><br />
+ {{ news.content|linebreaks }}
+ </div>
+{% endblock %}