changeset 5:63696b279e35

Display news links and send to friend on the summary page. Use icons.
author Brian Neal <bgneal@gmail.com>
date Sat, 11 Apr 2009 19:45:17 +0000
parents 9a8801fa63d5
children b6263ac72052
files gpp/templates/news/story.html gpp/templates/news/story_summary.html media/css/base.css media/icons/bullet_go.png media/icons/comments.png media/icons/link_break.png media/icons/tag_blue.png
diffstat 7 files changed, 23 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/gpp/templates/news/story.html	Sat Apr 11 18:52:19 2009 +0000
+++ b/gpp/templates/news/story.html	Sat Apr 11 19:45:17 2009 +0000
@@ -18,6 +18,7 @@
 <div class="news-details">
    Submitted by {{ story.submitter.username }} on {{ story.date_published|date:"F d, Y" }}.
 </div>
+<hr />
 <div class="news-content">
    <a href="{% url news.views.category category=story.category.id,page=1 %}">
    <img src="{{ story.category.icon.url }}" alt="{{ story.category.title }}" title="{{ story.category.title }}" 
@@ -27,8 +28,9 @@
    <br clear="all" />
    {% tags_for_object story as story_tags %}
    {% if story_tags %}
+   <hr />
    <div class="news-tags">
-      <span>Tags:</span>
+      <img src="{{ MEDIA_URL }}icons/tag_blue.png" alt="Tags" title="Tags" />
       <ul>
          {% for tag in story_tags %}
             <li><a href="{% url news-tag_page tag_name=tag.name,page=1 %}">{{ tag.name }}</a></li>
@@ -39,8 +41,10 @@
    <p>
    <a href="{{ story.get_absolute_url }}"><img src="{{ MEDIA_URL }}icons/link.png"
       alt="Story Permalink" title="Story Permalink" /></a>
+{% if user.is_authenticated %}
    <a href="{% url news.views.email_story story.id %}"><img src="{{ MEDIA_URL }}icons/email_go.png"
       alt="Send this story to a friend" title="Send this story to a friend" /></a>
+{% endif %}
    </p>
 </div>
 {% get_comment_count for story as comment_count %}
--- a/gpp/templates/news/story_summary.html	Sat Apr 11 18:52:19 2009 +0000
+++ b/gpp/templates/news/story_summary.html	Sat Apr 11 19:45:17 2009 +0000
@@ -1,7 +1,7 @@
 {% load comment_tags %}
 {% get_comment_count for story as comment_count %}
 <div class="news-story-container">
-<h4><a href="{% url news.views.story story.id %}">{{ story.title }}</a></h4>
+<h4><a href="{{ story.get_absolute_url }}">{{ story.title }}</a></h4>
 <div class="news-details">
    Submitted by {{ story.submitter.username }} on {{ story.date_published|date:"F d, Y" }}.
 </div>
@@ -11,15 +11,25 @@
 <div class="news-content">
    {{ story.short_text|safe }}
 </div>
+{% if story.long_text %}
 <p>
-{% if story.long_text or comment_count %}
-<a href="{% url news.views.story story.id %}">Read more...</a> |
+<img src="{{ MEDIA_URL }}icons/bullet_go.png" alt="Read More" />
+<a href="{{ story.get_absolute_url }}">There is more to this story, continue reading ...</a>
+</p>
 {% endif %}
-<a href="{% url news.views.story story.id %}">{{ comment_count }} comment{{ comment_count|pluralize }}</a>.
+<hr />
+<p>
+<img src="{{ MEDIA_URL }}icons/comments.png" alt="Comments" />
+<a href="{{ story.get_absolute_url }}">{{ comment_count }} comment{{ comment_count|pluralize }}</a>
+<a href="{{ story.get_absolute_url }}"><img src="{{ MEDIA_URL }}icons/link.png" alt="Permalink" title="Permalink" /></a>
+{% if user.is_authenticated %}
+<a href="{% url news.views.email_story story.id %}"><img src="{{ MEDIA_URL }}icons/email_go.png"
+   alt="Send this story to a friend" title="Send this story to a friend" /></a>
+{% endif %}
 </p>
 {% if story_tags %}
 <div class="news-tags">
-   <span>Tags:</span>
+   <img src="{{ MEDIA_URL }}icons/tag_blue.png" alt="Tags" title="Tags" />
    <ul>
       {% for tag in story_tags %}
          <li><a href="{% url news-tag_page tag_name=tag.name,page=1 %}">{{ tag.name }}</a></li>
--- a/media/css/base.css	Sat Apr 11 18:52:19 2009 +0000
+++ b/media/css/base.css	Sat Apr 11 19:45:17 2009 +0000
@@ -98,3 +98,6 @@
 .breadcrumbs {
    font-size: x-small;
 }
+table {
+   width: auto;
+}
Binary file media/icons/bullet_go.png has changed
Binary file media/icons/comments.png has changed
Binary file media/icons/link_break.png has changed
Binary file media/icons/tag_blue.png has changed