<%inherit file="/template.html" />
<%namespace name="components" file="/components.html"/>

<%def name="title()">${_("Users")}</%def>

<%def name="breadcrumbs()">
    ${h.user.breadcrumbs(None)|n}
</%def>

<!-- FIXME: Move required parts to new design
<div class="top_actions title">
    %if can.instance.join(c.instance):
        <a class="button add ttip" title="${_('Join this instance to start contributing.')}"
            href="${h.entity_url(c.instance, member='join')}?${h.url_token()}">${_("join")}</a>
    %endif
    %if not c.user:
        <a class="button add ttip" title="${_('Join this instance to start contributing.')}" href="/register">${_("join")}</a>
    %endif
</div>
-->

<%block name="headline">
<h1>
    ${_("Members")}
</h1>
</%block>

<%block name="sidebar">
    ${components.message_button(c.instance)}
    %if c.instance is not None and (h.has_permission('global.admin') or can.instance.authenticated_edit(c.instance)):
    <a class="button_round" href="${h.entity_url(c.instance, member='members_import')}">${_('Import Members')}</a>
    %endif
    ${c.users_pager.render_facets(cls='sidebar_box')}
</%block>

<%block name="main_content">
    <!--
    <form action="?" method="GET" autocomplete="off">
        <input id="users_q" class="live_search" name="users_q"
                type="text" value="${request.params.get('users_q', '')}"
                placeholder="${_('Find users')}" autofocus="autofocus" />
    </form>
    -->

    <div id="users_table" class="table">
        ${c.users_pager.render_pager()}
    </div>

<%components:tutorial>
        <ol id="joyRideTipContent">
          <li data-id="users_table"
              data-tip-location="top right">
            <p>${_('tutorial_user_index_table')|n}</p>
          </li>
          <li data-id="facets-heading"
              data-tip-location="top left"
              data-next="${_('Close')}">
            <p>${_('tutorial_user_index_facets')|n}</p>
          </li>
        </ol>
</%components:tutorial>

</%block>
