summaryrefslogtreecommitdiffstats
path: root/templates/news
diff options
context:
space:
mode:
authorThayer Williams <thayerw@gmail.com>2010-03-16 19:25:02 +0100
committerDan McGee <dan@archlinux.org>2010-05-17 21:49:44 +0200
commit3945c52682702a9b4b62a46e667f2c3307f06907 (patch)
tree5f7e1ebf52ff4c02ad0a178265b36e5599c6e27e /templates/news
parent06f52613522adebd9228221a4fa36ab5746f4fdd (diff)
downloadarchweb-3945c52682702a9b4b62a46e667f2c3307f06907.tar.gz
archweb-3945c52682702a9b4b62a46e667f2c3307f06907.tar.xz
Redesigned News Pages
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'templates/news')
-rw-r--r--templates/news/add.html39
-rw-r--r--templates/news/delete.html29
-rw-r--r--templates/news/list.html69
-rw-r--r--templates/news/view.html29
4 files changed, 103 insertions, 63 deletions
diff --git a/templates/news/add.html b/templates/news/add.html
index ef3f211..38b5b21 100644
--- a/templates/news/add.html
+++ b/templates/news/add.html
@@ -1,22 +1,25 @@
{% extends "base.html" %}
-{% block title %}Arch Linux - {% if form.instance.id %}Edit{% else %}Add{% endif %} News{% endblock %}
+{% block title %}Arch Linux - News: {% if form.instance.id %}Edit{% else %}Add{% endif %} Article{% endblock %}
{% block content %}
- <div class="greybox">
- {% if form.instance.id %}
- <h2 class="title">Edit News</h2>
- {% else %}
- <h2 class="title">Add News</h2>
- {% endif %}
- <form method="post" id="newsform" action=".">
- <table>
- {{form}}
- <tr>
- <td colspan="2" align="right">
- <input type="submit" value=" Save " />
- </td>
- </tr>
- </table>
- </form>
- </div>
+<div id="news-add-article" class="box">
+
+ {% if form.instance.id %}
+ <h2>News: Edit Article</h2>
+ {% else %}
+ <h2>News: Add Article</h2>
+ {% endif %}
+
+ <form id="newsform" method="post" action=".">
+ <fieldset>
+ {{ form.as_p }}
+ </fieldset>
+ {% if form.instance.id %}
+ <p><label></label> <input title="Save changes" type="submit" value="Save" /></p>
+ {% else %}
+ <p><label></label> <input title="Publish this article" type="submit" value="Publish" /></p>
+ {% endif %}
+ </form>
+
+</div>
{% endblock %}
diff --git a/templates/news/delete.html b/templates/news/delete.html
index c3824a2..6a2fa1e 100644
--- a/templates/news/delete.html
+++ b/templates/news/delete.html
@@ -2,15 +2,22 @@
{% block title %}Arch Linux - Delete News{% endblock %}
{% block content %}
- <div class="greybox">
- <h2>Confirm Delete</h2>
- <hr />
- You are about to delete the news item '{{news}}'.
- <br /><br />
- Are you sure?
- <br /><br />
- <form method="post" action=".">
- <td>&nbsp; &nbsp; <input name="delete" type="submit" value=" Yes " />
- </form>
- </div>
+<div id="news-delete-entry" class="box">
+
+ <h2>News: Delete Entry Confirmation</h2>
+
+ <p>You are about to delete the following news item:</p>
+
+ <blockquote>
+ <strong>{{news}}</strong>
+ </blockquote>
+
+ <p>Are you sure?</p>
+
+ <form method="post" action=".">
+ <input title="Delete this article" id="delete" name="delete"
+ type="submit" value="Delete" /></p>
+ </form>
+
+</div>
{% endblock %}
diff --git a/templates/news/list.html b/templates/news/list.html
index a35c41e..cadc24a 100644
--- a/templates/news/list.html
+++ b/templates/news/list.html
@@ -1,28 +1,49 @@
{% extends "base.html" %}
{% block title %}Arch Linux - News{% endblock %}
+
{% block content %}
- <div class="greybox">
- {% if perms.main.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_list %}
- <tr class="{% cycle pkgr2,pkgr1 %}">
- <td>{{ item.postdate }}</td>
- <td><a href="{{ item.get_absolute_url }}">{{ item.title }}</a></td>
- <td>
- {% if perms.main.change_news %}
- <a href="/news/edit/{{ item.id }}/">edit</a>
- {% endif %}
- {% if perms.main.delete_news %}
- <a href="/news/delete/{{ item.id }}/">delete</a>
- {% endif %}
- </td>
- </tr>
- {% endfor %}
- </table>
- </div>
+<div id="news-article-list" class="box">
+
+ <h2>News Archives</h2>
+
+ {% if perms.main.add_news %}
+ <ul class="admin-actions">
+ <li><a href="/news/add/" title="Add a news item">Add News Item</a></li>
+ </ul>
+ {% endif %}
+
+ <table id="article-list" class="results">
+ <thead>
+ <tr>
+ <th>Published</th>
+ <th>Title</th>
+ <th>Author</th>
+ {% if perms.main.change_news %}
+ <th></th>
+ {% endif %}
+ </tr>
+ </thead>
+ <tbody>
+ {% for item in news_list %}
+ <tr class="{% cycle 'odd' 'even' %}">
+ <td>{{ item.postdate }}</td>
+ <td class="wrap"><a href="{{ item.get_absolute_url }}"
+ title="View: {{ item.title }}">{{ item.title }}</a></td>
+ <td>{{ item.author.get_full_name }}</td>
+ {% if perms.main.change_news %}
+ <td>
+ <a href="/news/edit/{{ item.id }}/"
+ title="Edit: {{ item.title }}">Edit</a>
+ {% endif %}
+ {% if perms.main.delete_news %}
+ &nbsp;&nbsp;<a href="/news/delete/{{ item.id }}/"
+ title="Delete: {{ item.title }}">Delete</a>
+ </td>
+ {% endif %}
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+
+</div>
{% endblock %}
diff --git a/templates/news/view.html b/templates/news/view.html
index 2f7c3d8..1b82bc0 100644
--- a/templates/news/view.html
+++ b/templates/news/view.html
@@ -1,14 +1,23 @@
{% extends "base.html" %}
-{% block title %}Arch Linux - {{ news.title }}{% endblock %}
+{% block title %}Arch Linux - News: {{ news.title }}{% endblock %}
{% 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|safe|linebreaks }}
- </div>
+<div id="news-article" class="box">
+
+ <h2>News: {{ news.title }}</h2>
+
+ {% if perms.main.change_news %}
+ <ul class="admin-actions">
+ <li><a href="/news/edit/{{ news.id }}/" title="Edit this article">Edit News Item</a></li>
+ {% if perms.main.delete_news %}
+ <li><a href="/news/delete/{{ news.id }}/" title="Delete this article">Delete News Item</a></li>
+ {% endif %}
+ </ul>
+ {% endif %}
+
+ <p class="article-info">{{ news.postdate }} - {{ news.author.get_full_name }}</p>
+
+ {{ news.content|safe|linebreaks }}
+
+</div>
{% endblock %}