{% load i18n %}
<div id="resources-selector">
    <div id="resourcepane-main" class="resourcePane">
        <div class="mediaresource-help">{% blocktrans %}Select an account:{% endblocktrans %}</div>
        <div class="tnGrid tngridcols-5x">
        {% for scope in scopes %}
            <div class="tnGridItem">
              <div class="thumbnail-account-part thumbnail-62-bottom">
                <a href="{{scope.url}}"
                   title="{{scope.title}}"
                   class="image-block image-block-withicons">
                {% for icon_url in scope.icons %}
                    <img src="{{icon_url}}" />
                {% endfor %}
                </a>
                <label>
                  <a href="{{scope.url}}">{{scope.title}}</a>
                </label>
              </div>
              <input type="hidden"
                     name="scope-input"
                     class="scope-input"
                     value="{{scope.id}}" />
            </div>
        {% endfor %}
        </div>
    </div>
{% for scope in scopes %}
    <div id="resourcepane-{{scope.id}}" class="resourcePane resourcePaneFiles{{scope.activeClass}}">
    <input type="hidden"
           class="scopeId"
           name="scopeId"
           value="{{scope.id}}"/>
   <input type="hidden"
          class="publisherId"
          name="publisherId"
          value="{{publisher_id}}"/>
    {% with scope.title as scope_title %}
        <div class="mediaresource-help mediaresource-scopetitle"{% if not scope.icons %} style="display:none"{% endif %}>{% blocktrans %}Select a picture from account <strong>{{scope_title}}</strong>:{% endblocktrans %}</div>                           
        <div class="mediaresource-help mediaresource-noresults"{% if scope.icons %} style="display:none"{% endif %}>{% blocktrans %}No picture available in account <strong>{{scope_title}}</strong>{% endblocktrans %}</div>
    {% endwith %}
        <div class="resource-back-button">{% blocktrans %}Go back{% endblocktrans %}</div>
        <div class="tnGrid tngridcols-6x">
        {% comment %}
          Resources are now loaded in ajax for many useful reasons : reload after upload / batch / search / performance ...
        {% endcomment %}
        </div>
    </div>
{% endfor %}
    <div class="clear"><!-- --></div>
</div>