diff options
author | Dan McGee <dan@archlinux.org> | 2010-05-24 21:13:46 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2010-05-24 21:13:46 -0500 |
commit | e817efad53bc075ca94e6effd6eb3b6c838e2e63 (patch) | |
tree | 6bd4dae53aca75fef1f7480769ca2c42fe473e85 /templates/news | |
parent | b3e8354cdff4af8117feda0806a7c1104d5bb30e (diff) | |
parent | a24e503a63599fb5495fd85cba5806a34c695bb6 (diff) |
Merge branch 'redesign'
Conflicts:
templates/public/download.html
Diffstat (limited to 'templates/news')
-rw-r--r-- | templates/news/add.html | 39 | ||||
-rw-r--r-- | templates/news/delete.html | 29 | ||||
-rw-r--r-- | templates/news/list.html | 69 | ||||
-rw-r--r-- | templates/news/view.html | 29 |
4 files changed, 103 insertions, 63 deletions
diff --git a/templates/news/add.html b/templates/news/add.html index ef3f211c..38b5b21d 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 c3824a26..6a2fa1e8 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> <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 a35c41e0..cadc24a2 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 %} + <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 2f7c3d87..1b82bc08 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 %} |