{% extends 'base.html' %} {% load i18n %} {% load static %} {% block content %}

{% trans "Link Details" %} {% if '{' in link.original_url and '}' in link.original_url %} {% trans "Template" %} {% elif link.link_type == 'LINK' %} {% trans "Link" %} {% else %} {% trans "Custom" %} {% endif %}

{% trans "Alias" %}
{{ link.alias }}
{% trans "Click Count" %}
{{ link.click_count }}
{% trans "Created At" %}
{{ link.created_at|date:"Y-m-d H:i" }}
{% trans "Updated At" %}
{{ link.updated_at|date:"Y-m-d H:i" }}
{% if link.link_type == 'LINK' %}
{% trans "Original URL" %}
{{ link.original_url }}
{% endif %} {% if link.description %}
{% trans "Description" %}
{{ link.description }}
{% endif %} {% if link.tags.exists %}
{% trans "Tags" %}
{% for tag in link.tags.all %} {% with number=forloop.counter %} {{ tag.name }} {% endwith %} {% endfor %}
{% endif %}
{% if link.link_type == 'CUSTOM' %}

{% trans "Custom Content" %}

{{ rendered_text|safe }}
{% endif %}

{% trans "Click Statistics" %} - {{ period_name }}

{% trans "Change History" %}

{% if change_logs %}
    {% for log in change_logs %}
  • {% if log.change_type == 'url_change' %}

    {% trans "URL Changed" %}

    {{ log.changed_at|date:"Y-m-d H:i" }}
    {% if log.old_url %}

    {{ log.old_url }}

    {% endif %} {% if log.new_url %}

    {{ log.new_url }}

    {% endif %} {% elif log.change_type == 'task_toggle' %}

    {% trans "Task Toggled" %}

    {{ log.changed_at|date:"Y-m-d H:i" }}
    {% if log.metadata %}
    {% if log.metadata.task_text %}

    "{{ log.metadata.task_text }}"

    {% endif %}

    {% if log.metadata.old_state %}☑{% else %}☐{% endif %} {% if log.metadata.new_state %}☑{% else %}☐{% endif %} {% if log.metadata.new_state %}{% trans "checked" %}{% else %}{% trans "unchecked" %}{% endif %}

    {% endif %} {% elif log.change_type == 'content_edit' %}

    {% trans "Content Edited" %}

    {{ log.changed_at|date:"Y-m-d H:i" }}
    {% if log.metadata %}
    {{ log.metadata|safe }}
    {% endif %} {% else %}

    {% trans "Change" %}

    {{ log.changed_at|date:"Y-m-d H:i" }}
    {% endif %}
  • {% endfor %}
{% else %}

{% trans "No changes recorded." %}

{% endif %}
{% endblock %} {% block extra_js %} {% endblock %} {% block extra_css %} {% endblock %}