misuzu/templates/changelog/change.twig

80 lines
3.8 KiB
Twig
Raw Normal View History

2018-08-15 01:12:58 +00:00
{% extends 'changelog/master.twig' %}
2018-10-22 19:53:21 +00:00
{% from 'macros.twig' import container_title %}
2018-08-15 01:12:58 +00:00
{% from '_layout/comments.twig' import comments_section %}
2018-07-06 01:28:06 +00:00
2018-11-17 21:59:01 +00:00
{% set title = 'Changelog » Change #' ~ change.change_id %}
{% set canonical_url = '/changelog.php?c=' ~ change.change_id %}
{% set manage_link = '/manage/changelog.php?v=change&c=' ~ change.change_id %}
{% set description = change.change_log %}
2018-07-06 01:28:06 +00:00
{% block content %}
2018-11-17 21:59:01 +00:00
<div class="container changelog__change__line" style="{{ change.action_colour|html_colour('--accent-colour') }}">
<div class="changelog__change__action {{ change.action_class is defined and change.action_class is not null ? ' changelog__change__action--' ~ change.action_class : '' }} changelog__change__action--{{ change.action_colour|colour_contrast }}">
{{ change.action_name }}
</div>
2018-10-22 19:53:21 +00:00
2018-11-17 21:59:01 +00:00
<div class="changelog__change__log">
<div class="changelog__change__log__text">
{{ change.change_log }}
</div>
</div>
</div>
<div class="container changelog__change" style="{% if change.user_colour is not null %}{{ change.user_colour|html_colour('--accent-colour') }}{% endif %}">
<div class="changelog__change__info">
<div class="changelog__change__info__background"></div>
<div class="changelog__change__info__content">
{% if change.user_id is not null %}
<div class="changelog__change__user">
<a class="avatar changelog__change__avatar"
style="background-image:url('/profile.php?u={{ change.user_id }}&amp;m=avatar');"
href="/profile.php?u={{ change.user_id }}">
</a>
2018-07-06 01:28:06 +00:00
2018-11-17 21:59:01 +00:00
<div class="changelog__change__user__details">
<a class="changelog__change__username" href="/profile.php?u={{ change.user_id }}">{{ change.username }}</a>
<a class="changelog__change__userrole" href="/members.php?r={{ change.user_role }}">{{ change.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
2018-11-17 21:59:01 +00:00
<a class="changelog__change__date" href="/changelog.php?d={{ change.change_date }}">
Created
<time datetime="{{ change.change_created|date('c') }}" title="{{ change.change_created|date('r') }}">
{{ change.change_created|time_diff }}
</time>
</a>
2018-07-06 01:28:06 +00:00
2018-11-17 21:59:01 +00:00
{% if tags|length > 0 %}
<ul class="changelog__change__tags">
{% for tag in tags %}
<li class="changelog__change__tag" title="{{ tag.tag_description }}">
<a href="/changelog.php?t={{ tag.tag_id }}" class="changelog__change__tag__link">
{{ tag.tag_name }}
</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
2018-11-17 21:59:01 +00:00
{% if change.change_text|length >= 1 %}
{{ change.change_text|parse_text(constant('MSZ_PARSER_MARKDOWN'))|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>
2018-08-06 22:19:35 +00:00
{% if comments is defined %}
<div class="container">
{{ container_title('<i class="fas fa-comments fa-fw"></i> Comments for ' ~ change.change_date) }}
2018-08-06 22:19:35 +00:00
{{ comments_section(comments, comments_category, current_user|default(null), comments_perms) }}
</div>
{% endif %}
2018-07-06 01:28:06 +00:00
{% endblock %}