From dc91b7d0cdfd990d09112c3f4ff57b615f13e460 Mon Sep 17 00:00:00 2001 From: Rishabh Nambiar <5862206+rishabhnambiar@users.noreply.github.com> Date: Fri, 7 Sep 2018 15:58:52 +0530 Subject: [PATCH] FIX: Remove useless no_query_hook text and move create & import buttons to top right --- .../templates/admin/plugins-explorer.hbs | 16 +++++----------- assets/stylesheets/explorer.scss | 7 +++++-- config/locales/client.en.yml | 4 ---- 3 files changed, 10 insertions(+), 17 deletions(-) diff --git a/assets/javascripts/discourse/templates/admin/plugins-explorer.hbs b/assets/javascripts/discourse/templates/admin/plugins-explorer.hbs index e1293d0..119bc21 100644 --- a/assets/javascripts/discourse/templates/admin/plugins-explorer.hbs +++ b/assets/javascripts/discourse/templates/admin/plugins-explorer.hbs @@ -5,9 +5,9 @@ {{else}} {{#unless selectedQueryId}}
- {{combo-box valueAttribute="id" value=selectedQueryId nameProperty="listName" none="explorer.menu_none" content=content castInteger="true" nameChanges="true"}} - {{d-button action="showCreate" icon="plus" class="no-text"}} - {{d-button action="importQuery" label="explorer.import.label" icon="upload"}} + {{combo-box valueAttribute="id" class="btn-left" value=selectedQueryId nameProperty="listName" none="explorer.menu_none" content=content castInteger="true" nameChanges="true"}} + {{d-button action="showCreate" icon="plus" class="no-text btn-right"}} + {{d-button action="importQuery" label="explorer.import.label" icon="upload btn-right"}}
{{#if showCreate}} @@ -23,14 +23,10 @@ {{i18n "explorer.others_dirty"}} {{/if}} - -
{{/unless}} {{#if content.length}} - {{#if selectedItem.fake}} -

{{i18n "explorer.no_query_selected"}} {{i18n "explorer.no_query_selected_hook"}}

- {{else}} + {{#unless selectedItem.fake}}
{{#if selectedItem}} {{#if editing}} @@ -124,7 +120,7 @@
- {{/if}} + {{/unless}} {{conditional-loading-spinner condition=loading}} {{#unless selectedItem.fake}} {{#if results}} @@ -199,8 +195,6 @@
- {{else}} -

{{i18n "explorer.no_queries"}} {{i18n "explorer.no_queries_hook"}}

{{/if}} {{/if}} {{/explorer-container}} diff --git a/assets/stylesheets/explorer.scss b/assets/stylesheets/explorer.scss index bcb366e..08a4c71 100644 --- a/assets/stylesheets/explorer.scss +++ b/assets/stylesheets/explorer.scss @@ -236,8 +236,11 @@ .query-list { display: flex; - .combo-box, - button { + .btn-left { + margin-right: 0.5em; + } + .btn-right { + margin-left: auto; margin-right: 0.5em; } li.none { diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index 1b54981..64c77ea 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -61,8 +61,4 @@ en: explain_label: "Include query plan?" save_params: "Set Defaults" reset_params: "Reset" - no_queries: "There are no queries. Why not " - no_queries_hook: "create one?" menu_none: "Select a query" - no_query_selected: "No query selected. Would you like to " - no_query_selected_hook: "create one?"