From cf2735162a2722dc2a810ef1769c7ff484bbb5de Mon Sep 17 00:00:00 2001 From: Jarek Radosz Date: Mon, 5 Jul 2021 23:15:57 +0200 Subject: [PATCH] DEV: Fix template linting issues (#124) * Update test * Remove the empty line in table --- .../templates/admin/plugins-explorer.hbs | 99 ++++++++++--------- .../templates/components/share-report.hbs | 3 +- .../acceptance/list-queries-test.js.es6 | 7 +- 3 files changed, 59 insertions(+), 50 deletions(-) diff --git a/assets/javascripts/discourse/templates/admin/plugins-explorer.hbs b/assets/javascripts/discourse/templates/admin/plugins-explorer.hbs index b8a06e3..e200f29 100644 --- a/assets/javascripts/discourse/templates/admin/plugins-explorer.hbs +++ b/assets/javascripts/discourse/templates/admin/plugins-explorer.hbs @@ -67,14 +67,15 @@ {{#if runDisabled}} {{#unless editing}} - - {{d-button class="ok" action=(action "save") icon="check"}} - {{d-button class="cancel" action=(action "discard") icon="times"}} - - {{/unless}} + + {{d-button class="ok" action=(action "save") icon="check"}} + {{d-button class="cancel" action=(action "discard") icon="times"}} + + {{/unless}} {{/if}} +
{{! the SQL editor will show the first time you }} @@ -93,9 +94,11 @@ +
{{d-icon "discourse-expand"}}
+
{{else}} @@ -119,6 +122,7 @@ {{d-button action=(action "showHelpModal") label="explorer.help.label" icon="question-circle"}} {{/if}} +
{{#if selectedItem.destroyed}} {{d-button action=(action "recover") class="" icon="undo" label="explorer.recover"}} @@ -131,6 +135,7 @@ {{/unless}} {{/if}}
+
{{/if}} @@ -143,6 +148,7 @@ {{/each}} {{/if}} + {{#if runDisabled}} {{#if saveDisabled}} {{d-button label="explorer.run" disabled="true" class="btn-primary"}} @@ -152,12 +158,15 @@ {{else}} {{d-button action=(action "run") icon="play" label="explorer.run" disabled=runDisabled class="btn-primary" type="submit"}} {{/if}} +
{{/unless}} + {{conditional-loading-spinner condition=loading}} + {{#unless selectedItem.fake}} {{#if results}}
@@ -172,47 +181,46 @@ {{/if}} {{/unless}} - {{#if showRecentQueries}} -
- - - - - - - - - - {{#each filteredContent as |query|}} - - -
-
- {{table-header-toggle field="name" labelKey="explorer.query_name" order=order asc=asc automatic=true}} -
-
-
- {{table-header-toggle field="username" labelKey="explorer.query_user" order=order asc=asc automatic=true}} -
-
-
- {{i18n "explorer.query_groups"}} -
-
-
- {{table-header-toggle field="last_run_at" labelKey="explorer.query_time" order=order asc=asc automatic=true}} -
-
- - {{query.name}} - {{query.description}} - - - {{#if query.username}} - - {{query.username}} + {{#if showRecentQueries}} +
+ + + + + + + + + {{#each filteredContent as |query|}} + + +
+
+ {{table-header-toggle field="name" labelKey="explorer.query_name" order=order asc=asc automatic=true}} +
+
+
+ {{table-header-toggle field="username" labelKey="explorer.query_user" order=order asc=asc automatic=true}} +
+
+
+ {{i18n "explorer.query_groups"}} +
+
+
+ {{table-header-toggle field="last_run_at" labelKey="explorer.query_time" order=order asc=asc automatic=true}} +
+
+ + {{query.name}} + {{query.description}} - {{/if}} + + {{#if query.username}} + + {{query.username}} + + {{/if}} {{#each query.group_names as |group|}} @@ -241,7 +249,6 @@ {{/if}}
- {{/if}} {{/if}} {{/explorer-container}} diff --git a/assets/javascripts/discourse/templates/components/share-report.hbs b/assets/javascripts/discourse/templates/components/share-report.hbs index a21b345..711c4ac 100644 --- a/assets/javascripts/discourse/templates/components/share-report.hbs +++ b/assets/javascripts/discourse/templates/components/share-report.hbs @@ -1,7 +1,8 @@ -
+
{{d-icon "link"}} {{group}}
+ {{#if visible}}