{%- set user = "" -%} {%- if postAuthor is null -%} {%- set user = __("(deleted)")|e("html") -%} {%- else -%} {%- set user = '<a href="?_action=viewuser&user=' ~ postAuthor.id|url_encode|e("html") ~ '">' ~ postAuthor.displayName|e("html") ~ '</a>' -%} {%- endif -%} <div class="post log" id="post-{{ logMessage.id }}"> <div class="post-pfp"> {% if postAuthor %} {% if hideActions %} <img class="media-object" alt="{{ __("Profile picture") }}" src="?_action=profilepicture&user={{ postAuthor.id|url_encode }}" width="64" height="64"> {% else %} <a href="?_action=viewuser&user={{ postAuthor.id|url_encode }}"> <img class="media-object" alt="{{ __("Profile picture") }}" src="?_action=profilepicture&user={{ postAuthor.id|url_encode }}" width="64" height="64"> </a> {% endif %} {% else %} <div class="media-object" style="width:64px;height:64px"></div> {% endif %} </div> <div class="post-body"> {% if logMessage.type == constant("mystic\\forum\\orm\\TopicLogMessage::LOCKED") %} <div class="post-status post-status-warning"> <svg viewBox="0 0 24 24" class="icon"><rect width="18" height="11" x="3" y="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/></svg> <span> <em>{{ __("%user% locked this topic", { "user": user, }) }}</em> <br> <small class="_time">{{ logMessage.postDate.format("c") }}</small> </span> </div> {% elseif logMessage.type == constant("mystic\\forum\\orm\\TopicLogMessage::UNLOCKED") %} <div class="post-status post-status-success"> <svg viewBox="0 0 24 24" class="icon"><rect width="18" height="11" x="3" y="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 9.9-1"/></svg> <span> <em>{{ __("%user% unlocked this topic", { "user": user, }) }}</em> <br> <small class="_time">{{ logMessage.postDate.format("c") }}</small> </span> </div> {% elseif logMessage.type == constant("mystic\\forum\\orm\\TopicLogMessage::TITLE_CHANGED") %} <div class="post-status post-status-info"> <svg viewBox="0 0 24 24" class="icon"><path d="M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"/><path d="m15 5 4 4"/></svg> <span> <em>{{ __("%user% changed the title of this topic from %old_title% to %new_title%", { "user": user, "old_title": '<strong>' ~ logMessage.params.old_value|default(__("unknown"))|e("html") ~ '</strong>', "new_title": '<strong>' ~ logMessage.params.new_value|default(__("unknown"))|e("html") ~ '</strong>', }) }}</em> <br> <small class="_time">{{ logMessage.postDate.format("c") }}</small> </span> </div> {% else %} {{ __("unknown") }} {% endif %} </div> </div>