<commit_before>{% extends 'layout/base.html' %}
{% from 'macros/icons.html' import render_icon %}
{% from 'macros/user.html' import render_user_link %}
{% set current_page = 'ticket' %}
{% set title = 'Tickets' %}

{% block body %}

  <h1>{{ render_icon('ticket') }} {{ title }}</h1>

  <h2>{{ render_icon('user') }} Das von dir genutze Ticket</h2>
  {%- if ticket_mine %}
  {{ render_tickets_table([ticket_mine]) }}
  {%- else %}
  <p><em>keines</em></p>
  {%- endif %}

  <h2>{{ render_icon('administrate') }} Von dir verwaltete Tickets</h2>
  {%- if tickets_managed %}
  {{ render_tickets_table(tickets_managed) }}
  {%- else %}
  <p><em>keine</em></p>
  {%- endif %}

  <h2>{{ render_icon('shopping-cart') }} Von dir gekaufte Tickets</h2>
  {%- if tickets_bought %}
  {{ render_tickets_table(tickets_bought) }}
  {%- else %}
  <p><em>keine</em></p>
  {%- endif %}

{%- endblock body %}

{% macro render_tickets_table(tickets) -%}
  <table class="index wide">
    <thead>
      <tr>
        <th>ID</th>
        <th>Besitzer</th>
        <th>Kategorie</th>
        <th>Sitzplatz</th>
        <th>Nutzer</th>
      </tr>
    </thead>
    <tbody>
      {%- for ticket in tickets|sort(attribute='created_at') %}
      <tr>
        <td>{{ ticket.id|string|truncate(6, killwords=True, end='…') }}</td>
        <td>{{ render_user_link(ticket.owned_by) }}</td>
        <td>{{ ticket.category.title }}</td>
        <td>
          {%- if ticket.used_by -%}
          {{ ticket.occupied_seat.area.title }}
          {%- else -%}
          <span class="tag available">keiner</span><br/>
          {%- endif -%}
          <small>(verwaltet durch {{ render_user_link(ticket.get_seat_manager()) }})</small>
        </td>
        <td>
          {%- if ticket.used_by -%}
          {{ render_user_link(ticket.used_by) }}
          {%- else -%}
          <span class="tag available">frei</span>
          {%- endif -%}
          <br/>
          <small>(verwaltet durch {{ render_user_link(ticket.get_user_manager()) }})</small>
        </td>
      </tr>
      {%- endfor %}
      <tr>
    </tbody>
  </table>
{%- endmacro %}
<commit_msg>Display untruncated ticket ID in tooltip.<commit_after>{% extends 'layout/base.html' %}
{% from 'macros/icons.html' import render_icon %}
{% from 'macros/user.html' import render_user_link %}
{% set current_page = 'ticket' %}
{% set title = 'Tickets' %}

{% block body %}

  <h1>{{ render_icon('ticket') }} {{ title }}</h1>

  <h2>{{ render_icon('user') }} Das von dir genutze Ticket</h2>
  {%- if ticket_mine %}
  {{ render_tickets_table([ticket_mine]) }}
  {%- else %}
  <p><em>keines</em></p>
  {%- endif %}

  <h2>{{ render_icon('administrate') }} Von dir verwaltete Tickets</h2>
  {%- if tickets_managed %}
  {{ render_tickets_table(tickets_managed) }}
  {%- else %}
  <p><em>keine</em></p>
  {%- endif %}

  <h2>{{ render_icon('shopping-cart') }} Von dir gekaufte Tickets</h2>
  {%- if tickets_bought %}
  {{ render_tickets_table(tickets_bought) }}
  {%- else %}
  <p><em>keine</em></p>
  {%- endif %}

{%- endblock body %}

{% macro render_tickets_table(tickets) -%}
  <table class="index wide">
    <thead>
      <tr>
        <th>ID</th>
        <th>Besitzer</th>
        <th>Kategorie</th>
        <th>Sitzplatz</th>
        <th>Nutzer</th>
      </tr>
    </thead>
    <tbody>
      {%- for ticket in tickets|sort(attribute='created_at') %}
      <tr>
        <td title="{{ ticket.id }}">{{ ticket.id|string|truncate(6, killwords=True, end='…') }}</td>
        <td>{{ render_user_link(ticket.owned_by) }}</td>
        <td>{{ ticket.category.title }}</td>
        <td>
          {%- if ticket.used_by -%}
          {{ ticket.occupied_seat.area.title }}
          {%- else -%}
          <span class="tag available">keiner</span><br/>
          {%- endif -%}
          <small>(verwaltet durch {{ render_user_link(ticket.get_seat_manager()) }})</small>
        </td>
        <td>
          {%- if ticket.used_by -%}
          {{ render_user_link(ticket.used_by) }}
          {%- else -%}
          <span class="tag available">frei</span>
          {%- endif -%}
          <br/>
          <small>(verwaltet durch {{ render_user_link(ticket.get_user_manager()) }})</small>
        </td>
      </tr>
      {%- endfor %}
      <tr>
    </tbody>
  </table>
{%- endmacro %}

{'fraction_non_alphanumeric': 0.20926443202979517, 'fraction_numerical': 0.004189944134078212, 'mean_word_length': 2.507755102040816, 'pattern_counts': {'":': 0, '<': 125, '<?xml version=': 0, '>': 125, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1889823', 'n_tokens_mistral': 1690, 'n_tokens_neox': 1549, 'n_words': 263}