{% extends "layout-8x4.html" %}

{% load pgcomment_tags i18n djinn_contenttypes auth_tags contentaction_tags %}

{% block body_class %}ct {{ object.ct_name }} view{% endblock %}

{% block left-pane %}

<article>

  {% block header %}
  <header>
    <h1>{{ object.title }}</h1>
  </header>

  {% block metainfo %}
  <div class="meta-info">
    {% if not object.is_tmp %}
    {% if object.publish_from %}
    {% trans "Published on" %}: {{ object.publish_from }}, 
    {% else %}
    {% trans "Draft" %}, 
    {% endif %}
    {% endif %}
    {% trans "Last change" %}: {{ object.changed }}, 
    {% trans "Reactions" %}: {% comment_count_for user object %}
  </div>
  {% endblock metainfo %}
  {% endblock header %}

  {% block content %}
  {% endblock content %}

  {% if object|implements:"djinn_contenttypes.Commentable" %}
  {% comments_for object %}
  {% endif %}
</article>
{% endblock left-pane %}


{% block right-pane %}
<div class="action-bar">
  {% block extra_actions %}{% endblock extra_actions %}
  {% with perm=object|edit_permission_id %}
  {% ifpermission object request.user perm %}
  {% edit_action object %}
  {% endifpermission %}
  {% endwith %}
</div>

<section id="ownership">
  {% owner object 'False' %}
</section>

{% if object.parentusergroup %}

<section id="content-for-group">
  
  <h3>Geplaatst in de groep</h3>
  
  {% with group=object.parentusergroup.profile %}
  <div class="groupprofilesummary">
    
    <figure>
      <a class="groupprofile" href="{{ group.get_absolute_url }}">
        <img src="{{ group.avatar_url }}"/>
      </a>
    </figure>
    
    <div class="text">
      <a class="groupprofile" 
         href="{{ group.get_absolute_url }}">{{ group }}</a>
    </div>

  </div>
  {% endwith %}
  
</section>

{% endif %}

{% endblock right-pane %}
