4
<div class="oneliner well oneliner-{{oneliner.pk}}">
6
<a href="{% url oneliners.views.oneliner oneliner.pk %}">{{ oneliner.summary|capfirst }}</a>
7
{% if user == oneliner.user %}
8
<a class="btn" href="{% url oneliners.views.oneliner_edit oneliner.pk %}"><i class="icon-pencil"></i>{% if not oneliner.is_published %}<span class="draft">(Not published!)</span>{% endif %}</a>
12
<pre><span class="add-on">bash$ </span>{{ oneliner.line }}</pre>
14
<p class="author"><small>
15
— by <a href="{% url oneliners.views.profile oneliner.user.pk %}"><span>{{ oneliner.user.hackerprofile.get_display_name }}</span></a>
16
on <span>{{ oneliner.created_dt }}</span>
19
<div class="explanation">
21
{{ oneliner.explanation|markdown:"safe" }}
24
{% if oneliner.limitations %}
25
<div class="limitations">
27
{{ oneliner.limitations|markdown:"safe" }}
31
{% if user == question.user and not question.is_answered %}
32
<p><a href="{% url oneliners.ajax.question_answered question.pk oneliner.pk %}" class="btn btn-primary question-answered" data-parent="question-{{ question.pk }}">Accept this answer</a></p>
35
{% if user.is_authenticated and not nobuttons %}
37
<a href="{% url oneliners.views.oneliner_alternative oneliner.pk %}" class="btn">Post an alternative one-liner</a>
38
<a href="{% url oneliners.views.oneliner_comment oneliner.pk %}" class="btn"><i class="icon-comment"></i> Post a comment on this one-liner</a>
45
{% get_comment_count for oneliner as comment_count %}
46
{% if comment_count > 0 %}
48
<h3 class="comments-toggle {{ comments_expanded }}"><img/>Comments ({{ comment_count }})</h3>
49
<div class="well comments {{ comments_expanded }}">
50
{% render_comment_list for oneliner %}
51
{% if user.is_authenticated and not nobuttons %}
52
<p><a href="{% url oneliners.views.oneliner_comment oneliner.pk %}" class="btn"><i class="icon-comment"></i> Post a comment on this one-liner</a></p>