2022-09-13 12:57:05 +03:00
{{!-- template-lint-disable no-invalid-interactive --}}
2022-09-13 17:01:03 +03:00
<li class="gh-list-row gh-posts-list-item gh-posts-list-item-labs gh-post-list-plain-status"
2022-09-13 12:57:05 +03:00
{{ 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 }}
2022-09-14 13:50:28 +03:00
<p class="gh-content-entry-meta">
<span class="gh-content-entry-author">
By {{ post-author-names @ post }}
2022-09-13 12:57:05 +03:00
{{ # if @ post .primaryTag }}
in <span class="midgrey-l2 fw5"> {{ @ post .primaryTag .name }} </span>
{{ / if }}
2022-09-15 14:50:53 +03:00
-
2022-09-14 13:50:28 +03:00
</span>
<span class="gh-content-entry-date">
{{ # if this .isHovered }}
{{ gh-format-post-time @ post .updatedAtUTC "D MMM YYYY" }}
{{ else }}
{{ gh-format-post-time @ post .updatedAtUTC draft = true }}
{{ / if }}
2022-09-13 12:57:05 +03:00
</span>
</p>
2022-09-14 13:50:28 +03:00
<p class="gh-content-entry-status">
<span class="published">
2022-09-13 17:01:03 +03:00
Published
{{ # if @ post .hasEmail }}
2022-09-14 14:21:22 +03:00
{{ # if this .isHovered }}
2022-09-14 13:50:28 +03:00
and sent to 2,467 free subscribers
{{ else }}
and sent
{{ / if }}
2022-09-13 17:01:03 +03:00
{{ / if }}
</span>
</p>
2022-09-13 12:57:05 +03:00
{{ / 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 }}
2022-09-19 17:40:19 +03:00
{{ # if @ post .lexical }}
<span class="gh-lexical-indicator">L</span>
{{ / if }}
2022-09-13 12:57:05 +03:00
</h3>
{{ # unless @ hideAuthor }}
2022-09-13 17:01:03 +03:00
<p class="gh-content-entry-meta">
2022-09-14 13:50:28 +03:00
<span class="gh-content-entry-author">
By {{ post-author-names @ post }}
2022-09-13 12:57:05 +03:00
2022-09-14 13:50:28 +03:00
{{ # if @ post .primaryTag }}
in <span class="midgrey-l2 fw5"> {{ @ post .primaryTag .name }} </span>
{{ / if }}
2022-09-15 14:50:53 +03:00
-
2022-09-14 13:50:28 +03:00
</span>
2022-09-15 15:23:22 +03:00
<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 }}
2022-09-15 14:50:53 +03:00
{{ # if this .isDateHovered }}
2022-09-15 15:23:22 +03:00
<span {{ css-transition "anim-fade-in-scale" }} >on {{ gh-format-post-time @ post .updatedAtUTC "D MMM YYYY" }} </span>
2022-09-14 13:50:28 +03:00
{{ / if }}
</span>
2022-09-19 17:40:19 +03:00
{{!-- {{#if @post.lexical}}
<span class="gh-content-entry-date">– Lexical</span>
{{ / if }} --}}
2022-09-13 12:57:05 +03:00
</p>
2022-09-16 16:59:29 +03:00
{{ # if ( not-eq this .settings .membersSignupAccess "none" ) }}
<p class="gh-content-entry-status">
{{ # if @ post .isScheduled }}
<span class="scheduled" {{ on "mouseover" ( fn ( mut this .isStateHovered ) true ) }} {{ on "mouseleave" ( fn ( mut this .isStateHovered ) false ) }} >
<span class="status-dot"></span>
Scheduled
{{ # if this .isStateHovered }}
2022-09-19 12:04:04 +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>
2022-09-16 16:59:29 +03:00
{{ / if }}
</span>
{{ / if }}
2022-09-13 12:57:05 +03:00
2022-09-16 16:59:29 +03:00
{{ # if @ post .isDraft }}
<span class="draft">
<span class="status-dot"></span>
Draft
</span>
{{ / if }}
2022-09-13 12:57:05 +03:00
2022-09-16 16:59:29 +03:00
{{ # if @ post .isPublished }}
<span class="published" {{ on "mouseover" ( fn ( mut this .isStateHovered ) true ) }} {{ on "mouseleave" ( fn ( mut this .isStateHovered ) false ) }} >
Published
{{ # if @ post .hasEmail }}
and sent
{{ # if this .isStateHovered }}
<span {{ css-transition "anim-fade-in-scale" }} >to 2,467 free subscribers</span>
{{ / if }}
{{ / if }}
</span>
{{ / if }}
{{ # if @ post .isSent }}
<span class="sent" {{ on "mouseover" ( fn ( mut this .isStateHovered ) true ) }} {{ on "mouseleave" ( fn ( mut this .isStateHovered ) false ) }} >
Sent
2022-09-15 14:50:53 +03:00
{{ # if this .isStateHovered }}
2022-09-15 15:23:22 +03:00
<span {{ css-transition "anim-fade-in-scale" }} >to 2,467 free subscribers</span>
2022-09-14 13:50:28 +03:00
{{ / if }}
2022-09-16 16:59:29 +03:00
</span>
{{ / if }}
</p>
{{ / if }}
2022-09-13 17:01:03 +03:00
{{ / unless }}
</LinkTo>
{{ / if }}
2022-09-13 12:57:05 +03:00
{{!-- 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" ) ) }}
2022-09-20 11:05:41 +03:00
<div class="flex flex-column items-end" {{ on "mouseover" ( fn ( mut this .isOpenStatHovered ) true ) }} {{ on "mouseleave" ( fn ( mut this .isOpenStatHovered ) false ) }} >
<span class="gh-content-email-stats">
2022-09-15 14:50:53 +03:00
{{ # if this .isOpenStatHovered }}
2022-09-20 11:05:41 +03:00
<strong> {{ format-number @ post .email .openedCount }} </strong> opens
2022-09-14 14:21:22 +03:00
{{ else }}
2022-09-20 11:05:41 +03:00
<strong> {{ @ post .email .openRate }} %</strong> opens
2022-09-14 14:21:22 +03:00
{{ / if }}
</span>
2022-09-13 12:57:05 +03:00
</div>
{{ / if }}
</LinkTo>
{{!-- Clicks column --}}
<LinkTo @route="editor.edit" @models= {{ array @ post .displayName @ post .id }} class="permalink gh-list-data gh-post-list-clicks">
2022-09-14 13:50:28 +03:00
{{ # if ( and @ post .email .trackOpens ( eq @ post .email .status "submitted" ) ) }}
2022-09-20 11:05:41 +03:00
<div class="flex flex-column items-end" {{ on "mouseover" ( fn ( mut this .isClickStatHovered ) true ) }} {{ on "mouseleave" ( fn ( mut this .isClickStatHovered ) false ) }} >
<span class="gh-content-email-stats">
2022-09-15 14:50:53 +03:00
{{ # if this .isClickStatHovered }}
2022-09-20 11:05:41 +03:00
<strong> {{ format-number @ post .count .clicks }} </strong> clicks
2022-09-14 14:21:22 +03:00
{{ else }}
2022-09-20 11:05:41 +03:00
<strong> {{ @ post .clickRate }} %</strong> clicks
2022-09-14 14:21:22 +03:00
{{ / if }}
</span>
</div>
2022-09-14 13:50:28 +03:00
{{ / if }}
2022-09-13 12:57:05 +03:00
</LinkTo>
{{ / if }}
{{!-- Button column --}}
2022-09-16 16:59:29 +03:00
<LinkTo @route="editor.edit" @models= {{ array @ post .displayName @ post .id }} class="permalink gh-list-data {{ if ( not-eq this .settings .membersSignupAccess "none" ) "gh-post-list-button" }} ">
{{ # if ( not-eq this .settings .membersSignupAccess "none" ) }}
<div class="flex flex-column items-end">
{{ # if ( or @ post .isSent @ post .isPublished ) }}
<LinkTo @route="posts.analytics" @model= {{ @ post }} class="gh-post-list-cta stats {{ if this .isHovered "is-hovered" }} ">
{{ svg-jar "stats" }}
</LinkTo>
{{ else }}
<LinkTo @route="editor.edit" @models= {{ array @ post .displayName @ post .id }} class="gh-post-list-cta edit {{ if this .isHovered "is-hovered" }} ">
{{ svg-jar "pen" }}
</LinkTo>
{{ / if }}
</div>
2022-09-15 15:50:59 +03:00
{{ else }}
2022-09-16 16:59:29 +03:00
<p class="gh-content-entry-status">
{{ # if @ post .isScheduled }}
<span class="scheduled" data-tooltip="Published {{ this .scheduledText }} ">
<span class="status-dot"></span>
Scheduled
</span>
{{ / if }}
{{ # if @ post .isDraft }}
<span class="draft">
<span class="status-dot"></span>
Draft
</span>
{{ / if }}
{{ # if @ post .isPublished }}
<span class="published">
Published
{{ # if @ post .hasEmail }}
and sent
{{ / if }}
</span>
{{ / if }}
{{ # if @ post .isSent }}
<span class="sent">
Sent
</span>
{{ / if }}
</p>
2022-09-15 15:50:59 +03:00
{{ / if }}
2022-09-16 16:59:29 +03:00
</LinkTo>
2022-09-13 17:01:03 +03:00
2022-09-13 12:57:05 +03:00
</li>