{% extends "layout.html" %}

{% block content_header %}
  {{ build_breadcrumbs([
    { 'name': _('Skills'), 'link': url_for('.SkillView:index'), 'icon': 'trophy' }
  ]) }}
{% endblock %}

{% block content %}
  <section class="content">
    {% call build_list_containers(_('Skill'), 'trophy') %}
      {% call build_list_table() %}
        {% call build_list_table_headers(get=url_for('.SkillView:get', id=''), delete=url_for('.SkillView:delete', id='')) %}
          <th>{{ _('Category') }}</th>
          <th>{{ _('Name') }}</th>
        {% endcall %}
        {% call(skill) build_list_table_rows(resource_list['items']) %}
          <td>{{ skill.category }}</td>
          <td>{{ skill.name }}</td>
        {% endcall %}
      {% endcall %}
    {% endcall %}

    {% call build_hidden_add_containers(_('Add Skill')) %}
      {% call build_form() %}
        {% call add_default_fields(form=form, submit_value=_('Add')) %}
          {{ render_field(form.category) }}
          {{ render_field(form.name) }}
          {{ render_field(form.description) }}
        {% endcall %}
      {% endcall %}
    {% endcall %}
  </section>
{% endblock %}
