Changeset - bea2e1110880
[Not reviewed]
0 1 0
Bradley Kuhn (bkuhn) - 7 years ago 2017-09-13 16:42:08
bkuhn@ebb.org
Blog: add permalink on partial entries.

I noticed there is no link on the blog pages (other than on the front
page) to get the link to the blog post itself. This adds a permalink at
the end near the tags.

I considered making the title itself a link, which is what's done on the
frontpage, but I figured this might look nicer. Feel free to change
this if you're looking this commit message and feel I didn't DTRT
here. :)
1 file changed with 3 insertions and 0 deletions:
0 comments (0 inline, 0 general)
www/conservancy/templates/blog/entry_partial.html
Show inline comments
...
 
@@ -15,35 +15,38 @@ This partial accepts these optional parameters:
 
{% endcomment %}
 

	
 
<div class="blog-entry">
 

	
 
<{{ htag|default:"h3" }} class="clear"
 
  >{% if show|default:"body" != "body" %}<a href="{{ entry.get_absolute_url }}"
 
  >{% endif %}{{ entry.headline|safe }}{% if show|default:"body" != "body" %}</a>{% endif %}</{{ htag|default:"h3" }}>
 

	
 
{% if show != "headline" %}
 
<p class="date">by <span class="author">{{ entry.author.formal_name }}</span>
 
  on {{ entry.pub_date|date:"F j, Y" }}
 
</p>
 

	
 
{% if show != "dateline" %}
 

	
 
{% if show|default:"body" == "body" %}
 
{{ entry.body|safe }}
 
{% else %}
 
{{ entry.summary|safe }}
 
{% endif %}
 

	
 
{% if show|default:"body" != "body" %}
 
<p><a class="continued" href="{{ entry.get_absolute_url }}">Read More&hellip;</a></p>
 
{% endif %}
 
{% if show != "summary"}
 
<p class="permalink"><a href="{{ entry.get_absolute_url }}">[permalink]</a></p>
 
{% endif %}
 

	
 
{% if show != "summary" and entry.tags.exists %}
 
<p class="blog-tags">Tags:
 
  {% for tag in entry.tags.iterator %}
 
  <a href="{{ tag.get_absolute_url }}">{{ tag.label }}</a>{% if not forloop.last %}, {% endif %}{% endfor %}</p>
 
{% endif %}
 

	
 
{% endif %}{# show != "dateline" #}
 
{% endif %}{# show != "headline" #}
 

	
 
</div>
0 comments (0 inline, 0 general)