<commit_before>{% extends "base.html" %}
{% load i18n %}
{% load humanize %}
{% load devices %}
{% load podcasts %}
{% load episodes %}

{% load menu %}
{% block mainmenu %}{{ "/history/"|main_menu }}{% endblock %}
{% block sectionmenu %}{{ "/history/"|section_menu }}{% endblock %}

{% block title %}{% trans "Subscription and Episode History" %}{% if device %} {% trans "for" %} {{ device.name|striptags }}{% endif %}{% endblock %}

{% block header %}
<h1>{% trans "Subscription and Episode History" %}{% if device %} {% trans "for" %} {{ device.name|striptags }}{% endif %}</h1>
{% endblock %}


{% block content %}

   {% if device %}
    <a href="{% url device device.uid %}">{% trans "Back to" %} {{ device|device_icon }} {{ device.name|striptags}}</a>
   {% endif %}

   {% if not history|length_is:"0" %}
   <table class="list">

    {% for s in history %}
     <tr>
       <td class="logo">
        {% if s.podcast %}
         {{ s.podcast|podcast_logo }}
        {% endif %}
       </td>

      <td>
       {% if s.type == "Subscription" %}
        {% if s.podcast %}
         {% podcast_group_link s.podcast %}
        {% endif %}
       {% else %}
        {% if s.episode %}
         {% episode_link s.episode s.podcast %}
          {% if s.podcast %}
           <br /><span class="from_podcast">{% podcast_group_link s.podcast %}</span>
          {% endif %}
        {% endif %}
       {% endif %}
      </td>
      <td style="width: 80px;"><span title="{{ s.timestamp }}">{{ s.timestamp|date:"Y-m-d" }}</span></td>
      <td style="text-align: center;">
       {% if s.type == "Subscription" %}
        {{ s|podcast_status_icon }}
       {% else %}
        {{ s|episode_status_icon }}
       {% endif %}
      </td>
      <td>
       {% if s.device %}
        <a href="{% url device s.device.uid %}">{{ s.device|device_icon }}&nbsp;{{ s.device.name|striptags }}</a>
       {% endif %}
      </td>
     </tr>
    {% endfor %}
   </table>
  {% endif %}


  <div class="pagination">
   <ul>
    {% if page > 0 %}
     <li>
      <a href="?page={{page|add:"-1"}}">{% trans "«« Later" %}</a>
     </li>
    {% endif %}
    {% if page != 0 %}
     <li>
      <a href="?page=0">{% trans "Now" %}</a>
     </li>
    {% endif %}
    {% if history %}
     <li>
      <a href="?page={{page|add:"1"}}">{% trans "Earlier »»" %}</a>
     </li>
    {% endif %}
   </ul>
  </div>

{% endblock %}<commit_msg>fix link, translation in history page<commit_after>{% extends "base.html" %}
{% load i18n %}
{% load humanize %}
{% load devices %}
{% load podcasts %}
{% load episodes %}

{% load menu %}
{% block mainmenu %}{{ "/history/"|main_menu }}{% endblock %}
{% block sectionmenu %}{{ "/history/"|section_menu }}{% endblock %}

{% block title %}{% trans "Subscription and Episode History" %}{% if device %} {% trans "for" %} {{ device.name|striptags }}{% endif %}{% endblock %}

{% block header %}
<h1>{% trans "Subscription and Episode History" %}{% if device %} {% trans "for" %} {{ device.name|striptags }}{% endif %}</h1>
{% endblock %}


{% block content %}

   {% if device %}
    <a href="{% url "device" device.uid %}">{% trans "Back to" %} {{ device|device_icon }} {{ device.name|striptags}}</a>
   {% endif %}

   {% if not history|length_is:"0" %}
   <table class="list">

    {% for s in history %}
     <tr>
       <td class="logo">
        {% if s.podcast %}
         {{ s.podcast|podcast_logo }}
        {% endif %}
       </td>

      <td>
       {% if s.type == "Subscription" %}
        {% if s.podcast %}
         {% podcast_group_link s.podcast %}
        {% endif %}
       {% else %}
        {% if s.episode %}
         {% episode_link s.episode s.podcast %}
          {% if s.podcast %}
           <br /><span class="from_podcast">{% podcast_group_link s.podcast %}</span>
          {% endif %}
        {% endif %}
       {% endif %}
      </td>
      <td style="width: 80px;"><span title="{{ s.timestamp }}">{{ s.timestamp|date:"Y-m-d" }}</span></td>
      <td style="text-align: center;">
       {% if s.type == "Subscription" %}
        {{ s|podcast_status_icon }}
       {% else %}
        {{ s|episode_status_icon }}
       {% endif %}
      </td>
      <td>
       {% if s.device %}
        <a href="{% url device s.device.uid %}">{{ s.device|device_icon }}&nbsp;{{ s.device.name|striptags }}</a>
       {% endif %}
      </td>
     </tr>
    {% endfor %}
   </table>
  {% endif %}


  <div class="pagination">
   <ul>
    {% if page > 0 %}
     <li>
      <a href="?page={{page|add:"-1"}}">«« {% trans "Later" %}</a>
     </li>
    {% endif %}
    {% if page != 0 %}
     <li>
      <a href="?page=0">{% trans "Now" %}</a>
     </li>
    {% endif %}
    {% if history %}
     <li>
      <a href="?page={{page|add:"1"}}">{% trans "Earlier" %} »»</a>
     </li>
    {% endif %}
   </ul>
  </div>

{% endblock %}
{'fraction_non_alphanumeric': 0.2313895781637717, 'fraction_numerical': 0.004962779156327543, 'mean_word_length': 2.2682432432432433, 'pattern_counts': {'":': 0, '<': 85, '<?xml version=': 0, '>': 87, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '500230', 'n_tokens_mistral': 1909, 'n_tokens_neox': 1644, 'n_words': 385}