{% extends "user/edit_base.html" %}
{% import 'macros/nav_link.html' as nav %}

{% set user = current_user %}
{% set org_type = h.default_group_type('organization') %}
{% set group_type = h.default_group_type('group') %}
{% set dataset_type = h.default_package_type() %}

{% block content_action %}
  {% link_for _('Profile settings'), named_route='user.edit', id=user.name, class_='btn btn-secondary', icon='cog' %}
{% endblock %}

{% block breadcrumb_content %}
  <li class="active"><a href="{{ h.url_for('dashboard.datasets') }}">{{ _('Dashboard') }}</a></li>
{% endblock %}

{% block secondary_content %}
  <ul class="nav nav-options">
    {% block dashboard_nav_links %}
      {{ nav.link(h.url_for('dashboard.datasets'), h.humanize_entity_type('package', dataset_type, 'my label') or _('My Datasets'), icon='sitemap') }}
      {{ nav.link(h.url_for('dashboard.organizations'), h.humanize_entity_type('organization', org_type, 'my label') or _('My Organizations'), icon='building') }}
      {{ nav.link(h.url_for('dashboard.groups'), h.humanize_entity_type('group', group_type, 'my label') or _('My Groups'), icon='users') }}
    {% endblock dashboard_nav_links %}
  </ul>
{% endblock secondary_content %}

{% block primary %}
<div class="primary col-md-8 col-lg-9 col-xs-12" role="main">
  <article class="module">
    <div class="module-content">
      <div class="dashboard-container row">
        <div class="col-md-8">
          {% block page_heading %}{% endblock %}
        </div>
        {% if self.page_primary_action() | trim %}
          <div class="page_primary_action col-md-4">
            {% block page_primary_action %}{% endblock %}
          </div>
        {% endif %}
      </div>
      {% block primary_content_inner %}
      {% endblock %}
    </div>
  </article>
</div>
{% endblock %}
