<commit_before>{% from "macros/datetime.jinja" import insert_timeago with context %}
{% from "macros/links.jinja" import user_link %}


{% macro render_events_table(events) -%}
<table id="notifications-table" class="table table-striped">
  <tbody>
    {% for event in events -%}
    {{ render_event_row(event) }}
    {%- endfor %}
  </tbody>
</table>
{%- endmacro %}


{% macro render_event_row(event) -%}
<tr>
  <td class="icon">
    {% if event.grouped -%}
    {{ render_event_icon(event.events[0]) }}
    {%- else %}
    {{ render_event_icon(event) }}
    {%- endif %}
  </td>
  <td>
    {% if event.unread %}<span class="badge badge-warning">{{ _('New') }}</span>{% endif %}
    {{ render_event_text(event) }}
    <small>({{ insert_timeago(event.time) }})</small>
  </td>
  <td class="show">
    {% if event.link -%}
      {{ _render_show_button(event.link) }}
    {%- endif %}
  </td>
</tr>
{%- endmacro %}


{% macro render_event_icon(event) -%}
{% if event.type == types.FLIGHT_COMMENT -%}
  <i class="icon-comments-alt"></i>
{%- elif event.type == types.FLIGHT %}
  <i class="icon-plane"></i>
{%- elif event.type == types.FOLLOWER %}
  <i class="icon-user"></i>
{%- endif %}&nbsp;
{%- endmacro %}


{% macro render_event_text(event) -%}
{% if event.grouped -%}
  {% if event.type == types.FLIGHT -%}
    {{ render_flight_events_text(event.events) }}
  {%- else %}
    Error: Unknown event group
  {%- endif %}
{%- else %}
  {% if event.type == types.FLIGHT_COMMENT -%}
    {{ render_flight_comment_event_text(event) }}<commit_msg>notifications-table: Show subevents as smaller listing<commit_after>{% from "macros/datetime.jinja" import insert_timeago with context %}
{% from "macros/links.jinja" import user_link %}


{% macro render_events_table(events) -%}
<table id="notifications-table" class="table table-striped">
  <tbody>
    {% for event in events -%}
    {{ render_event_row(event) }}
    {%- endfor %}
  </tbody>
</table>
{%- endmacro %}


{% macro render_event_row(event) -%}
<tr>
  <td class="icon">
    {% if event.grouped -%}
    {{ render_event_icon(event.events[0]) }}
    {%- else %}
    {{ render_event_icon(event) }}
    {%- endif %}
  </td>
  <td>
    {% if event.unread %}<span class="badge badge-warning">{{ _('New') }}</span>{% endif %}
    {{ render_event_text(event) }}
    <small>({{ insert_timeago(event.time) }})</small>
    {% if event.grouped -%}
      <br/>
      {% for event in event.events -%}
        <br/>
        <small>{{ render_event_text(event) }}</small>
      {%- endfor %}
    {%- endif %}
  </td>
  <td class="show">
    {% if event.link -%}
      {{ _render_show_button(event.link) }}
    {%- endif %}
  </td>
</tr>
{%- endmacro %}


{% macro render_event_icon(event) -%}
{% if event.type == types.FLIGHT_COMMENT -%}
  <i class="icon-comments-alt"></i>
{%- elif event.type == types.FLIGHT %}
  <i class="icon-plane"></i>
{%- elif event.type == types.FOLLOWER %}
  <i class="icon-user"></i>
{%- endif %}&nbsp;
{%- endmacro %}


{% macro render_event_text(event) -%}
{% if event.grouped -%}
  {% if event.type == types.FLIGHT -%}
    {{ render_flight_events_text(event.events) }}
  {%- else %}
    Error: Unknown event group
  {%- endif %}
{%- else %}
  {% if event.type == types.FLIGHT_COMMENT -%}
    {{ render_flight_comment_event_text(event) }}
{'fraction_non_alphanumeric': 0.21357164495607392, 'fraction_numerical': 0.0006058770069675856, 'mean_word_length': 3.316339869281046, 'pattern_counts': {'":': 0, '<': 51, '<?xml version=': 0, '>': 51, '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': '6269569', 'n_tokens_mistral': 1328, 'n_tokens_neox': 1195, 'n_words': 220}