mirror of
https://github.com/discourse/discourse.git
synced 2024-12-21 12:43:44 +08:00
82506096b7
This removes all trivial usages of the `{{action}}` keyword (the helper form, not the modifier form), where trivial means: 1. It's a co-located component (`.hbs` next to `.js`) 2. The JS file has a default export that is native class 3. `{{action "foo"}}` or `(action "foo")` with no extra arguments 4. There is a corresponding `foo()` method defined on the class (not inherited, etc) There are more usages that is slightly more involved (with arguments, etc) that we can deal with, but this PR seems big enough so I just included the easiest cases here. To aid review, each file is converted in an individual commit, and the matching method is temporary annotated with `@__action__` instead of the normal `@action`. This forces a git diff when it is already annotated as `@action`. * DEV: {{action}} -> @action admin-penalty-post-action.hbs * DEV: {{action}} -> @action admin-report.hbs * DEV: {{action}} -> @action admin-watched-word.hbs * DEV: {{action}} -> @action emoji-value-list.hbs * DEV: {{action}} -> @action bool.hbs * DEV: {{action}} -> @action category.hbs * DEV: {{action}} -> @action secret-value-list.hbs * DEV: {{action}} -> @action category-list.hbs * DEV: {{action}} -> @action color.hbs * DEV: {{action}} -> @action compact-list.hbs * DEV: {{action}} -> @action group-list.hbs * DEV: {{action}} -> @action host-list.hbs * DEV: {{action}} -> @action named-list.hbs * DEV: {{action}} -> @action simple-list.hbs * DEV: {{action}} -> @action tag-group-list.hbs * DEV: {{action}} -> @action tag-list.hbs * DEV: {{action}} -> @action value-list.hbs * DEV: {{action}} -> @action watched-word-form.hbs * DEV: {{action}} -> @action composer-messages.hbs * DEV: {{action}} -> @action section.hbs * DEV: {{action}} -> @action user-status-picker.hbs * DEV: cleanup @__action__ -> @action
18 lines
430 B
Handlebars
18 lines
430 B
Handlebars
<div class="penalty-post-controls">
|
|
<label>
|
|
<div class="penalty-post-label">
|
|
{{html-safe (i18n "admin.user.penalty_post_actions")}}
|
|
</div>
|
|
</label>
|
|
<ComboBox
|
|
@value={{this.postAction}}
|
|
@content={{this.penaltyActions}}
|
|
@onChange={{this.penaltyChanged}}
|
|
/>
|
|
</div>
|
|
|
|
{{#if this.editing}}
|
|
<div class="penalty-post-edit">
|
|
<Textarea @value={{this.postEdit}} class="post-editor" />
|
|
</div>
|
|
{{/if}} |