Changeset - 855584408b47
[Not reviewed]
0 2 0
Bradley Kuhn (bkuhn) - 9 years ago 2015-03-04 23:32:32
bkuhn@ebb.org
Move blog index to be part of base template.

This way, it's not on the bottom of pages. This shouldn't cause
trouble, since when date_list isn't defined, nothing is shown by this
code.
2 files changed with 6 insertions and 7 deletions:
0 comments (0 inline, 0 general)
www/conservancy/templates/base_blog.html
Show inline comments
...
 
@@ -21,12 +21,18 @@
 
<ul>
 
{% for tag in all_tags %}
 
<li><a href="{{ tag.get_absolute_url }}">{{ tag.label }}</a>
 
(<a href="/feeds/blog/?tag={{ tag.slug }}">rss</a>)</li>
 
{% endfor %}
 
</ul>
 
{% if date_list %}
 
<h3>Blog Index by Year</h3>
 
<ul>
 
{% for year in date_list reversed %}<li><a href="{{ year|date:"Y" }}/">{{ year|date:"Y" }}</a></li>{% endfor %}
 
</ul>
 
{% endif %}
 

	
 
<h2><a href="/blog/">See all posts&hellip;</a></h2>
 
<!-- <p><a href="/blog/query/">Query...</a></p> -->
 
         </div>
 
               <div id="mainContent">{% block content %}{% endblock %}
 
               </div>
www/conservancy/templates/blog/entry_list.html
Show inline comments
...
 
@@ -26,14 +26,7 @@
 
{% if blog_entries.has_next %}<a class="next_page_button" href="?page={{ blog_entries.next_page_number }}{% if query_string %}&amp;{{ query_string|escape }}{% endif %}">Next page (older) &raquo;</a>{% endif %}
 
{% if blog_entries.has_previous %}<a href="?page={{ blog_entries.previous_page_number }}{% if query_string %}&amp;{{ query_string|escape }}{% endif %}">&laquo; Previous page (newer)</a>{% endif %}
 
</p>
 
<p class="pagination_list">{% if blog_entries.num_pages > 1 %} {% for pagenum in blog_entries.paginator.page_range %}{% ifequal pagenum blog_entries.number %}[{{ pagenum }}]{% else %}<a href="?page={{ pagenum }}">{{ pagenum }}</a>{% endifequal %} {% endfor %}{% endif %}</p>
 
<div class="clear"></div>
 

	
 
{% if date_list %}
 
<h3>Blog Index by Year</h3>
 
<ul>
 
{% for year in date_list reversed %}<li><a href="{{ year|date:"Y" }}/">{{ year|date:"Y" }}</a></li>{% endfor %}
 
</ul>
 
{% endif %}
 

	
 
{% endblock %}
0 comments (0 inline, 0 general)