{% extends 'layout/page.html' %}

{% block head_title %}
  {{ i18n.gettext('Keyword editing') }}
{% endblock %}

{% block page_header %}
  {{ i18n.gettext('Keyword editing') }}
{% endblock %}

{% block content %}

  <h4>Existing Keywords</h4>
  <p class='text-warning'>
   {{ i18n.gettext('To edit an existing keyword (for spelling or typing errors),
   click on its entry above.') }}
  </p>

  <ul class='nav nav-pills nav-stacked'>
    {% for keyword in db.keyword.list() %}
      <li>
        <a href='keyword{{ keyword.id }}'>{{ keyword.name }}</a>
      </li>
    {% else %}
      <p class='text-mute'>{{ i18n.gettext('There are no keywords yet.  Be the first -') }}</p>
    {% endfor %}
  </ul>

  <form class='form-inline' method="POST" action='{{ context.designator() }}'>
    <input type='text' class='input-xlarge' name='name'>
    <input type="hidden" name="@required" value="name">
    <input type="hidden" name="@template" value="item">
    <input name="@csrf" type="hidden"
           value="{{ utils.anti_csrf_nonce() }}">
    <input type="hidden" name="@action" value="new">
    <input type='submit' class='btn btn-primary' value="{{ i18n.gettext('Create keyword') }}">
  </form>
{% endblock %}
