2022-02-15 14:41:26 +03:00
{{!-- template-lint-disable no-invalid-interactive --}}
2022-08-24 13:12:55 +03:00
<li class="gh-list-row gh-posts-list-item {{ if this .feature .memberAttribution "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-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 }}
<p>
<span class="gh-content-entry-meta">
2022-05-10 15:26:01 +03:00
By <span class="midgrey-l2 fw5"> {{ post-author-names @ post }} </span>
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-03-24 20:14:51 +03:00
• <span data-tooltip=" {{ gh-format-post-time @ post .updatedAtUTC "D MMM YYYY" }} "> {{ gh-format-post-time @ post .updatedAtUTC draft = true }} </span>
2022-02-01 20:59:20 +03:00
2022-03-24 20:14:51 +03:00
</span>
</p>
{{ / unless }}
2022-02-01 20:59:20 +03:00
</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>
2022-03-24 20:14:51 +03:00
{{ # unless @ hideAuthor }}
<p>
<span class="gh-content-entry-meta">
2022-05-10 15:26:01 +03:00
By <span class="midgrey-l2 fw5"> {{ post-author-names @ post }} </span>
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 }}
2020-11-06 21:54:27 +03:00
2022-03-24 20:14:51 +03:00
• <span data-tooltip=" {{ gh-format-post-time @ post .updatedAtUTC "D MMM YYYY" }} "> {{ gh-format-post-time @ post .updatedAtUTC draft = true }} </span>
2020-07-01 20:39:03 +03:00
2022-03-24 20:14:51 +03:00
</span>
</p>
{{ / unless }}
2022-02-01 20:59:20 +03:00
</LinkTo>
{{ / if }}
2022-08-24 14:34:24 +03:00
{{!-- Statuses for when the feature flag for Member Attribution is on only --}}
{{ # if this .feature .memberAttribution }}
{{ # 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">
2022-08-25 12:00:51 +03:00
{{ svg-jar "check" class = "gh-post-status-icon" }}
2022-08-24 14:34:24 +03:00
Published
{{ # if @ post .hasEmail }}
2022-08-25 12:00:51 +03:00
& Sent
2022-08-24 14:34:24 +03:00
{{ / 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">
2022-08-24 13:12:55 +03:00
{{ svg-jar "clock" class = "gh-post-status-icon" }}
2022-08-24 14:34:24 +03:00
Scheduled
</span>
2022-03-24 20:14:51 +03:00
{{ / if }}
2022-02-01 20:59:20 +03:00
2022-08-24 14:34:24 +03:00
{{ # if @ post .isDraft }}
<span class="gh-content-status-draft gh-badge gh-badge-pink nowrap">
2022-09-02 18:56:02 +03:00
{{ svg-jar "pen" class = "gh-post-status-icon" }}
2022-08-24 14:34:24 +03:00
Draft
</span>
2022-08-24 13:12:55 +03:00
{{ / if }}
2022-02-01 20:59:20 +03:00
2022-08-24 14:34:24 +03:00
{{ # if @ post .isPublished }}
<span class="gh-content-status-published nowrap">
2022-08-24 13:12:55 +03:00
{{ svg-jar "check" class = "gh-post-status-icon" }}
2022-08-24 14:34:24 +03:00
Published
{{ # if @ post .hasEmail }}
& Sent
{{ / if }}
</span>
2022-08-24 13:12:55 +03:00
{{ / if }}
2022-02-01 20:59:20 +03:00
2022-08-24 14:34:24 +03:00
{{ # 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 }}
{{ / if }}
2022-08-24 13:12:55 +03:00
2022-08-25 18:01:12 +03:00
{{ # if ( and this .feature .memberAttribution ( not this .session .user .isContributor ) ) }}
{{ # if @ post .count .signups }}
<LinkTo @route="members" @query= {{ hash filterParam = ( concat "signup:[" @ post .id "]" ) }} class="permalink gh-list-data gh-post-list-signups active">
<span class="midlightgrey {{ if ( not ( eq @ post .count .signups 0 ) ) 'darkgrey' }} fw5 gh-content-attribution-stats"> {{ @ post .count .signups }} </span>
<span class="midgrey-l2 fw4 gh-content-attribution-stats-mobile"> {{ gh-pluralize @ post .count .signups "signup" }} </span>
</LinkTo>
{{ else }}
<LinkTo @route="editor.edit" @models= {{ array @ post .displayName @ post .id }} class="permalink gh-list-data gh-post-list-signups">
<span class="midlightgrey {{ if ( not ( eq @ post .count .signups 0 ) ) 'darkgrey' }} fw5 gh-content-attribution-stats"> {{ @ post .count .signups }} </span>
<span class="midgrey-l2 fw4 gh-content-attribution-stats-mobile"> {{ gh-pluralize @ post .count .signups "signup" }} </span>
</LinkTo>
{{ / if }}
2022-08-24 13:12:55 +03:00
{{ / if }}
2022-08-25 18:01:12 +03:00
{{ # if ( and this .feature .memberAttribution ( not this .session .user .isContributor ) ) }}
{{ # if @ post .count .conversions }}
<LinkTo @route="members" @query= {{ hash filterParam = ( concat "conversion:[" @ post .id "]" ) }} class="permalink gh-list-data gh-post-list-conversions active">
<span class="midlightgrey {{ if ( not ( eq @ post .count .conversions 0 ) ) 'darkgrey' }} fw5 gh-content-attribution-stats"> {{ @ post .count .conversions }} </span>
<span class="midgrey-l2 fw4 gh-content-attribution-stats-mobile"> {{ gh-pluralize @ post .count .conversions "conversion" }} </span>
</LinkTo>
{{ else }}
<LinkTo @route="editor.edit" @models= {{ array @ post .displayName @ post .id }} class="permalink gh-list-data gh-post-list-conversions">
<span class="midlightgrey {{ if ( not ( eq @ post .count .conversions 0 ) ) 'darkgrey' }} fw5 gh-content-attribution-stats"> {{ @ post .count .conversions }} </span>
<span class="midgrey-l2 fw4 gh-content-attribution-stats-mobile"> {{ gh-pluralize @ post .count .conversions "conversion" }} </span>
</LinkTo>
{{ / if }}
2022-08-24 13:12:55 +03:00
{{ / if }}
{{ # if ( and ( not-eq this .settings .membersSignupAccess "none" ) ( not-eq this .settings .editorDefaultEmailRecipients "disabled" ) ( not this .session .user .isContributor ) ) }}
{{ # if ( and this .feature .emailAnalytics ( eq @ post .displayName "post" ) ) }}
<LinkTo @route="editor.edit" @models= {{ array @ post .displayName @ post .id }} class="permalink gh-list-data gh-post-list-recipients">
<div class="flex fw4">
{{ # if ( eq @ post .email .status "submitted" ) }}
<span class="flex" data-tooltip=" {{ capitalize @ post .email .recipientFilter }} members">
<span class="darkgrey fw5 gh-content-email-stats"> {{ format-number @ post .email .emailCount }} </span>
<span class="midgrey-l2 fw4 gh-content-email-stats-mobile"> {{ gh-pluralize @ post .email .emailCount "send" }} </span>
</span>
{{ else }}
<span class="gh-list-nodata">—</span>
{{ / if }}
</div>
</LinkTo>
<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 this .feature .memberAttribution }}
<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>
{{ / if }}
{{ / if }}
2022-08-24 14:34:24 +03:00
{{!-- Statuses for without the Member Attribution feature flag --}}
{{ # unless this .feature .memberAttribution }}
{{ # 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">
Published
{{ # if @ post .hasEmail }}
{{ svg-jar "email-stroke" class = "gh-post-status-email" }}
{{ / 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">
Scheduled
</span>
{{ / if }}
{{ # if @ post .isDraft }}
<span class="gh-content-status-draft gh-badge gh-badge-pink nowrap">
Draft
</span>
{{ / if }}
{{ # if @ post .isPublished }}
<span class="gh-content-status-published nowrap">
Published
2022-08-25 12:00:51 +03:00
{{ # if @ post .hasEmail }}
{{ svg-jar "email-stroke" class = "gh-post-status-email" }}
{{ / if }}
2022-08-24 14:34:24 +03:00
</span>
{{ / if }}
{{ # if @ post .isSent }}
<span class="gh-content-status-emailed nowrap">
{{ svg-jar "email-stroke" class = "gh-post-status-icon" }}
</span>
{{ / if }}
</div>
</LinkTo>
{{ / if }}
{{ / unless }}
{{ / unless }}
2022-05-16 11:18:46 +03:00
</li>