misuzu/templates/changelog/change.twig

75 lines
3.4 KiB
Twig
Raw Permalink Normal View History

2022-09-13 13:14:49 +00:00
{% extends 'changelog/master.twig' %}
{% from 'macros.twig' import container_title, avatar %}
{% from '_layout/comments.twig' import comments_section %}
{% set title = 'Changelog » Change #' ~ change_info.id %}
{% set canonical_url = url('changelog-change', {'change': change_info.id}) %}
{% set manage_link = url('manage-changelog-change', {'change': change_info.id}) %}
2023-07-15 02:05:49 +00:00
{% set description = change_info.summary %}
2022-09-13 13:14:49 +00:00
{% block content %}
2023-07-15 02:05:49 +00:00
<div class="container changelog__log changelog__action--{{ change_info.action }}">
2022-09-13 13:14:49 +00:00
<div class="changelog__log__action">
2023-07-15 02:05:49 +00:00
{{ change_info.actionText }}
2022-09-13 13:14:49 +00:00
</div>
<div class="changelog__log__text">
2023-07-15 02:05:49 +00:00
{{ change_info.summary }}
2022-09-13 13:14:49 +00:00
</div>
</div>
<div class="container changelog__change"{% if change_user_colour is not null %} style="--accent-colour: {{ change_user_colour }}"{% endif %}>
2022-09-13 13:14:49 +00:00
<div class="changelog__change__info">
<div class="changelog__change__info__background"></div>
<div class="changelog__change__info__content">
2023-07-15 02:05:49 +00:00
{% if change_user_info.id|default(null) is not null %}
2022-09-13 13:14:49 +00:00
<div class="changelog__change__user">
2023-07-15 02:05:49 +00:00
<a class="changelog__change__avatar" href="{{ url('user-profile', {'user': change_user_info.id}) }}">
{{ avatar(change_user_info.id, 60, change_user_info.name) }}
2022-09-13 13:14:49 +00:00
</a>
<div class="changelog__change__user__details">
<a class="changelog__change__username" href="{{ url('user-profile', {'user': change_user_info.id}) }}">{{ change_user_info.name }}</a>
2023-07-15 02:05:49 +00:00
<a class="changelog__change__userrole" href="{{ url('user-list', {'role': change_user_info.displayRoleId}) }}">{{ change_user_info.title }}</a>
2022-09-13 13:14:49 +00:00
</div>
</div>
{% endif %}
<a class="changelog__change__date" href="{{ url('changelog-index', {'date': change_info.date}) }}">
Created
<time datetime="{{ change_info.createdTime|date('c') }}" title="{{ change_info.createdTime|date('r') }}">
2023-07-18 23:12:47 +00:00
{{ change_info.createdTime|time_format }}
2022-09-13 13:14:49 +00:00
</time>
</a>
{% if change_tags|length > 0 %}
2022-09-13 13:14:49 +00:00
<ul class="changelog__change__tags">
{% for tag in change_tags %}
2022-09-13 13:14:49 +00:00
<li class="changelog__change__tag" title="{{ tag.description }}">
2023-07-15 02:14:39 +00:00
<a href="{{ url('changelog-index', {'tags': tag.id}) }}" class="changelog__change__tag__link">
2022-09-13 13:14:49 +00:00
{{ tag.name }}
</a>
</li>
{% endfor %}
</ul>
{% endif %}
</div>
</div>
<div class="changelog__change__text markdown">
<h1>{{ title }}</h1>
{% if change_info.hasBody %}
2023-07-15 02:14:39 +00:00
{{ change_info.body|parse_text(2)|raw }}
2022-09-13 13:14:49 +00:00
{% else %}
<p>This change has no additional notes.</p>
{% endif %}
</div>
</div>
2023-07-15 02:05:49 +00:00
<div class="container">
{{ container_title('<i class="fas fa-comments fa-fw"></i> Comments for ' ~ change_info.date) }}
2023-07-15 23:58:17 +00:00
{{ comments_section(comments_info) }}
2023-07-15 02:05:49 +00:00
</div>
2022-09-13 13:14:49 +00:00
{% endblock %}