mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 09:42:07 +08:00
d69c5eebcf
* UI: Mass grant a badge from the admin ui * Send the uploaded CSV and badge ID to the backend * Read the CSV and grant badge in batches * UX: Communicate the result to the user * Don't award if badge is disabled * Create a 'send_notification' method to remove duplicated code, slightly shrink badge image. Replace router transition with href. * Dynamically discover current route
22 lines
720 B
Handlebars
22 lines
720 B
Handlebars
{{#d-section class="award-badge"}}
|
|
<form class="form-horizontal">
|
|
<h1>{{i18n 'admin.badges.mass_award.title'}}</h1>
|
|
<div class='badge-preview'>
|
|
{{#if model}}
|
|
{{icon-or-image model}}
|
|
<span class="badge-display-name">{{model.name}}</span>
|
|
{{else}}
|
|
<span class='badge-placeholder'>{{I18n 'admin.badges.mass_award.no_badge_selected'}}</span>
|
|
{{/if}}
|
|
</div>
|
|
<div>
|
|
<h4>{{I18n 'admin.badges.mass_award.upload_csv'}}</h4>
|
|
<input type='file' id='massAwardCSVUpload' accept='.csv' />
|
|
</div>
|
|
{{d-button
|
|
class="btn-primary"
|
|
action=(action 'massAward')
|
|
disabled=saving
|
|
label="admin.badges.save"}}
|
|
</form>
|
|
{{/d-section}} |