comparison gpp/templates/news/story.html @ 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 dbd703f7d63a
children b6263ac72052
comparison
equal deleted inserted replaced
4:9a8801fa63d5 5:63696b279e35
16 {% block news_content %} 16 {% block news_content %}
17 <h3>{{ story.title }}</h3> 17 <h3>{{ story.title }}</h3>
18 <div class="news-details"> 18 <div class="news-details">
19 Submitted by {{ story.submitter.username }} on {{ story.date_published|date:"F d, Y" }}. 19 Submitted by {{ story.submitter.username }} on {{ story.date_published|date:"F d, Y" }}.
20 </div> 20 </div>
21 <hr />
21 <div class="news-content"> 22 <div class="news-content">
22 <a href="{% url news.views.category category=story.category.id,page=1 %}"> 23 <a href="{% url news.views.category category=story.category.id,page=1 %}">
23 <img src="{{ story.category.icon.url }}" alt="{{ story.category.title }}" title="{{ story.category.title }}" 24 <img src="{{ story.category.icon.url }}" alt="{{ story.category.title }}" title="{{ story.category.title }}"
24 class="news-icon" /></a> 25 class="news-icon" /></a>
25 {{ story.short_text|safe }} 26 {{ story.short_text|safe }}
26 {{ story.long_text|safe }} 27 {{ story.long_text|safe }}
27 <br clear="all" /> 28 <br clear="all" />
28 {% tags_for_object story as story_tags %} 29 {% tags_for_object story as story_tags %}
29 {% if story_tags %} 30 {% if story_tags %}
31 <hr />
30 <div class="news-tags"> 32 <div class="news-tags">
31 <span>Tags:</span> 33 <img src="{{ MEDIA_URL }}icons/tag_blue.png" alt="Tags" title="Tags" />
32 <ul> 34 <ul>
33 {% for tag in story_tags %} 35 {% for tag in story_tags %}
34 <li><a href="{% url news-tag_page tag_name=tag.name,page=1 %}">{{ tag.name }}</a></li> 36 <li><a href="{% url news-tag_page tag_name=tag.name,page=1 %}">{{ tag.name }}</a></li>
35 {% endfor %} 37 {% endfor %}
36 </ul> 38 </ul>
37 </div> 39 </div>
38 {% endif %} 40 {% endif %}
39 <p> 41 <p>
40 <a href="{{ story.get_absolute_url }}"><img src="{{ MEDIA_URL }}icons/link.png" 42 <a href="{{ story.get_absolute_url }}"><img src="{{ MEDIA_URL }}icons/link.png"
41 alt="Story Permalink" title="Story Permalink" /></a> 43 alt="Story Permalink" title="Story Permalink" /></a>
44 {% if user.is_authenticated %}
42 <a href="{% url news.views.email_story story.id %}"><img src="{{ MEDIA_URL }}icons/email_go.png" 45 <a href="{% url news.views.email_story story.id %}"><img src="{{ MEDIA_URL }}icons/email_go.png"
43 alt="Send this story to a friend" title="Send this story to a friend" /></a> 46 alt="Send this story to a friend" title="Send this story to a friend" /></a>
47 {% endif %}
44 </p> 48 </p>
45 </div> 49 </div>
46 {% get_comment_count for story as comment_count %} 50 {% get_comment_count for story as comment_count %}
47 <p>This story has <span id="comment-count">{{ comment_count }}</span> comment{{ comment_count|pluralize }}.</p> 51 <p>This story has <span id="comment-count">{{ comment_count }}</span> comment{{ comment_count|pluralize }}.</p>
48 <hr /> 52 <hr />