2022-02-15 14:41:26 +03:00
{{!-- template-lint-disable no-invalid-interactive --}}
2022-11-08 17:29:04 +03:00
<li class="gh-list-row gh-posts-list-item gh-post-list-plain-status"
2020-11-26 20:19:05 +03:00
{{ on "mouseover" this .mouseOver }}
{{ on "mouseleave" this .mouseLeave }}
...attributes
>
2019-11-14 15:53:43 +03:00
2022-09-08 13:03:13 +03:00
{{!-- Title column --}}
2022-02-01 20:59:20 +03:00
{{ # if ( and this .session .user .isContributor @ post .isPublished ) }}
2022-02-02 19:09:43 +03:00
<a href= {{ @ post .url }} class="permalink gh-list-data gh-post-list-title" target="_blank" rel="noopener noreferrer">
2022-02-01 20:59:20 +03:00
<h3 class="gh-content-entry-title">
{{ @ post .title }} {{ svg-jar "external" class = "gh-post-list-external" }}
</h3>
2022-03-24 20:14:51 +03:00
{{ # unless @ hideAuthor }}
2022-10-07 15:27:57 +03:00
<p class="gh-content-entry-meta">
<span class="gh-content-entry-author">
By {{ post-author-names @ post }}
2022-02-01 20:59:20 +03:00
2022-03-24 20:14:51 +03:00
{{ # if @ post .primaryTag }}
in <span class="midgrey-l2 fw5"> {{ @ post .primaryTag .name }} </span>
{{ / if }}
2022-02-01 20:59:20 +03:00
2022-10-07 15:27:57 +03:00
-
</span>
<span class="gh-content-entry-date">
{{ # if this .isHovered }}
{{ gh-format-post-time @ post .updatedAtUTC format = "D MMM YYYY" }}
{{ else }}
{{ gh-format-post-time @ post .updatedAtUTC draft = true }}
{{ / if }}
</span>
</p>
<p class="gh-content-entry-status">
<span class="published">
Published
{{ # if @ post .hasEmail }}
{{ # if this .isHovered }}
and sent to {{ gh-pluralize @ post .email .emailCount "member" }}
{{ else }}
and sent
{{ / if }}
{{ / if }}
2022-03-24 20:14:51 +03:00
</span>
</p>
{{ / unless }}
2022-02-01 20:59:20 +03:00
</a>
{{ else }}
2022-11-08 17:29:04 +03:00
<LinkTo @route="editor.edit" @models= {{ array this .post .displayName this .post .id }} class="permalink gh-list-data gh-post-list-title">
2022-02-01 20:59:20 +03:00
<h3 class="gh-content-entry-title">
{{ @ post .title }}
2022-09-19 17:40:19 +03:00
{{ # if @ post .lexical }}
<span class="gh-lexical-indicator">L</span>
{{ / if }}
2022-02-01 20:59:20 +03:00
</h3>
2022-03-24 20:14:51 +03:00
{{ # unless @ hideAuthor }}
2022-10-07 15:27:57 +03:00
<p class="gh-content-entry-meta">
<span class="gh-content-entry-author">
By {{ post-author-names @ post }}
2022-02-01 20:59:20 +03:00
2022-03-24 20:14:51 +03:00
{{ # if @ post .primaryTag }}
in <span class="midgrey-l2 fw5"> {{ @ post .primaryTag .name }} </span>
{{ / if }}
2022-10-07 15:27:57 +03:00
-
</span>
<span class="gh-content-entry-date" {{ on "mouseover" ( fn ( mut this .isDateHovered ) true ) }} {{ on "mouseleave" ( fn ( mut this .isDateHovered ) false ) }} >
{{ gh-format-post-time @ post .updatedAtUTC draft = true }}
{{ # if this .isDateHovered }}
<span {{ css-transition "anim-fade-in-scale" }} >on {{ gh-format-post-time @ post .updatedAtUTC format = "D MMM YYYY" }} </span>
{{ / if }}
2022-03-24 20:14:51 +03:00
</span>
2022-10-07 15:27:57 +03:00
{{!-- {{#if @post.lexical}}
<span class="gh-content-entry-date">– Lexical</span>
{{ / if }} --}}
2022-03-24 20:14:51 +03:00
</p>
2022-10-07 15:27:57 +03:00
<p class="gh-content-entry-status">
{{ # if @ post .isScheduled }}
2022-11-08 17:29:04 +03:00
<span class="scheduled">
2022-10-07 15:27:57 +03:00
<span class="status-dot"></span>
2022-08-24 14:34:24 +03:00
Scheduled
2022-11-08 17:29:04 +03:00
{{ # if this .isHovered }}
2022-10-07 15:27:57 +03:00
<span class="schedule-details" {{ css-transition "anim-fade-in-scale" }} >to be published {{ if @ post .newsletter "and sent " }} {{ this .scheduledText }} to {{ humanize-recipient-filter @ post .emailSegment }} </span>
{{ / if }}
2022-08-24 14:34:24 +03:00
</span>
2022-10-07 15:27:57 +03:00
{{ / if }}
2022-02-01 20:59:20 +03:00
2022-10-07 15:27:57 +03:00
{{ # if @ post .isDraft }}
<span class="draft">
<span class="status-dot"></span>
2022-08-24 14:34:24 +03:00
Draft
</span>
2022-10-07 15:27:57 +03:00
{{ / if }}
2022-02-01 20:59:20 +03:00
2022-10-07 15:27:57 +03:00
{{ # if @ post .isPublished }}
2022-11-08 17:29:04 +03:00
<span class="published {{ this .errorClass }} ">
2022-08-24 14:34:24 +03:00
Published
2022-10-07 15:27:57 +03:00
{{ # if @ post .didEmailFail }}
but failed to send newsletter
{{ else if @ post .hasBeenEmailed }}
and sent
{{ # if this .isHovered }}
<span {{ css-transition "anim-fade-in-scale" }} >to {{ gh-pluralize @ post .email .emailCount "member" }} </span>
{{ / if }}
2022-08-24 14:34:24 +03:00
{{ / if }}
</span>
2022-10-07 15:27:57 +03:00
{{ / if }}
2022-02-01 20:59:20 +03:00
2022-10-07 15:27:57 +03:00
{{ # if @ post .isSent }}
2022-11-08 17:29:04 +03:00
<span class="sent {{ this .errorClass }} ">
2022-10-07 15:27:57 +03:00
{{ # if @ post .didEmailFail }}
Failed to send newsletter
{{ else }}
Sent
{{ # if this .isHovered }}
<span {{ css-transition "anim-fade-in-scale" }} >to {{ gh-pluralize @ post .email .emailCount "member" }} </span>
{{ / if }}
{{ / if }}
2022-08-24 14:34:24 +03:00
</span>
2022-10-07 15:27:57 +03:00
{{ / if }}
</p>
{{ / unless }}
</LinkTo>
2022-09-13 12:57:05 +03:00
{{ / if }}
2022-08-24 13:12:55 +03:00
2022-10-07 15:27:57 +03:00
{{!-- Opened / Signups column --}}
2022-11-08 17:29:04 +03:00
{{ # if ( and @ post .showEmailOpenAnalytics @ post .showEmailClickAnalytics ) }}
<LinkTo @route="members" @query= {{ hash filterParam = ( concat "opened_emails.post_id:[" @ post .id "]" ) }} class="permalink gh-list-data gh-post-list-metrics">
<span class="gh-content-email-stats-value">
{{ # if this .isHovered }}
{{ format-number @ post .email .openedCount }}
{{ else }}
{{ @ post .email .openRate }} <sup>%</sup>
{{ / if }}
</span>
<span class="gh-content-email-stats">
opened
</span>
</LinkTo>
{{ else if ( and @ post .isPage @ post .showAttributionAnalytics ) }}
<LinkTo @route="members" @query= {{ hash filterParam = ( concat "signup:[" @ post .id "]" ) }} class="permalink gh-list-data gh-post-list-metrics">
<span class="gh-content-email-stats-value">
{{ @ post .count .signups }}
</span>
<span class="gh-content-email-stats">
signups
</span>
</LinkTo>
{{ else }}
<LinkTo @route="editor.edit" @models= {{ array this .post .displayName this .post .id }} class="permalink gh-list-data">
{{!-- Empty on purpose --}}
</LinkTo>
{{ / if }}
{{!-- Clicked / Conversions column --}}
{{ # if @ post .showEmailClickAnalytics }}
<LinkTo @route="members" @query= {{ hash filterParam = ( concat "clicked_links.post_id:[" @ post .id "]" ) }} class="permalink gh-list-data gh-post-list-metrics">
<span class="gh-content-email-stats-value">
{{ # if this .isHovered }}
{{ format-number @ post .count .clicks }}
{{ else }}
{{ @ post .clickRate }} <sup>%</sup>
{{ / if }}
</span>
<span class="gh-content-email-stats">
clicked
</span>
</LinkTo>
{{ else if ( and @ post .isPage @ post .showPaidAttributionAnalytics ) }}
<LinkTo @route="members" @query= {{ hash filterParam = ( concat "conversion:[" @ post .id "]" ) }} class="permalink gh-list-data gh-post-list-metrics">
<span class="gh-content-email-stats-value">
{{ @ post .count .paid_conversions }}
</span>
<span class="gh-content-email-stats">
conversions
</span>
</LinkTo>
{{ else }}
{{ # if @ post .showEmailOpenAnalytics }}
<LinkTo @route="members" @query= {{ hash filterParam = ( concat "opened_emails.post_id:[" @ post .id "]" ) }} class="permalink gh-list-data gh-post-list-metrics">
2022-10-07 15:27:57 +03:00
<span class="gh-content-email-stats-value">
{{ # if this .isHovered }}
{{ format-number @ post .email .openedCount }}
{{ else }}
{{ @ post .email .openRate }} <sup>%</sup>
{{ / if }}
</span>
<span class="gh-content-email-stats">
opened
</span>
2022-09-13 12:57:05 +03:00
</LinkTo>
2022-11-08 17:29:04 +03:00
{{ else }}
<LinkTo @route="editor.edit" @models= {{ array this .post .displayName this .post .id }} class="permalink gh-list-data">
{{!-- Empty on purpose --}}
2022-09-13 12:57:05 +03:00
</LinkTo>
2022-08-25 18:01:12 +03:00
{{ / if }}
2022-11-08 17:29:04 +03:00
{{ / if }}
2022-10-07 15:27:57 +03:00
{{!-- Button column --}}
2022-11-08 17:29:04 +03:00
{{ # if @ post .hasAnalyticsPage }}
2022-11-15 12:17:26 +03:00
<LinkTo @route="posts.analytics" @model= {{ @ post .id }} class="permalink gh-list-data gh-post-list-button" title="">
2022-11-08 17:29:04 +03:00
<span class="gh-post-list-cta stats {{ if this .isHovered "is-hovered" }} " title="Go to Analytics">
{{ svg-jar "stats" title = "Go to Analytics" }}
</span>
</LinkTo>
{{ else }}
<LinkTo @route="editor.edit" @models= {{ array this .post .displayName this .post .id }} class="permalink gh-list-data gh-post-list-button" title="">
<span class="gh-post-list-cta edit {{ if this .isHovered "is-hovered" }} " title="Go to Editor">
{{ svg-jar "pen" title = "Go to Editor" }}
</span>
</LinkTo>
{{ / if }}
2022-05-16 11:18:46 +03:00
</li>