Fix previous/nextlinks in blog reader

This commit is contained in:
Gergely Polonkai 2014-06-22 15:16:11 +00:00
parent cfd20cdca1
commit dd8100469d
1 changed files with 3 additions and 2 deletions

View File

@ -1,4 +1,5 @@
{% load code_chunks %} {% load code_chunks %}
{% load get_post_relative_link from blog_link %}
<div class="post"> <div class="post">
<h3>{% if title_links %}<a href="{% url 'blog:read' post.created_at.year post.created_at.month post.created_at.day post.slug %}">{% endif %}{{ post.title }}{% if title_links %}</a>{% else %}<div class="plusone-container"><div class="g-plusone" data-annotation="inline" data-size="small" data-width="300"></div></div>{% endif %}</h3> <h3>{% if title_links %}<a href="{% url 'blog:read' post.created_at.year post.created_at.month post.created_at.day post.slug %}">{% endif %}{{ post.title }}{% if title_links %}</a>{% else %}<div class="plusone-container"><div class="g-plusone" data-annotation="inline" data-size="small" data-width="300"></div></div>{% endif %}</h3>
<p class="article-date">{{ post.created_at|date:'m-d-Y :: H:i' }} by {{ post.user.first_name }} {{ post.user.last_name }}</p> <p class="article-date">{{ post.created_at|date:'m-d-Y :: H:i' }} by {{ post.user.first_name }} {{ post.user.last_name }}</p>
@ -30,9 +31,9 @@
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript> <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a> <a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
{% if prev_post %} {% if prev_post %}
Previous: <a href="{% url 'blog:read' prev_post.created_at.year prev_post.created_at.month prev_post.created_at.day prev_post.slug %}">{{ prev_post.title }}</a> Previous: <a href="{% get_post_relative_link prev_post %}">{{ prev_post.title }}</a>
{% endif %} {% endif %}
{% if next_post %} {% if next_post %}
Next: <a href="{% url 'blog:read' next_post.created_at.year next_post.created_at.month next_post.created_at.day next_post.slug %}">{{ next_post.title }}</a> Next: <a href="{% get_post_relative_link next_post %}">{{ next_post.title }}</a>
{% endif %} {% endif %}
{% endif %} {% endif %}