Update display of group rules in admin UI
This commit is contained in:
parent
01d7fb47ef
commit
7c3f58de41
|
@ -3,6 +3,18 @@ import { popupAjaxError } from 'discourse/lib/ajax-error';
|
|||
export default Ember.Component.extend({
|
||||
tagName: 'tr',
|
||||
|
||||
isCategory: function(){
|
||||
return this.get('rule.type') == 'normal'
|
||||
}.property('rule.type'),
|
||||
|
||||
isMessage: function(){
|
||||
return this.get('rule.type') == 'group_message'
|
||||
}.property('rule.type'),
|
||||
|
||||
isMention: function(){
|
||||
return this.get('rule.type') == 'group_mention'
|
||||
}.property('rule.type'),
|
||||
|
||||
actions: {
|
||||
edit: function(){
|
||||
this.sendAction('edit', this.get('rule'))
|
||||
|
|
|
@ -4,12 +4,16 @@
|
|||
</td>
|
||||
|
||||
<td>
|
||||
{{#if rule.category}}
|
||||
{{category-link rule.category allowUncategorized="true" link="false"}}
|
||||
{{else if rule.group_id}}
|
||||
{{i18n "chat_integration.group_prefix"}} {{rule.group_name}}
|
||||
{{else}}
|
||||
{{i18n "chat_integration.all_categories"}}
|
||||
{{#if isCategory}}
|
||||
{{#if rule.category}}
|
||||
{{category-link rule.category allowUncategorized="true" link="false"}}
|
||||
{{else}}
|
||||
{{i18n "chat_integration.all_categories"}}
|
||||
{{/if}}
|
||||
{{else if isMention}}
|
||||
{{i18n "chat_integration.group_mention_template" name=rule.group_name}}
|
||||
{{else if isMessage}}
|
||||
{{i18n "chat_integration.group_message_template" name=rule.group_name}}
|
||||
{{/if}}
|
||||
</td>
|
||||
|
||||
|
|
|
@ -6,7 +6,9 @@ en:
|
|||
no_providers: "You need to enable some providers in the plugin settings"
|
||||
channels_with_errors: "Some channels for this provider failed last time messages were sent. Click the error icon(s) to learn more."
|
||||
channel_exception: "An unknown error occured when a message was last sent to this channel. Check the site logs for more information."
|
||||
group_prefix: "Group:"
|
||||
group_mention_template: "Mentions of: @{{name}}"
|
||||
group_message_template: "Messages to: @{{name}}"
|
||||
choose_group: "(choose a group)"
|
||||
all_categories: "(all categories)"
|
||||
all_tags: "(all tags)"
|
||||
create_rule: "Create Rule"
|
||||
|
@ -56,10 +58,11 @@ en:
|
|||
group: Group
|
||||
tags: Tags
|
||||
instructions:
|
||||
filter: "Notification level. Mute overrides other matching rules."
|
||||
category: "This rule will only apply to topics in the specified category."
|
||||
type: "Change the type to trigger notifications for group messages or mentions"
|
||||
filter: "Notification level. Mute overrides other matching rules"
|
||||
category: "This rule will only apply to topics in the specified category"
|
||||
group: "This rule will apply to posts referencing this group"
|
||||
tags: "If specified, this rule will only apply to topics which have at least one of these tags."
|
||||
tags: "If specified, this rule will only apply to topics which have at least one of these tags"
|
||||
|
||||
provider:
|
||||
|
||||
|
|
Loading…
Reference in New Issue