mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-02 15:55:08 +03:00
c4c39fe3c4
- this should help with readability when scanning the list
70 lines
3.5 KiB
Handlebars
70 lines
3.5 KiB
Handlebars
<table class="gh-list gh-history-table">
|
|
<thead>
|
|
<tr>
|
|
<th> </th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{#each @events as |event|}}
|
|
{{#let (parse-history-event event) as |ev|}}
|
|
<tr>
|
|
<div class="gh-list-data">
|
|
<div class="gh-history-object flex items-center ma3">
|
|
<span class="user-list-item-figure" style={{background-image-style ev.actorIcon}}>
|
|
{{#if ev.actor.name}}
|
|
<span class="hidden">Photo of {{ev.actor.name}}</span>
|
|
{{/if}}
|
|
<div class="gh-history-icon">{{svg-jar ev.actionIcon}}</div>
|
|
</span>
|
|
{{!-- --}}
|
|
<div>
|
|
<div class="gh-history-description">
|
|
<span>
|
|
{{capitalize-first-letter ev.action}}:
|
|
</span>
|
|
{{#if ev.contextResource}}
|
|
<span>
|
|
<span>{{capitalize-first-letter ev.contextResource.first}}</span>
|
|
{{#if (not (eq ev.contextResource.first ev.contextResource.second))}}
|
|
<code>({{ev.contextResource.second}})</code>
|
|
{{/if}}
|
|
</span>
|
|
{{else if (or ev.original.resource.title ev.original.resource.name ev.original.context.primary_name)}}
|
|
{{#if ev.linkTarget}}
|
|
{{#if ev.linkTarget.models}}
|
|
<LinkTo @route={{ev.linkTarget.route}} @models={{ev.linkTarget.models}} class="permalink fw6">
|
|
{{or ev.original.resource.title ev.original.resource.name}}
|
|
</LinkTo>
|
|
{{else}}
|
|
<LinkTo @route={{ev.linkTarget.route}} class="permalink fw6">
|
|
{{or ev.original.resource.title ev.original.resource.name}}
|
|
</LinkTo>
|
|
{{/if}}
|
|
{{else}}
|
|
<span>{{or ev.original.resource.title ev.original.resource.name ev.original.context.primary_name}}</span>
|
|
{{/if}}
|
|
{{else}}
|
|
<span class="midlightgrey">(unknown)</span>
|
|
{{/if}}
|
|
|
|
<span class="gh-history-name">
|
|
<span class="midgrey">– by </span>
|
|
{{#if ev.actorLinkTarget}}
|
|
<LinkTo @route={{ev.actorLinkTarget.route}} @models={{ev.actorLinkTarget.models}}>
|
|
{{ev.actor.name}}
|
|
</LinkTo>
|
|
{{else}}
|
|
(deleted user)
|
|
{{/if}}
|
|
</span>
|
|
</div>
|
|
<div class="gh-history-datetime">{{moment-format ev.original.created_at "DD MMM YYYY | HH:mm:ss"}}</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</tr>
|
|
{{/let}}
|
|
{{/each}}
|
|
</tbody>
|
|
</table>
|