2019-01-24 22:34:32 +03:00
|
|
|
<section class="gh-canvas">
|
2022-10-06 12:23:49 +03:00
|
|
|
<GhCanvasHeader class="gh-canvas-header sticky gh-member-header">
|
2022-10-04 08:35:29 +03:00
|
|
|
<div class="flex flex-column">
|
2022-10-25 17:21:10 +03:00
|
|
|
{{#if this.fromAnalytics}}
|
|
|
|
<div class="gh-canvas-breadcrumb">
|
|
|
|
<LinkTo @route="posts">
|
|
|
|
Posts
|
|
|
|
</LinkTo>
|
|
|
|
{{svg-jar "arrow-right-small"}}
|
|
|
|
<LinkTo @route="posts.analytics" @models={{this.fromAnalytics}}>
|
|
|
|
Analytics
|
|
|
|
</LinkTo>
|
2022-10-27 18:24:57 +03:00
|
|
|
|
|
|
|
{{#unless this.directlyFromAnalytics}}
|
|
|
|
{{svg-jar "arrow-right-small"}}
|
2023-05-04 12:11:08 +03:00
|
|
|
<LinkTo @route="members" data-test-link="members-back" @query={{hash postAnalytics=this.postAnalytics}}>
|
2022-10-27 18:24:57 +03:00
|
|
|
Members
|
|
|
|
</LinkTo>
|
|
|
|
{{/unless}}
|
|
|
|
|
2022-10-25 17:21:10 +03:00
|
|
|
{{svg-jar "arrow-right-small"}} {{if this.member.isNew "New member" "Edit member"}}
|
|
|
|
</div>
|
|
|
|
{{else}}
|
|
|
|
<div class="gh-canvas-breadcrumb">
|
|
|
|
<LinkTo @route="members" data-test-link="members-back">
|
|
|
|
Members
|
|
|
|
</LinkTo>
|
|
|
|
{{svg-jar "arrow-right-small"}} {{if this.member.isNew "New member" "Edit member"}}
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
2022-10-04 08:35:29 +03:00
|
|
|
<h2 class="gh-canvas-title" data-test-screen-title>
|
|
|
|
{{#if this.member.isNew}}
|
|
|
|
New<span class="gh-canvas-title-hide-for-mobile"> member</span>
|
|
|
|
{{else}}
|
|
|
|
{{or this.member.name this.member.email}}
|
|
|
|
{{/if}}
|
|
|
|
</h2>
|
|
|
|
</div>
|
2020-02-27 06:50:15 +03:00
|
|
|
|
|
|
|
<section class="view-actions">
|
2021-07-12 15:55:56 +03:00
|
|
|
{{#if this.session.user.isAdmin}}
|
2020-02-27 06:50:15 +03:00
|
|
|
{{#unless this.member.isNew}}
|
2022-03-01 17:57:57 +03:00
|
|
|
<span class="dropdown">
|
|
|
|
<GhDropdownButton
|
|
|
|
@dropdownName="members-actions-menu"
|
|
|
|
@classNames="gh-btn gh-btn-icon icon-only gh-btn-action-icon"
|
|
|
|
@title="Members Actions"
|
2022-12-05 14:48:29 +03:00
|
|
|
data-test-button="member-actions"
|
2022-03-01 17:57:57 +03:00
|
|
|
>
|
|
|
|
<span>
|
|
|
|
{{svg-jar "settings"}}
|
|
|
|
<span class="hidden">Actions</span>
|
|
|
|
</span>
|
|
|
|
</GhDropdownButton>
|
|
|
|
<GhDropdown
|
|
|
|
@name="members-actions-menu"
|
|
|
|
@tagName="ul"
|
|
|
|
@classNames="gh-member-actions-menu dropdown-menu dropdown-triangle-top-right"
|
|
|
|
>
|
|
|
|
<li>
|
|
|
|
<button
|
2022-12-05 14:48:29 +03:00
|
|
|
class="mr2"
|
|
|
|
type="button"
|
|
|
|
{{on "click" this.toggleImpersonateMemberModal}}
|
|
|
|
data-test-button="impersonate"
|
|
|
|
>
|
2022-03-01 17:57:57 +03:00
|
|
|
<span>Impersonate</span>
|
|
|
|
</button>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<button
|
|
|
|
type="button"
|
|
|
|
class="mr2"
|
2022-09-24 19:18:34 +03:00
|
|
|
{{on "click" this.confirmDeleteMember}}
|
2022-03-01 17:57:57 +03:00
|
|
|
data-test-button="delete-member"
|
|
|
|
>
|
|
|
|
<span class="red">Delete member</span>
|
|
|
|
</button>
|
|
|
|
</li>
|
|
|
|
</GhDropdown>
|
|
|
|
</span>
|
2020-02-27 06:50:15 +03:00
|
|
|
{{/unless}}
|
|
|
|
{{/if}}
|
|
|
|
|
2021-02-04 20:19:39 +03:00
|
|
|
<GhTaskButton @class="gh-btn gh-btn-primary gh-btn-icon" @type="button" @task={{this.saveTask}} @data-test-button="save" />
|
2020-02-27 06:50:15 +03:00
|
|
|
</section>
|
|
|
|
</GhCanvasHeader>
|
2019-12-12 16:35:52 +03:00
|
|
|
|
2021-02-08 23:16:41 +03:00
|
|
|
<div>
|
2021-02-04 20:19:39 +03:00
|
|
|
<form class="member-basic-info-form">
|
2021-09-13 14:10:25 +03:00
|
|
|
<GhMemberSettingsForm
|
2021-05-10 21:08:47 +03:00
|
|
|
@member={{this.member}}
|
|
|
|
@scratchMember={{this.scratchMember}}
|
|
|
|
@setProperty={{this.setProperty}}
|
2021-09-08 20:29:41 +03:00
|
|
|
@onLabelEdit={{this.editLabel}}
|
2021-05-19 20:05:55 +03:00
|
|
|
@saveMember={{this.save}}
|
2021-05-19 20:47:59 +03:00
|
|
|
@isSaveRunning={{this.saveTask.isRunning}}
|
2021-05-10 21:08:47 +03:00
|
|
|
@isLoading={{this.isLoading}} />
|
2021-02-04 20:19:39 +03:00
|
|
|
</form>
|
|
|
|
</div>
|
2019-02-22 14:31:45 +03:00
|
|
|
</section>
|
|
|
|
|
2020-02-27 06:50:15 +03:00
|
|
|
{{#if this.showImpersonateMemberModal}}
|
|
|
|
<GhFullscreenModal
|
|
|
|
@modal="impersonate-member"
|
|
|
|
@model={{this.member}}
|
2020-05-20 16:55:41 +03:00
|
|
|
@close={{this.toggleImpersonateMemberModal}}
|
2020-02-27 06:50:15 +03:00
|
|
|
@modifier="action wide" />
|
|
|
|
{{/if}}
|
2021-09-08 20:29:41 +03:00
|
|
|
|
|
|
|
{{#if this.showLabelModal}}
|
|
|
|
<GhFullscreenModal
|
|
|
|
@modal="members-label-form"
|
|
|
|
@model={{this.labelModalData}}
|
|
|
|
@close={{this.toggleLabelModal}}
|
|
|
|
@modifier="action wide"
|
|
|
|
/>
|
|
|
|
{{/if}}
|