79 lines
3.8 KiB
Twig
79 lines
3.8 KiB
Twig
{% extends 'changelog/master.twig' %}
|
|
{% from 'macros.twig' import container_title %}
|
|
{% from '_layout/comments.twig' import comments_section %}
|
|
|
|
{% 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 %}
|
|
|
|
{% block content %}
|
|
<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>
|
|
|
|
<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('{{ url('user-avatar', {'user': change.user_id}) }}');"
|
|
href="{{ url('user-profile', {'user': change.user_id}) }}">
|
|
</a>
|
|
|
|
<div class="changelog__change__user__details">
|
|
<a class="changelog__change__username" href="{{ url('user-profile', {'user': change.user_id}) }}">{{ change.username }}</a>
|
|
<a class="changelog__change__userrole" href="{{ url('members-role', {'user': change.user_role}) }}">{{ change.user_title }}</a>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<a class="changelog__change__date" href="{{ url('changelog-date', {'date': change.change_date}) }}">
|
|
Created
|
|
<time datetime="{{ change.change_created|date('c') }}" title="{{ change.change_created|date('r') }}">
|
|
{{ change.change_created|time_diff }}
|
|
</time>
|
|
</a>
|
|
|
|
{% if tags|length > 0 %}
|
|
<ul class="changelog__change__tags">
|
|
{% for tag in tags %}
|
|
<li class="changelog__change__tag" title="{{ tag.tag_description }}">
|
|
<a href="{{ url('changelog-tag', {'tag': tag.tag_id}) }}" class="changelog__change__tag__link">
|
|
{{ tag.tag_name }}
|
|
</a>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="changelog__change__text markdown">
|
|
<h1>{{ title }}</h1>
|
|
|
|
{% if change.change_text|length >= 1 %}
|
|
{{ change.change_text|parse_text(constant('MSZ_PARSER_MARKDOWN'))|raw }}
|
|
{% else %}
|
|
<p>This change has no additional notes.</p>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
{% if comments is defined %}
|
|
<div class="container">
|
|
{{ container_title('<i class="fas fa-comments fa-fw"></i> Comments for ' ~ change.change_date) }}
|
|
{{ comments_section(comments, comments_category, current_user|default(null), comments_perms) }}
|
|
</div>
|
|
{% endif %}
|
|
{% endblock %}
|