view gpp/templates/news/story_summary.html @ 507:8631d32e6b16

Some users are still having problems with the pop-up login. I think they are actually getting 403s because of the CSRF protection. So I have modified the base template to always have a javascript variable called csrf_token available when they aren't logged in. The ajax_login.js script was then modified to send this value with the ajax post. Fingers crossed.
author Brian Neal <bgneal@gmail.com>
date Sun, 04 Dec 2011 03:05:21 +0000
parents bdcce55f137e
children
line wrap: on
line source
{% load url from future %}
{% load tagging_tags %}
{% load bio_tags %}
{% load comment_tags %}
{% load core_tags %}
<div class="news-story-container solid-background">
{% if on_home %}
<h3><a href="{{ story.get_absolute_url }}">{{ story.title }}</a></h3>
{% else %}
<h4><a href="{{ story.get_absolute_url }}">{{ story.title }}</a></h4>
{% endif %}
<div class="news-details">
   Submitted by {% profile_link story.submitter.username %} on {{ story.date_submitted|date:"F d, Y" }}.
</div>
<a href="{% url 'news-category' slug=story.category.slug %}">
<img src="{{ story.category.icon.url }}" alt="{{ story.category.title }}" title="{{ story.category.title }}" 
   class="news-icon" /></a>
<div class="news-content">
   {{ story.short_text|safe }}
</div>
{% if story.long_text %}
<p>
<img src="{{ STATIC_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 %}
<hr />
<p>
Category: <a href="{% url 'news-category' slug=story.category.slug %}">{{ story.category.title }}</a>
<img src="{{ STATIC_URL }}icons/comments.png" alt="Comments" title="Comments" />
<a href="{{ story.get_absolute_url }}">{{ story.comment_count }} comment{{ story.comment_count|pluralize }}</a>
<a href="{{ story.get_absolute_url }}"><img src="{{ STATIC_URL }}icons/link.png" alt="Permalink" title="Permalink" /></a>
{% if user.is_authenticated %}
<a href="{% url 'news.views.email_story' story.id %}"><img src="{{ STATIC_URL }}icons/email_go.png"
   alt="Send this story to a friend" title="Send this story to a friend" /></a>
{% endif %}
</p>
{% if story.tag_list %}
<div class="news-tags">
   <img src="{{ STATIC_URL }}icons/tag_blue.png" alt="Tags" title="Tags" /> Tags:
   <ul>
      {% for tag in story.tag_list %}
         <li><a href="{% url 'news-tag_page' tag_name=tag %}">{{ tag }}</a></li>
      {% endfor %}
   </ul>
</div>
{% endif %}
{% social_sharing story.title story.get_absolute_url %}
</div>