diff --git a/.template-lintrc.js b/.template-lintrc.js index 955a8d36d6f..604f813f523 100644 --- a/.template-lintrc.js +++ b/.template-lintrc.js @@ -19,7 +19,11 @@ module.exports = { "no-inline-styles": false, "no-input-block": true, "no-input-tagname": true, - "no-implicit-this": false, + "no-implicit-this": { + allow: [ + 'loading-spinner' + ] + }, "no-invalid-interactive": true, "no-invalid-link-text": true, "no-invalid-meta": true, diff --git a/app/assets/javascripts/admin/addon/templates/admin.hbs b/app/assets/javascripts/admin/addon/templates/admin.hbs index cdfe1692918..7392a53d3c3 100644 --- a/app/assets/javascripts/admin/addon/templates/admin.hbs +++ b/app/assets/javascripts/admin/addon/templates/admin.hbs @@ -4,24 +4,24 @@
-
+
{{outlet}}
diff --git a/app/assets/javascripts/admin/addon/templates/api-keys-index.hbs b/app/assets/javascripts/admin/addon/templates/api-keys-index.hbs index 24816b5d8da..c99261ad943 100644 --- a/app/assets/javascripts/admin/addon/templates/api-keys-index.hbs +++ b/app/assets/javascripts/admin/addon/templates/api-keys-index.hbs @@ -1,6 +1,6 @@ -{{#if model}} +{{#if this.model}} @@ -12,7 +12,7 @@ - {{#each model as |k|}} + {{#each this.model as |k|}}
 
{{#if k.revoked_at}}{{d-icon "times-circle"}}{{/if}} @@ -57,7 +57,7 @@
- + {{else}}

{{i18n "admin.api.none"}}

{{/if}} diff --git a/app/assets/javascripts/admin/addon/templates/api-keys-new.hbs b/app/assets/javascripts/admin/addon/templates/api-keys-new.hbs index d8dc05558e1..3c9c5310d05 100644 --- a/app/assets/javascripts/admin/addon/templates/api-keys-new.hbs +++ b/app/assets/javascripts/admin/addon/templates/api-keys-new.hbs @@ -4,9 +4,9 @@
- {{#if model.id}} + {{#if this.model.id}} -
{{model.key}}
+
{{this.model.key}}
{{i18n "admin.api.not_shown_again"}} @@ -16,16 +16,16 @@ {{else}} - + - + - {{#if showUserSelector}} + {{#if this.showUserSelector}} - @@ -33,16 +33,16 @@ {{/if}} - + - {{#if (eq scopeMode "read_only")}} + {{#if (eq this.scopeMode "read_only")}}

{{i18n "admin.api.scopes.descriptions.global.read"}}

- {{else if (eq scopeMode "global")}} + {{else if (eq this.scopeMode "global")}}

{{i18n "admin.api.scopes.global_description"}}

{{/if}}
- {{#if (eq scopeMode "granular")}} + {{#if (eq this.scopeMode "granular")}}

{{i18n "admin.api.scopes.title"}}

{{i18n "admin.api.scopes.description"}}

@@ -55,7 +55,7 @@ - {{#each-in scopes as |resource actions|}} + {{#each-in this.scopes as |resource actions|}} @@ -86,6 +86,6 @@
{{resource}}
{{/if}} - + {{/if}}
diff --git a/app/assets/javascripts/admin/addon/templates/api-keys-show.hbs b/app/assets/javascripts/admin/addon/templates/api-keys-show.hbs index 5707d4cf3e9..43ae76c3ce7 100644 --- a/app/assets/javascripts/admin/addon/templates/api-keys-show.hbs +++ b/app/assets/javascripts/admin/addon/templates/api-keys-show.hbs @@ -5,21 +5,21 @@
- {{#if model.revoked_at}}{{d-icon "times-circle"}}{{/if}} - {{model.truncatedKey}} + {{#if this.model.revoked_at}}{{d-icon "times-circle"}}{{/if}} + {{this.model.truncatedKey}} - {{#if editingDescription}} - + {{#if this.editingDescription}} + {{else}} - {{if model.description model.description (i18n "admin.api.no_description")}} + {{if this.model.description this.model.description (i18n "admin.api.no_description")}} {{/if}}
- {{#if editingDescription}} + {{#if this.editingDescription}} {{else}} @@ -29,9 +29,9 @@ - {{#if model.user}} - - {{avatar model.user imageSize="small"}} {{model.user.username}} + {{#if this.model.user}} + + {{avatar this.model.user imageSize="small"}} {{this.model.user.username}} {{else}} {{i18n "admin.api.all_users"}} @@ -39,38 +39,38 @@ - {{format-date model.created_at leaveAgo="true"}} + {{format-date this.model.created_at leaveAgo="true"}} - {{format-date model.updated_at leaveAgo="true"}} + {{format-date this.model.updated_at leaveAgo="true"}} - {{#if model.last_used_at}} - {{format-date model.last_used_at leaveAgo="true"}} + {{#if this.model.last_used_at}} + {{format-date this.model.last_used_at leaveAgo="true"}} {{else}} {{i18n "admin.api.never_used"}} {{/if}} - {{#if model.revoked_at}} - {{format-date model.revoked_at leaveAgo="true"}} + {{#if this.model.revoked_at}} + {{format-date this.model.revoked_at leaveAgo="true"}} {{else}} {{i18n "no_value"}} {{/if}}
- {{#if model.revoked_at}} - - + {{#if this.model.revoked_at}} + + {{else}} - + {{/if}}
- {{#if model.api_key_scopes.length}} + {{#if this.model.api_key_scopes.length}}

{{i18n "admin.api.scopes.title"}}

@@ -83,7 +83,7 @@ - {{#each model.api_key_scopes as |scope|}} + {{#each this.model.api_key_scopes as |scope|}} - {{#each model as |backup|}} + {{#each this.model as |backup|}} diff --git a/app/assets/javascripts/admin/addon/templates/backups-logs.hbs b/app/assets/javascripts/admin/addon/templates/backups-logs.hbs index 1f4a77418d0..88ee8f9ec5f 100644 --- a/app/assets/javascripts/admin/addon/templates/backups-logs.hbs +++ b/app/assets/javascripts/admin/addon/templates/backups-logs.hbs @@ -1 +1 @@ - + diff --git a/app/assets/javascripts/admin/addon/templates/backups.hbs b/app/assets/javascripts/admin/addon/templates/backups.hbs index ca33af1c50c..baeed297482 100644 --- a/app/assets/javascripts/admin/addon/templates/backups.hbs +++ b/app/assets/javascripts/admin/addon/templates/backups.hbs @@ -6,10 +6,10 @@
- {{#if model.canRollback}} - + {{#if this.model.canRollback}} + {{/if}} - {{#if model.isOperationRunning}} + {{#if this.model.isOperationRunning}} {{else}} diff --git a/app/assets/javascripts/admin/addon/templates/badges-award.hbs b/app/assets/javascripts/admin/addon/templates/badges-award.hbs index b91297be450..a18133d2ec4 100644 --- a/app/assets/javascripts/admin/addon/templates/badges-award.hbs +++ b/app/assets/javascripts/admin/addon/templates/badges-award.hbs @@ -2,12 +2,12 @@

{{i18n "admin.badges.mass_award.title"}}

{{i18n "admin.badges.mass_award.description"}}

- {{#if model}} + {{#if this.model}}
- {{#if model}} - {{icon-or-image model}} - {{model.name}} + {{#if this.model}} + {{icon-or-image this.model}} + {{this.model.name}} {{else}} {{i18n "admin.badges.mass_award.no_badge_selected"}} {{/if}} @@ -18,47 +18,47 @@
- {{#if model.multiple_grant}} + {{#if this.model.multiple_grant}} {{/if}}
- + {{d-icon "times"}} {{i18n "cancel"}} - {{#if saving}} + {{#if this.saving}} {{i18n "uploading"}} {{/if}} - {{#if resultsMessage}} + {{#if this.resultsMessage}}

- {{#if success}} + {{#if this.success}} {{d-icon "check" class="bulk-award-status-icon success"}} {{else}} {{d-icon "times" class="bulk-award-status-icon failure"}} {{/if}} - {{resultsMessage}} + {{this.resultsMessage}}

- {{#if unmatchedEntries.length}} + {{#if this.unmatchedEntries.length}}

{{d-icon "exclamation-triangle" class="bulk-award-status-icon failure"}} - {{#if unmatchedEntriesTruncated}} - {{i18n "admin.badges.mass_award.csv_has_unmatched_users_truncated_list" count=unmatchedEntriesCount}} + {{#if this.unmatchedEntriesTruncated}} + {{i18n "admin.badges.mass_award.csv_has_unmatched_users_truncated_list" count=this.unmatchedEntriesCount}} {{else}} {{i18n "admin.badges.mass_award.csv_has_unmatched_users"}} {{/if}}

    - {{#each unmatchedEntries as |entry|}} + {{#each this.unmatchedEntries as |entry|}}
  • {{entry}}
  • {{/each}}
diff --git a/app/assets/javascripts/admin/addon/templates/badges-index.hbs b/app/assets/javascripts/admin/addon/templates/badges-index.hbs index 240428ab45f..9e2b04e2a04 100644 --- a/app/assets/javascripts/admin/addon/templates/badges-index.hbs +++ b/app/assets/javascripts/admin/addon/templates/badges-index.hbs @@ -1,10 +1,10 @@
- {{i18n + {{i18n
- {{#if buffered.system}} - + - + href="data:application/octet-stream;charset=utf-8;base64,{{this.base64BackupCode}}"> {{d-icon "download"}}
diff --git a/app/assets/javascripts/discourse/app/templates/components/badge-button.hbs b/app/assets/javascripts/discourse/app/templates/components/badge-button.hbs index 2af01ef27ed..a6ece24e8b6 100644 --- a/app/assets/javascripts/discourse/app/templates/components/badge-button.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/badge-button.hbs @@ -1,5 +1,5 @@ - - {{icon-or-image badge}} - {{badge.name}} + + {{icon-or-image this.badge}} + {{this.badge.name}} {{yield}} diff --git a/app/assets/javascripts/discourse/app/templates/components/badge-card.hbs b/app/assets/javascripts/discourse/app/templates/components/badge-card.hbs index 58c279989dd..c51e4641b4f 100644 --- a/app/assets/javascripts/discourse/app/templates/components/badge-card.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/badge-card.hbs @@ -1,24 +1,24 @@ -{{#if displayCount}} - {{displayCount}} +{{#if this.displayCount}} + {{this.displayCount}} {{/if}} -{{#if badge.has_badge}} - {{d-icon "check"}} +{{#if this.badge.has_badge}} + {{d-icon "check"}} {{/if}} -{{#if canFavorite}} - {{#if isFavorite}} - +{{#if this.canFavorite}} + {{#if this.isFavorite}} + {{else}} - + {{/if}} {{/if}}
- {{icon-or-image badge}} + {{icon-or-image this.badge}}
-

{{badge.name}}

-
{{html-safe summary}}
+

{{this.badge.name}}

+
{{html-safe this.summary}}
diff --git a/app/assets/javascripts/discourse/app/templates/components/badge-selector.hbs b/app/assets/javascripts/discourse/app/templates/components/badge-selector.hbs index 5ea3c796ec8..495b23d6c3c 100644 --- a/app/assets/javascripts/discourse/app/templates/components/badge-selector.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/badge-selector.hbs @@ -1 +1 @@ - + diff --git a/app/assets/javascripts/discourse/app/templates/components/badge-title.hbs b/app/assets/javascripts/discourse/app/templates/components/badge-title.hbs index d32973e1dd7..0df8660129a 100644 --- a/app/assets/javascripts/discourse/app/templates/components/badge-title.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/badge-title.hbs @@ -9,14 +9,14 @@
- +
- - {{#if _isSaved}} + + {{#if this._isSaved}} {{i18n "saved"}} {{/if}}
diff --git a/app/assets/javascripts/discourse/app/templates/components/basic-topic-list.hbs b/app/assets/javascripts/discourse/app/templates/components/basic-topic-list.hbs index 87f36da3851..38c2505af42 100644 --- a/app/assets/javascripts/discourse/app/templates/components/basic-topic-list.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/basic-topic-list.hbs @@ -1,8 +1,8 @@ - - {{#if topics}} - + + {{#if this.topics}} + {{else}} - {{#unless loadingMore}} + {{#unless this.loadingMore}}
{{i18n "choose_topic.none_found"}}
diff --git a/app/assets/javascripts/discourse/app/templates/components/bookmark-icon.hbs b/app/assets/javascripts/discourse/app/templates/components/bookmark-icon.hbs index 6d82c0977d2..0058894226d 100644 --- a/app/assets/javascripts/discourse/app/templates/components/bookmark-icon.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/bookmark-icon.hbs @@ -1 +1 @@ -{{d-icon icon translatedTitle=title class=cssClasses}} +{{d-icon this.icon translatedTitle=this.title class=this.cssClasses}} diff --git a/app/assets/javascripts/discourse/app/templates/components/bookmark-list.hbs b/app/assets/javascripts/discourse/app/templates/components/bookmark-list.hbs index 7f1daf30654..586e1801db0 100644 --- a/app/assets/javascripts/discourse/app/templates/components/bookmark-list.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/bookmark-list.hbs @@ -1,8 +1,8 @@ - - + +
{{scope.resource}} diff --git a/app/assets/javascripts/admin/addon/templates/backups-index.hbs b/app/assets/javascripts/admin/addon/templates/backups-index.hbs index 732b8f308b0..1261659a46b 100644 --- a/app/assets/javascripts/admin/addon/templates/backups-index.hbs +++ b/app/assets/javascripts/admin/addon/templates/backups-index.hbs @@ -1,17 +1,17 @@
- {{#if localBackupStorage}} - + {{#if this.localBackupStorage}} + {{else}} {{/if}} - {{#if site.isReadOnly}} - + {{#if this.site.isReadOnly}} + {{else}} - + {{/if}}
- {{#if status.restoreDisabled}} + {{#if this.status.restoreDisabled}} {{d-icon "info-circle"}} {{i18n "admin.backups.operations.restore.is_disabled"}} {{/if}}
@@ -23,19 +23,19 @@
{{backup.filename}} {{human-size backup.size}}
- {{#if status.isOperationRunning}} + {{#if this.status.isOperationRunning}} - + {{else}} - + {{/if}}
- {{#unless site.mobileView}} + {{#unless this.site.mobileView}} @@ -11,7 +11,7 @@ {{/unless}} - {{#each content as |bookmark|}} + {{#each this.content as |bookmark|}} - {{#unless site.mobileView}} + {{#unless this.site.mobileView}}
{{i18n "topic.title"}}  
{{#if bookmark.user.avatar_template}} @@ -77,6 +77,6 @@ {{/each}}
- + diff --git a/app/assets/javascripts/discourse/app/templates/components/bookmark.hbs b/app/assets/javascripts/discourse/app/templates/components/bookmark.hbs index 6e038c999a9..1a68db973fe 100644 --- a/app/assets/javascripts/discourse/app/templates/components/bookmark.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/bookmark.hbs @@ -1,28 +1,28 @@ - - {{#if errorMessage}} + + {{#if this.errorMessage}}
-
{{errorMessage}}
+
{{this.errorMessage}}
{{/if}}
- +
- {{#if showOptions}} + {{#if this.showOptions}}
- +
{{/if}} - {{#if showExistingReminderAt }} + {{#if this.showExistingReminderAt }}
{{d-icon "far-clock"}} - {{i18n "bookmarks.reminders.existing_reminder" at_date_time=existingReminderAtFormatted}} + {{i18n "bookmarks.reminders.existing_reminder" at_date_time=this.existingReminderAtFormatted}}
{{/if}} @@ -31,8 +31,8 @@ {{i18n "post.bookmarks.set_reminder"}} - {{#if userHasTimezoneSet}} - + {{#if this.userHasTimezoneSet}} + {{else}}
{{html-safe (i18n "bookmarks.no_timezone" basePath=(base-path))}}
{{/if}} @@ -41,7 +41,7 @@ diff --git a/app/assets/javascripts/discourse/app/templates/components/bread-crumbs.hbs b/app/assets/javascripts/discourse/app/templates/components/bread-crumbs.hbs index 21fcaeb6987..8b41ec852ee 100644 --- a/app/assets/javascripts/discourse/app/templates/components/bread-crumbs.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/bread-crumbs.hbs @@ -1,7 +1,7 @@ -{{#each categoryBreadcrumbs as |breadcrumb|}} +{{#each this.categoryBreadcrumbs as |breadcrumb|}} {{#if breadcrumb.hasOptions}}
  • - -
  • {{else}}
  • - +
  • {{/if}} {{/if}} diff --git a/app/assets/javascripts/discourse/app/templates/components/cancel-link.hbs b/app/assets/javascripts/discourse/app/templates/components/cancel-link.hbs index cdef7f3c203..a112afac460 100644 --- a/app/assets/javascripts/discourse/app/templates/components/cancel-link.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/cancel-link.hbs @@ -1,3 +1,3 @@ - + {{i18n "cancel"}} diff --git a/app/assets/javascripts/discourse/app/templates/components/categories-and-latest-topics.hbs b/app/assets/javascripts/discourse/app/templates/components/categories-and-latest-topics.hbs index 73b51ca62b7..d0aad86c7fb 100644 --- a/app/assets/javascripts/discourse/app/templates/components/categories-and-latest-topics.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/categories-and-latest-topics.hbs @@ -1,9 +1,9 @@
    - +
    - +
    diff --git a/app/assets/javascripts/discourse/app/templates/components/categories-and-top-topics.hbs b/app/assets/javascripts/discourse/app/templates/components/categories-and-top-topics.hbs index 2d33841cca0..dcd76823c2b 100644 --- a/app/assets/javascripts/discourse/app/templates/components/categories-and-top-topics.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/categories-and-top-topics.hbs @@ -1,9 +1,9 @@
    - +
    - +
    diff --git a/app/assets/javascripts/discourse/app/templates/components/categories-boxes-topic.hbs b/app/assets/javascripts/discourse/app/templates/components/categories-boxes-topic.hbs index 988069494c2..e35b16d0ffe 100644 --- a/app/assets/javascripts/discourse/app/templates/components/categories-boxes-topic.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/categories-boxes-topic.hbs @@ -1,5 +1,5 @@ -{{d-icon topicStatusIcon}} +{{d-icon this.topicStatusIcon}} - - {{html-safe topic.fancyTitle}} + + {{html-safe this.topic.fancyTitle}} diff --git a/app/assets/javascripts/discourse/app/templates/components/categories-boxes-with-topics.hbs b/app/assets/javascripts/discourse/app/templates/components/categories-boxes-with-topics.hbs index 1a515034835..f2b2c622ec8 100644 --- a/app/assets/javascripts/discourse/app/templates/components/categories-boxes-with-topics.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/categories-boxes-with-topics.hbs @@ -1,5 +1,5 @@ -{{#each categories as |c|}} -
    +{{#each this.categories as |c|}} +
    @@ -12,7 +12,7 @@

    {{#if c.read_restricted}} - {{d-icon lockIcon}} + {{d-icon this.lockIcon}} {{/if}} {{c.name}}

    diff --git a/app/assets/javascripts/discourse/app/templates/components/categories-boxes.hbs b/app/assets/javascripts/discourse/app/templates/components/categories-boxes.hbs index b1da9f26f32..844cc9f0e7f 100644 --- a/app/assets/javascripts/discourse/app/templates/components/categories-boxes.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/categories-boxes.hbs @@ -1,7 +1,7 @@ -{{#each categories as |c|}} +{{#each this.categories as |c|}} -
    +
    {{#unless c.isMuted}}