Mercurial > public > madeira
changeset 114:4f44b56b43de
Don't show link to news story on detail view.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sun, 20 Oct 2013 14:07:08 -0500 |
parents | 8a0076d7d041 |
children | 44a635748fb9 |
files | madeira/templates/news/news_detail.html madeira/templates/news/news_list.html madeira/templates/news/story.html |
diffstat | 3 files changed, 17 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/madeira/templates/news/news_detail.html Sun Oct 20 11:20:24 2013 -0500 +++ b/madeira/templates/news/news_detail.html Sun Oct 20 14:07:08 2013 -0500 @@ -3,5 +3,6 @@ {% block title %}The Madeira | News{% endblock %} {% block navblock %}{% navbar 'news' %}{% endblock %} {% block content %} -{% include 'news/story.html' %} +<h1>Madeira News</h1> +{% include 'news/story.html' with list_view=False %} {% endblock %}
--- a/madeira/templates/news/news_list.html Sun Oct 20 11:20:24 2013 -0500 +++ b/madeira/templates/news/news_list.html Sun Oct 20 14:07:08 2013 -0500 @@ -3,10 +3,10 @@ {% block title %}The Madeira | News{% endblock %} {% block navblock %}{% navbar 'news' %}{% endblock %} {% block content %} -<h1>News</h1> +<h1>Madeira News</h1> {% if news_list %} {% for story in news_list %} - {% include 'news/story.html' %} + {% include 'news/story.html' with list_view=True %} {% endfor %} {% include 'pagination.html' %} {% else %}
--- a/madeira/templates/news/story.html Sun Oct 20 11:20:24 2013 -0500 +++ b/madeira/templates/news/story.html Sun Oct 20 14:07:08 2013 -0500 @@ -1,7 +1,16 @@ -{% if story.title %} -<h1><a href="{{ story.get_absolute_url }}">{{ story.title }}</a></h1> -<p><em><small>{{ story.date|date:"F d, Y" }}</small></em></p> +{% if list_view %} + {% if story.title %} + <h2><a href="{{ story.get_absolute_url }}">{{ story.title }}</a></h2> + <p><em><small>{{ story.date|date:"F d, Y" }}</small></em></p> + {% else %} + <h2><a href="{{ story.get_absolute_url }}">{{ story.date|date:"F d, Y" }}</a></h2> + {% endif %} {% else %} -<h1><a href="{{ story.get_absolute_url }}">{{ story.date|date:"F d, Y" }}</a></h1> + {% if story.title %} + <h2>{{ story.title }}</h2> + <p><em><small>{{ story.date|date:"F d, Y" }}</small></em></p> + {% else %} + <h2>{{ story.date|date:"F d, Y" }}</h2> + {% endif %} {% endif %} <article class="news">{{ story.content|safe }}</article>