{% load account_tags %}
{% user_display user as user_display %}

<div style="float: right; margin-bottom: 15px;">
{% if es_moderador %}
<div class="btn-group">
  <a class="btn dropdown-toggle btn-inverse" data-toggle="dropdown" href="#">
    {{ _('Moderator actions') }}
    <span class="caret"></span>
  </a>
  <ul class="dropdown-menu">
	{% if not mytopic.closed  %}<li><a href="{% url app_forum-topic-action mytopic.slug 'close' %}"><i class="icon-remove-circle"></i> {{ _('Close Topic') }}</a></li>{% endif %}
	{% if mytopic.closed %}<li><a href="{% url app_forum-topic-action mytopic.slug 'open' %}" ><i class="icon-ok-circle"></i> {{ _('Open Topic') }}</a></li>{% endif %}
	{% if not mytopic.sticky %}<li><a href="{% url app_forum-topic-action mytopic.slug 'sticky' %}"><i class="icon-arrow-up"></i> {{ _('Sticky Topic') }}</a></li>{% endif %}
	{% if mytopic.sticky %}<li><a href="{% url app_forum-topic-action mytopic.slug 'unsticky' %}"><i class="icon-arrow-down"></i> {{ _('Unsticky Topic') }}</a></li>{% endif %}
	<li><a href="" data-toggle="modal" data-target="#deleteTopic"><i class="icon-minus"></i> {{ _('Delete Topic') }}</a></li>
  </ul>
</div>
{% endif %}

{% if user.is_authenticated and not mytopic.closed %}
<p style="margin-top: 10px;"><a href="{% url app_forum-post-add mytopic.slug %}" class="btn"><i class="icon-file"></i> {{ _('New reply') }}</a></p>
{% endif %}
</div>

  <!-- Delete Topic -->
  <div class="modal hide fade" id="deleteTopic">
	<div class="modal-header">
	  <button type="button" class="close" data-dismiss="modal">×</button>
	  <h3>{{ _('Delete a entire topic') }}</h3>
	</div>
	<div class="modal-body">
	  <p>{{ _('You are about to delete a entire topic with all posts inside, this procedure is irreversible') }}</p>
	  <p>{{ _('Do you want to proceed?') }}</p>
	</div>
	<div class="modal-footer">
	  <a href="javascript:$('#modal-from-dom').modal('hide')" class="btn secondary" data-dismiss="modal">{{ _('No') }}</a>
	  <a href="{% url app_forum-topic-delete mytopic.slug %}" class="btn btn-danger">{{ _('Yes') }}</a>
	</div>
  </div>
  <!-- Delete Topic -->
