paiji2_shoutbox/templates/shoutbox/bulletin_board_short.html
{% load readmore %}
{% load staticfiles %}
{% load bootstrap3 %}
{% load i18n %}
{% load profile %}
{% load urlize2 %}
<h3>{% trans 'Shoutbox' %}</h3>
<form action="{{ message_add }}" method="post">
{% csrf_token %}
<div class="input-group">
<span class="input-group-addon">
<i class="glyphicon glyphicon-envelope"></i>
{{ request.user.first_name }}
</span>
{% bootstrap_field form.message show_label=False %}
</div>
<input type="hidden" value="{{ request.get_full_path }}" name="next" />
<br/>
{% buttons %}
<button type="submit" style="display:none; position: absolute; left: -9999px; width: 1px; height: 1px;" class="btn btn-success pull-right">
</button>
{% endbuttons %}
<div class="clearfix"></div>
</form>
<ul class="list-unstyled">
{% for note in notes %}
<li>
{% profile_link note.author %}
<span class="pull-right">
{% if note.author == request.user %}
<a href="{% url 'message-edit' note.id %}"><i class="fa fa-pencil"></i></a>
<a href="{% url 'message-delete' note.id %}"><i class="fa fa-trash-o"></i></a>
{% else %}
{% with subject='['|add:_('shoutbox')|add:'] '|add:_('About')|add:' : "'|add:note.message|add:'"' %}
{% mail_link note.author '' subject %}
{% endwith %}
{% endif %}
</span>
{{ note.message|urlize }}
<span class="text-muted">
<small>
{% blocktrans with TimeSince=note.posted_at|timesince %}{{ TimeSince }} ago{% endblocktrans %}
</small>
</span>
</li>
<li>
<hr>
</li>
{% endfor %}
</ul>
<div class="row text-center">
{% comment %}
Just commenting that out for the time being, let's see how users react.
{% if request.user.is_authenticated %}
<div class="col-sm-4 unbreakable">
<a href="{% url 'message-add' %}">
{% trans 'add' %}
</a>
</div>
{% endif %}
{% endcomment %}
<div class="col-sm-12 unbreakable">
<a class="btn btn-default" href="{% url 'message-list' %}">{% trans 'Records' %}</a>
</div>
</div>