mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-21 01:41:46 +03:00
135 lines
6.0 KiB
Handlebars
135 lines
6.0 KiB
Handlebars
{{!-- template-lint-disable no-invalid-interactive --}}
|
|
<li class="gh-list-row gh-posts-list-item gh-posts-list-item-labs 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>
|
|
<p>
|
|
<span class="gh-content-status-published nowrap">
|
|
Published
|
|
{{#if @post.hasEmail}}
|
|
& Sent
|
|
{{/if}}
|
|
</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 class="gh-content-entry-meta">
|
|
By {{post-author-names @post}}
|
|
|
|
{{#if @post.primaryTag}}
|
|
in {{@post.primaryTag.name}}
|
|
{{/if}}
|
|
|
|
• <span data-tooltip="{{gh-format-post-time @post.updatedAtUTC "D MMM YYYY"}}">{{gh-format-post-time @post.updatedAtUTC draft=true}}</span>
|
|
</p>
|
|
<p class="gh-content-entry-meta">
|
|
{{#if @post.isScheduled}}
|
|
<span class="gh-content-status scheduled" title="Scheduled" data-tooltip="To be published {{if @post.newsletter "& sent at "}}{{capitalize this.scheduledText}} to {{@post.emailSegment}} members">
|
|
Scheduled
|
|
</span>
|
|
{{/if}}
|
|
|
|
{{#if @post.isDraft}}
|
|
<span class="gh-content-status draft">
|
|
Draft
|
|
</span>
|
|
{{/if}}
|
|
|
|
{{#if @post.isPublished}}
|
|
<span class="gh-content-status published">
|
|
Published
|
|
{{#if @post.hasEmail}}
|
|
and sent
|
|
{{/if}}
|
|
</span>
|
|
{{/if}}
|
|
|
|
{{#if @post.isSent}}
|
|
<span class="gh-content-status sent">
|
|
Sent
|
|
</span>
|
|
{{/if}}
|
|
</p>
|
|
{{/unless}}
|
|
</LinkTo>
|
|
{{/if}}
|
|
|
|
{{!-- 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 --}}
|
|
<LinkTo @route="editor.edit" @models={{array @post.displayName @post.id}} class="permalink gh-list-data gh-post-list-cta">
|
|
{{#if @post.isPublished}}
|
|
<LinkTo @route="posts.analytics" @model={{@post}} class="gh-btn gh-btn-outline gh-btn-icon">
|
|
<span>
|
|
{{svg-jar "stats" class="stats"}} Stats
|
|
</span>
|
|
</LinkTo>
|
|
{{else}}
|
|
<LinkTo @route="editor.edit" @models={{array @post.displayName @post.id}} class="gh-btn gh-btn-outline gh-btn-icon">
|
|
<span>
|
|
{{svg-jar "pen" class="edit"}} Edit
|
|
</span>
|
|
</LinkTo>
|
|
{{/if}}
|
|
</LinkTo>
|
|
|
|
</li>
|