{% extends 'subscriptions/base_developer.html' %}

{% load i18n %}

{% block title %}DFS Dashboard | Tags{% endblock %}

{% block subscriptions_styles %}
  <style>
    @media screen and (min-width: 64em) {
      #dfs-container .dashboard-container .table-header {
        display: block;
      }
    }
  </style>
{% endblock %}

{% block main %}
  <div class="breadcrumb">
    <a href="{% url 'dfs_dashboard' %}">Developer Dashboard</a>
    > Tags
  </div>

  <h2>Tags</h2>

  {% include 'subscriptions/snippets/messages.html' %}

  <a class="button-positive" href="{% url 'dfs_tag_create' %}">Create new tag</a>

  {% if tags %}
    <div class="plan-table">
      <div class="table-header">
        <div>{% trans "Tag name" %}</div>
      </div>

      {% for tag in tags %}
        <div class="table-body">
          <div>
            <span class="table-title">{% trans "Tag name" %}</span>
            {{ tag.tag }}
          </div>
          <div>
            <a class="button-positive" href="{% url 'dfs_tag_update' tag.id %}">{% trans "Edit" %}</a>
            <a class="button-negative" href="{% url 'dfs_tag_update' tag.id %}">{% trans "Delete" %}</a>
          </div>
        </div>
      {% endfor %}

      <a class="button-positive" href="{% url 'dfs_tag_create' %}">Create new tag</a>
    </div>
  {% else %}
    <p>{% trans "No tags have been added yet." %}</p>
  {% endif %}
{% endblock %}
