mirror of
https://github.com/discourse/discourse.git
synced 2025-02-08 20:34:52 +00:00
36a9b5d0fa
Instead of ```hbs {{on "input" (action this.foo value="target.value")}} {{on "input" (action (mut this.bar) value="target.value")}} ``` you can use: ```hbs {{on "input" (with-event-value this.foo)}} {{on "input" (with-event-value (fn (mut this.bar)))}} ``` or in gjs: ```gjs import { fn } from "@ember/helper"; import { on } from "@ember/modifier"; import withEventValue from "discourse/helpers/with-event-value"; … {{on "input" (withEventValue (fn (mut this.bar)))}} ```
33 lines
1012 B
Handlebars
33 lines
1012 B
Handlebars
<ConditionalLoadingSpinner @condition={{this.isLoading}}>
|
|
<div class="reports-index section">
|
|
<div class="section-title">
|
|
<h2>{{i18n "admin.reports.title"}}</h2>
|
|
<Input
|
|
class="filter-reports-input"
|
|
placeholder={{i18n "admin.dashboard.filter_reports"}}
|
|
autofocus={{true}}
|
|
{{on "input" (with-event-value this.filterReports)}}
|
|
/>
|
|
</div>
|
|
|
|
<div class="alert alert-info">
|
|
{{d-icon "book"}}
|
|
{{html-safe (i18n "admin.reports.meta_doc")}}
|
|
</div>
|
|
|
|
<ul class="reports-list">
|
|
{{#each this.filteredReports as |report|}}
|
|
<li class="report">
|
|
<LinkTo @route="adminReports.show" @model={{report.type}}>
|
|
<h3 class="report-title">{{report.title}}</h3>
|
|
{{#if report.description}}
|
|
<p class="report-description">
|
|
{{report.description}}
|
|
</p>
|
|
{{/if}}
|
|
</LinkTo>
|
|
</li>
|
|
{{/each}}
|
|
</ul>
|
|
</div>
|
|
</ConditionalLoadingSpinner> |