{% extends "demos/base.html" %}

{% set display_name = profile_user.first_name | default(profile_user.username, true) %}
{% set username  = profile_user.username %}

{% block pageid %}demos{% endblock %}
{% block bodyclass %}section-demos plain{% endblock %}
{% block title %}{{ page_title(_('{subtitle} | Demo Studio') | f(subtitle=_('{display_name}') | f(display_name=display_name))) }}{% endblock %}

{% block extrahead %}
  <link rel="alternate" type="application/atom+xml" 
      title="{{ _('Demos for {display_name}') | f(display_name=display_name) }}"
      href="{{ url('demos_feed_profile', format='atom', username=username) }}" />
{% endblock %}

{% block content %}

<section id="content">
<div class="wrap">

    {{ demos_head(request) }}

  <section id="content-main" role="main" class="full">
      <header id="page-head" class="gallery">
        <div class="author">
          <h1 class="page-title">
            <img src="{{ profile.gravatar }}" class="photo avatar" width="90" height="90" border="0" /> {{ display_name }}
          </h1>
          {% if profile.location %}
              <p class="loc">{{profile.location}}</p>
          {% endif %}
          {% if profile.profile_url %}
              <p class="web"><a href="{{profile.profile_url}}" rel="me external" class="url">{{profile.profile_url}}</a></p>
          {% endif %}
          {% if false %}
            <p class="edit"><a href="#" class="button edit">{{_("Edit Profile")}}</a></p>
          {% endif %}
        </div>
      </header>

    {{ submission_listing(
        request, submission_list, is_paginated, paginator, page_obj,
        _("Subscribe to a feed of {display_name}'s demos") | f(display_name=display_name),
        url('demos_feed_profile', format='atom', username=username), cols_per_row=4
    ) }}

  </section><!-- /#content-main -->

</div>
</section>{# /#content #}

{% endblock %}
