misuzu/templates/changelog/change.twig

77 lines
3.5 KiB
Twig
Raw Normal View History

2018-08-15 01:12:58 +00:00
{% extends 'changelog/master.twig' %}
2019-09-28 19:21:23 +00:00
{% from 'macros.twig' import container_title, avatar %}
2018-08-15 01:12:58 +00:00
{% from '_layout/comments.twig' import comments_section %}
2018-07-06 01:28:06 +00:00
2020-05-20 18:09:38 +00:00
{% 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}) %}
{% set description = change_info.header %}
2019-04-11 22:31:23 +00:00
2018-07-06 01:28:06 +00:00
{% block content %}
2020-05-20 18:09:38 +00:00
<div class="container changelog__log changelog__action--{{ change_info.actionClass }}">
2019-04-11 22:31:23 +00:00
<div class="changelog__log__action">
2020-05-20 18:09:38 +00:00
{{ change_info.actionString }}
2018-11-17 21:59:01 +00:00
</div>
2018-10-22 19:53:21 +00:00
2019-03-02 21:04:45 +00:00
<div class="changelog__log__text">
2020-05-20 18:09:38 +00:00
{{ change_info.header }}
2018-11-17 21:59:01 +00:00
</div>
</div>
2020-05-20 18:09:38 +00:00
<div class="container changelog__change"{% if change_info.user is not null %} style="--accent-colour: {{ change_info.user.colour }}"{% endif %}>
2018-11-17 21:59:01 +00:00
<div class="changelog__change__info">
<div class="changelog__change__info__background"></div>
<div class="changelog__change__info__content">
2020-05-20 18:09:38 +00:00
{% if change_info.user.id is not null %}
2018-11-17 21:59:01 +00:00
<div class="changelog__change__user">
2020-05-20 18:09:38 +00:00
<a class="changelog__change__avatar" href="{{ url('user-profile', {'user': change_info.user.id}) }}">
{{ avatar(change_info.user.id, 60, change_info.user.username) }}
2018-11-17 21:59:01 +00:00
</a>
2018-07-06 01:28:06 +00:00
2018-11-17 21:59:01 +00:00
<div class="changelog__change__user__details">
2020-05-20 18:09:38 +00:00
<a class="changelog__change__username" href="{{ url('user-profile', {'user': change_info.user.id}) }}">{{ change_info.user.username }}</a>
<a class="changelog__change__userrole" href="{{ url('user-list', {'role': change_info.user.displayRoleId}) }}">{{ change_info.user.title }}</a>
2018-07-06 01:28:06 +00:00
</div>
</div>
2018-11-17 21:59:01 +00:00
{% endif %}
2018-07-06 01:28:06 +00:00
2020-05-20 18:09:38 +00:00
<a class="changelog__change__date" href="{{ url('changelog-index', {'date': change_info.date}) }}">
2018-11-17 21:59:01 +00:00
Created
2020-05-20 18:09:38 +00:00
<time datetime="{{ change_info.createdTime|date('c') }}" title="{{ change_info.createdTime|date('r') }}">
{{ change_info.createdTime|time_diff }}
2018-11-17 21:59:01 +00:00
</time>
</a>
2018-07-06 01:28:06 +00:00
2020-05-20 18:09:38 +00:00
{% if change_info.tags|length > 0 %}
2018-11-17 21:59:01 +00:00
<ul class="changelog__change__tags">
2020-05-20 18:09:38 +00:00
{% for tag in change_info.tags %}
<li class="changelog__change__tag" title="{{ tag.description }}">
<a href="{{ url('changelog-tag', {'tag': tag.id}) }}" class="changelog__change__tag__link">
{{ tag.name }}
2018-11-17 21:59:01 +00:00
</a>
</li>
{% endfor %}
</ul>
{% endif %}
</div>
</div>
2018-07-06 01:28:06 +00:00
2018-11-17 21:59:01 +00:00
<div class="changelog__change__text markdown">
<h1>{{ title }}</h1>
2018-07-06 01:28:06 +00:00
2020-05-20 18:09:38 +00:00
{% if change_info.hasBody %}
{{ change_info.parsedBody|raw }}
2018-07-06 01:28:06 +00:00
{% else %}
2018-11-17 21:59:01 +00:00
<p>This change has no additional notes.</p>
2018-07-06 01:28:06 +00:00
{% endif %}
</div>
</div>
2020-05-20 18:09:38 +00:00
{% if change_info.hasCommentsCategory %}
2018-08-06 22:19:35 +00:00
<div class="container">
2020-05-20 18:09:38 +00:00
{{ container_title('<i class="fas fa-comments fa-fw"></i> Comments for ' ~ change_info.date) }}
{{ comments_section(change_info.commentsCategory, comments_user) }}
2018-08-06 22:19:35 +00:00
</div>
{% endif %}
2018-07-06 01:28:06 +00:00
{% endblock %}