mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-21 01:41:46 +03:00
147 lines
6.7 KiB
Handlebars
147 lines
6.7 KiB
Handlebars
{{!-- template-lint-disable no-invalid-interactive --}}
|
|
<li class="gh-list-row gh-posts-list-item gh-post-list-plain-status"
|
|
{{on "mouseover" this.mouseOver}}
|
|
{{on "mouseleave" this.mouseLeave}}
|
|
...attributes
|
|
>
|
|
|
|
{{!-- Title column --}}
|
|
{{#if (and this.session.user.isContributor @post.isPublished)}}
|
|
<a href={{@post.url}} class="permalink gh-list-data gh-post-list-title" target="_blank" rel="noopener noreferrer">
|
|
<h3 class="gh-content-entry-title">
|
|
{{@post.title}} {{svg-jar "external" class="gh-post-list-external"}}
|
|
</h3>
|
|
{{#unless @hideAuthor }}
|
|
<p>
|
|
<span class="gh-content-entry-meta">
|
|
By <span class="midgrey-l2 fw5">{{post-author-names @post}}</span>
|
|
|
|
{{#if @post.primaryTag}}
|
|
in <span class="midgrey-l2 fw5">{{@post.primaryTag.name}}</span>
|
|
{{/if}}
|
|
|
|
• <span data-tooltip="{{gh-format-post-time @post.updatedAtUTC "D MMM YYYY"}}">{{gh-format-post-time @post.updatedAtUTC draft=true}}</span>
|
|
|
|
</span>
|
|
</p>
|
|
{{/unless}}
|
|
</a>
|
|
{{else}}
|
|
<LinkTo @route="editor.edit" @models={{array @post.displayName @post.id}} class="permalink gh-list-data gh-post-list-title">
|
|
<h3 class="gh-content-entry-title">
|
|
{{@post.title}}
|
|
</h3>
|
|
{{#unless @hideAuthor }}
|
|
<p>
|
|
<span class="gh-content-entry-meta">
|
|
By <span class="midgrey-l2 fw5">{{post-author-names @post}}</span>
|
|
|
|
{{#if @post.primaryTag}}
|
|
in <span class="midgrey-l2 fw5">{{@post.primaryTag.name}}</span>
|
|
{{/if}}
|
|
|
|
• <span data-tooltip="{{gh-format-post-time @post.updatedAtUTC "D MMM YYYY"}}">{{gh-format-post-time @post.updatedAtUTC draft=true}}</span>
|
|
|
|
</span>
|
|
</p>
|
|
{{/unless}}
|
|
</LinkTo>
|
|
{{/if}}
|
|
|
|
{{!-- Status column --}}
|
|
{{#unless @hideStatusColumn }}
|
|
{{#if (and this.session.user.isContributor @post.isPublished)}}
|
|
<a href={{@post.url}} class="permalink gh-list-data gh-post-list-status" target="_blank" rel="noopener noreferrer">
|
|
<div class="flex items-center">
|
|
<span class="gh-content-status-published nowrap">
|
|
{{svg-jar "check" class="gh-post-status-icon"}}
|
|
Published
|
|
{{#if @post.hasEmail}}
|
|
& Sent
|
|
{{/if}}
|
|
</span>
|
|
</div>
|
|
</a>
|
|
{{else}}
|
|
<LinkTo @route="editor.edit" @models={{array @post.displayName @post.id}} class="permalink gh-list-data gh-post-list-status">
|
|
<div class="flex items-center">
|
|
{{#if @post.isScheduled}}
|
|
<span class="gh-content-status-scheduled gh-badge nowrap" title="Scheduled" data-tooltip="To be published {{if @post.newsletter "& sent at "}}{{capitalize this.scheduledText}} to {{@post.emailSegment}} members">
|
|
{{svg-jar "clock" class="gh-post-status-icon"}}
|
|
Scheduled
|
|
</span>
|
|
{{/if}}
|
|
|
|
{{#if @post.isDraft}}
|
|
<span class="gh-content-status-draft gh-badge gh-badge-pink nowrap">
|
|
{{svg-jar "pen" class="gh-post-status-icon"}}
|
|
Draft
|
|
</span>
|
|
{{/if}}
|
|
|
|
{{#if @post.isPublished}}
|
|
<span class="gh-content-status-published nowrap">
|
|
{{svg-jar "check" class="gh-post-status-icon"}}
|
|
Published
|
|
{{#if @post.hasEmail}}
|
|
& Sent
|
|
{{/if}}
|
|
</span>
|
|
{{/if}}
|
|
|
|
{{#if @post.isSent}}
|
|
<span class="gh-content-status-emailed nowrap">
|
|
{{svg-jar "email-stroke" class="gh-post-status-icon"}}
|
|
Sent
|
|
</span>
|
|
{{/if}}
|
|
</div>
|
|
</LinkTo>
|
|
{{/if}}
|
|
{{/unless}}
|
|
|
|
{{!-- Opens and clicks columns --}}
|
|
{{#if (and (not-eq this.settings.membersSignupAccess "none") (not-eq this.settings.editorDefaultEmailRecipients "disabled") (not this.session.user.isContributor) this.feature.emailAnalytics (eq @post.displayName "post"))}}
|
|
{{!-- Opens column --}}
|
|
<LinkTo @route="editor.edit" @models={{array @post.displayName @post.id}} class="permalink gh-list-data gh-post-list-opens">
|
|
{{#if (and @post.email.trackOpens (eq @post.email.status "submitted"))}}
|
|
<div class="flex">
|
|
{{#if (and this.feature.memberAttribution (not this.feature.emailClicks))}}
|
|
<span class="gh-list-rate-bar">
|
|
<span class="gh-list-rate-number" data-tooltip="Opens: {{format-number @post.email.openedCount}}">{{@post.email.openRate}}% </span>
|
|
<span class="gh-list-rate-amount"><span style={{html-safe (concat "width: " @post.email.openRate "%;")}}/></span>
|
|
</span>
|
|
{{else}}
|
|
<span class="darkgrey fw5 gh-content-email-stats">
|
|
{{#if this.isHovered}}
|
|
{{format-number @post.email.openedCount}}
|
|
{{else}}
|
|
{{@post.email.openRate}}%
|
|
{{/if}}
|
|
</span>
|
|
{{/if}}
|
|
<span class="midgrey-l2 fw4 gh-content-email-stats-mobile">{{@post.email.openRate}}% opens</span>
|
|
</div>
|
|
{{else}}
|
|
<span class="gh-list-nodata">—</span>
|
|
{{/if}}
|
|
</LinkTo>
|
|
|
|
{{!-- Clicks column --}}
|
|
<LinkTo @route="editor.edit" @models={{array @post.displayName @post.id}} class="permalink gh-list-data gh-post-list-clicks">
|
|
<span class="gh-list-nodata">—</span>
|
|
</LinkTo>
|
|
{{/if}}
|
|
|
|
{{!-- Button column --}}
|
|
{{#if @post.isPublished}}
|
|
<LinkTo @route="posts.analytics" @model={{@post}} class="permalink gh-list-data">
|
|
Analytics
|
|
</LinkTo>
|
|
{{else}}
|
|
<LinkTo @route="editor.edit" @models={{array @post.displayName @post.id}} class="permalink gh-list-data gh-post-list-opens">
|
|
Edit
|
|
</LinkTo>
|
|
{{/if}}
|
|
</li>
|