mirror of
https://github.com/discourse/discourse.git
synced 2025-02-20 11:48:26 -06:00
FEATURE: Share Topic modal improvements (#12834)
This PR includes few commits that improve the new "Share Topic" modal: same icon for notify button as the notification, advanced options are only showed for staff, but the topic name should be visible to everyone.
This commit is contained in:
parent
2c417338ed
commit
b32c7df0e9
@ -19,8 +19,9 @@ export default Controller.extend(
|
||||
invite: null,
|
||||
invites: null,
|
||||
|
||||
autogenerated: false,
|
||||
showAdvanced: false,
|
||||
limitToEmail: false,
|
||||
autogenerated: false,
|
||||
|
||||
type: "link",
|
||||
|
||||
@ -32,8 +33,9 @@ export default Controller.extend(
|
||||
this.setProperties({
|
||||
invite: null,
|
||||
invites: null,
|
||||
autogenerated: false,
|
||||
showAdvanced: false,
|
||||
limitToEmail: false,
|
||||
autogenerated: false,
|
||||
});
|
||||
|
||||
this.setInvite(Invite.create());
|
||||
|
@ -52,15 +52,17 @@
|
||||
|
||||
{{#if isEmail}}
|
||||
{{#if showAdvanced}}
|
||||
<div class="input-group invite-custom-message">
|
||||
<label for="invite-message">{{i18n "user.invited.invite.custom_message"}}</label>
|
||||
{{textarea id="invite-message" value=buffered.custom_message}}
|
||||
</div>
|
||||
{{#if currentUser.staff}}
|
||||
<div class="input-group invite-custom-message">
|
||||
<label for="invite-message">{{i18n "user.invited.invite.custom_message"}}</label>
|
||||
{{textarea id="invite-message" value=buffered.custom_message}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
{{#if currentUser.staff}}
|
||||
{{#if showAdvanced}}
|
||||
{{#if showAdvanced}}
|
||||
{{#if currentUser.staff}}
|
||||
<div class="input-group invite-to-topic">
|
||||
{{choose-topic
|
||||
selectedTopicId=buffered.topicId
|
||||
@ -69,11 +71,21 @@
|
||||
label="user.invited.invite.invite_to_topic"
|
||||
}}
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="input-group">
|
||||
<label for="invite-topic">{{i18n "user.invited.invite.invite_to_topic"}}</label>
|
||||
{{input
|
||||
name="invite-topic"
|
||||
class="invite-topic"
|
||||
value=buffered.topicTitle
|
||||
readonly=true
|
||||
}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
{{#if currentUser.staff}}
|
||||
{{#if showAdvanced}}
|
||||
{{#if showAdvanced}}
|
||||
{{#if currentUser.staff}}
|
||||
<div class="input-group invite-to-groups">
|
||||
<label>{{i18n "user.invited.invite.add_to_groups"}}</label>
|
||||
{{group-chooser
|
||||
@ -86,8 +98,8 @@
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
{{#if currentUser.staff}}
|
||||
{{#if showAdvanced}}
|
||||
{{#if showAdvanced}}
|
||||
{{#if currentUser.staff}}
|
||||
<div class="input-group invite-expires-at">
|
||||
{{future-date-input
|
||||
displayLabel=(i18n "user.invited.invite.expires_at")
|
||||
@ -121,10 +133,12 @@
|
||||
}}
|
||||
{{/if}}
|
||||
|
||||
{{d-button
|
||||
action=(action "toggleAdvanced")
|
||||
class="show-advanced"
|
||||
icon="cog"
|
||||
title=(if showAdvanced "user.invited.invite.hide_advanced" "user.invited.invite.show_advanced")
|
||||
}}
|
||||
{{#if currentUser.staff}}
|
||||
{{d-button
|
||||
action=(action "toggleAdvanced")
|
||||
class="show-advanced"
|
||||
icon="cog"
|
||||
title=(if showAdvanced "user.invited.invite.hide_advanced" "user.invited.invite.show_advanced")
|
||||
}}
|
||||
{{/if}}
|
||||
</div>
|
||||
|
@ -21,7 +21,7 @@
|
||||
{{d-button
|
||||
class="btn-primary"
|
||||
label="topic.share.notify_users.title"
|
||||
icon="users"
|
||||
icon="hand-point-right"
|
||||
action=(action "toggleNotifyUsers")
|
||||
}}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user