2022-10-20 15:07:13 +03:00
|
|
|
{{#if (not (feature "audienceFeedback"))}}
|
|
|
|
<h4 class="gh-main-section-header small bn">
|
|
|
|
Newsletter clicks
|
|
|
|
</h4>
|
|
|
|
{{/if}}
|
|
|
|
<div class="gh-post-analytics-box column gh-post-analytics-newsletter-clicks">
|
2022-10-20 22:49:14 +03:00
|
|
|
{{#if (feature "audienceFeedback")}}<h3 class="gh-newsletter-clicks-header">Newsletter clicks</h3>{{/if}}
|
2022-09-29 14:00:30 +03:00
|
|
|
<div class="gh-links-list">
|
2022-09-29 18:14:15 +03:00
|
|
|
<div class="gh-links-list-header">
|
2022-10-18 15:30:45 +03:00
|
|
|
{{#if (and this.showPagination (feature "fixNewsletterLinks")) }}
|
|
|
|
<div class="gh-links-pagination-progress">
|
|
|
|
Showing {{this.startOffset}}-{{this.endOffset}} of {{this.totalLinks}}
|
|
|
|
</div>
|
|
|
|
{{else}}
|
2022-10-20 15:07:13 +03:00
|
|
|
<div class="gh-links-list-title">
|
|
|
|
{{#if (not (feature "audienceFeedback"))}}Link{{/if}}
|
|
|
|
</div>
|
2022-10-19 16:24:54 +03:00
|
|
|
{{/if}}
|
2022-09-29 18:14:15 +03:00
|
|
|
<div class="gh-links-list-title">
|
|
|
|
No. of Members
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-10-20 15:07:13 +03:00
|
|
|
<div class="gh-links-list-items">
|
2022-09-29 14:00:30 +03:00
|
|
|
{{#each this.visibleLinks as |link|}}
|
2022-10-20 13:42:52 +03:00
|
|
|
<div class="gh-links-list-item {{if (eq this.editingLink link.link.link_id) "gh-links-list-item-edit-mode"}}">
|
2022-10-14 19:09:42 +03:00
|
|
|
{{#if (feature "fixNewsletterLinks")}}
|
2022-10-18 11:53:34 +03:00
|
|
|
<div class="gh-links-list-url">
|
2022-10-19 16:24:54 +03:00
|
|
|
{{#if (eq this.editingLink link.link.link_id)}}
|
|
|
|
<div class="gh-links-list-input-container {{if (eq this.showError link.link.link_id) "error"}}">
|
2022-10-20 13:18:56 +03:00
|
|
|
<div class="gh-input-group">
|
|
|
|
<input
|
2022-10-14 19:09:42 +03:00
|
|
|
aria-label="Link"
|
|
|
|
type="text"
|
|
|
|
class="gh-input"
|
|
|
|
placeholder={{link.link.to}}
|
|
|
|
value={{link.link.to}}
|
|
|
|
maxlength="300"
|
|
|
|
{{on "blur" this.setLink}}
|
|
|
|
{{on-key "Enter" this.blurElement}}
|
|
|
|
{{on-key "Escape" this.cancelEdit}}
|
|
|
|
{{autofocus}}
|
|
|
|
data-prevent-escape-close-modal="true"
|
|
|
|
/>
|
2022-10-20 23:10:37 +03:00
|
|
|
{{#if (eq this.showError link.link.link_id)}}
|
|
|
|
<GhTaskButton
|
|
|
|
@buttonText="Retry"
|
|
|
|
@task={{this.setLink}}
|
|
|
|
@successText="Link updated"
|
|
|
|
@class="gh-btn gh-btn-red gh-btn-icon" />
|
|
|
|
{{else}}
|
2022-10-20 13:18:56 +03:00
|
|
|
<GhTaskButton
|
|
|
|
@buttonText="Update"
|
2022-10-21 12:06:21 +03:00
|
|
|
@task={{this.updateLinks}}
|
2022-10-20 13:18:56 +03:00
|
|
|
@successText="Link updated"
|
|
|
|
@class="gh-btn gh-btn-green gh-btn-icon" />
|
2022-10-20 23:10:37 +03:00
|
|
|
{{/if}}
|
2022-10-20 13:18:56 +03:00
|
|
|
</div>
|
2022-10-18 11:53:34 +03:00
|
|
|
<span class="gh-links-list-item-error">Please enter a valid link</span>
|
|
|
|
</div>
|
2022-10-14 19:09:42 +03:00
|
|
|
{{else}}
|
2022-10-18 12:39:29 +03:00
|
|
|
<button type="button" class="gh-btn gh-btn-action-icon gh-btn-icon gh-btn-outline gh-links-list-item-edit icon-only" aria-label="Edit link" {{on "click" (fn this.editLink link.link.link_id)}}>
|
|
|
|
<span>
|
|
|
|
{{svg-jar "pen"}}
|
|
|
|
</span>
|
|
|
|
</button>
|
|
|
|
<a href="{{link.link.to}}" target="_blank" rel="noopener noreferrer">
|
|
|
|
{{link.link.title}}
|
|
|
|
</a>
|
2022-10-20 22:39:48 +03:00
|
|
|
<span class="gh-links-list-item-edited {{if link.link.edited "gh-links-list-item-edited-show"}}"> (edited)</span>
|
2022-10-19 16:24:54 +03:00
|
|
|
<span class="gh-links-list-item-success {{if (eq @showSuccess link.link.link_id) "gh-links-list-item-success-show"}}">{{svg-jar "check-circle"}}</span>
|
2022-10-14 19:09:42 +03:00
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
{{else}}
|
2022-09-29 14:00:30 +03:00
|
|
|
<a href="{{link.link.to}}" target="_blank" rel="noopener noreferrer">{{link.link.title}}</a>
|
2022-10-14 19:09:42 +03:00
|
|
|
{{/if}}
|
2022-09-29 14:00:30 +03:00
|
|
|
<p class="gh-links-list-clicks">{{link.count.clicks}}</p>
|
|
|
|
</div>
|
|
|
|
{{/each}}
|
2022-10-20 15:07:13 +03:00
|
|
|
</div>
|
2022-10-20 23:04:29 +03:00
|
|
|
{{#if (or this.showPagination (feature "fixNewsletterLinks")) }}
|
2022-10-18 12:39:29 +03:00
|
|
|
<div class="gh-links-pagination">
|
2022-10-18 15:30:45 +03:00
|
|
|
{{#if (feature "fixNewsletterLinks")}}
|
2022-10-21 12:46:33 +03:00
|
|
|
<span class="gh-links-info">{{svg-jar "info"}} Sent a broken link? You can update it!</span>
|
2022-10-18 15:30:45 +03:00
|
|
|
{{else}}
|
2022-09-29 14:05:55 +03:00
|
|
|
<div class="gh-links-pagination-progress">
|
|
|
|
Showing {{this.startOffset}}-{{this.endOffset}} of {{this.totalLinks}}
|
|
|
|
</div>
|
2022-10-18 15:30:45 +03:00
|
|
|
{{/if}}
|
2022-10-20 23:04:29 +03:00
|
|
|
{{#if this.showPagination}}
|
2022-09-29 14:05:55 +03:00
|
|
|
<div class="gh-links-pagination-actions">
|
2022-09-29 18:14:15 +03:00
|
|
|
<button type="button" class="gh-links-pagination-action gh-links-pagination-prev {{if this.disablePreviousPage "gh-links-pagination-disabled"}}" {{on "click" this.openPreviousPage}} disabled={{this.disablePreviousPage}}>
|
2022-09-29 14:05:55 +03:00
|
|
|
{{svg-jar "arrow-left-pagination"}}
|
|
|
|
Previous
|
|
|
|
</button>
|
2022-09-29 18:14:15 +03:00
|
|
|
<button type="button" class="gh-links-pagination-action gh-links-pagination-next {{if this.disableNextPage "gh-links-pagination-disabled"}}" {{on "click" this.openNextPage}} disabled={{this.disableNextPage}}>
|
2022-09-29 14:05:55 +03:00
|
|
|
Next
|
|
|
|
{{svg-jar "arrow-right-pagination"}}
|
|
|
|
</button>
|
|
|
|
</div>
|
2022-10-20 23:04:29 +03:00
|
|
|
{{/if}}
|
2022-09-29 14:00:30 +03:00
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
</div>
|