-
- {{{resultCountLabel}}}
-
+
- {{/if}}
+ {{/if}}
- {{#load-more selector=".fps-result" action="loadMore"}}
- {{#each model.posts as |result|}}
-
-
-
- {{avatar result imageSize="large"}}
-
+ {{#if site.mobileView}}
+
+ {{else}}
+
+ {{i18n "search.advanced.title"}}
+
+ {{/if}}
+
+ {{#if site.mobileView}}
+ {{#if expanded}}
+
+ {{search-advanced-options searchTerm=searchTerm isExpanded=expanded}}
-
-
-
-
-
-
- {{format-age result.created_at}}
- {{#if result.blurb}}
- -
- {{/if}}
-
-
- {{#if result.blurb}}
- {{#highlight-text highlight=highlightQuery}}
- {{{unbound result.blurb}}}
- {{/highlight-text}}
- {{/if}}
-
-
- {{#if showLikeCount}}
- {{#if result.like_count}}
-
- {{result.like_count}} {{d-icon "heart"}}
-
- {{/if}}
- {{/if}}
-
-
- {{/each}}
-
- {{#conditional-loading-spinner condition=loading }}
- {{#unless hasResults}}
- {{#if searchActive}}
-
{{i18n "search.no_results"}}
-
- {{#if showSuggestion}}
-
- {{i18n "search.cant_find"}}
- {{#if canCreateTopic}}
-
{{i18n "search.start_new_topic"}}
- {{#unless siteSettings.login_required}}
- {{i18n "search.or_search_google"}}
- {{/unless}}
- {{else}}
- {{i18n "search.search_google"}}
- {{/if}}
-
-
- {{google-search searchTerm=searchTerm}}
- {{/if}}
- {{/if}}
- {{/unless}}
-
- {{#if hasResults}}
- {{#unless loading}}
-
- {{/unless}}
{{/if}}
- {{/conditional-loading-spinner}}
-
- {{/load-more}}
+ {{else}}
+
+ {{search-advanced-options searchTerm=searchTerm isExpanded=true}}
+ {{d-button
+ label="submit"
+ action="search"
+ icon="search"
+ class="btn-primary search-cta"
+ disabled=searching}}
+
+ {{/if}}
+
{{/d-section}}
diff --git a/app/assets/stylesheets/common/base/search.scss b/app/assets/stylesheets/common/base/search.scss
index 46e6bb36f62..bac455f1f74 100644
--- a/app/assets/stylesheets/common/base/search.scss
+++ b/app/assets/stylesheets/common/base/search.scss
@@ -1,9 +1,182 @@
+.search-container {
+ display: flex;
+ justify-content: space-between;
+
+ .search-bar {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ justify-content: space-between;
+ margin-bottom: 1em;
+
+ .search-query {
+ flex: 1;
+ margin: 0 .5em 0 0;
+ }
+
+ .search-cta {
+ padding-bottom: 6.5px;
+ padding-top: 6.5px;
+ }
+ }
+
+ .search-advanced {
+ width: 70%;
+ @include small-width { width: 65%; }
+
+ .search-actions,
+ .search-notice,
+ .search-results,
+ .search-title,
+ .search-bar {
+ margin-bottom: 1em;
+ }
+
+ .search-info {
+ display: flex;
+ flex-wrap: wrap;
+ border-bottom: 3px solid $primary-low;
+ padding-bottom: .5em;
+ margin-bottom: 1em;
+ flex-direction: row;
+ align-items: center;
+
+ .result-count {
+ display: flex;
+
+ .term {
+ font-weight: bold;
+ }
+
+ // spans can be in different orders depending of locale
+ span + span {
+ margin-left: .25em;
+ }
+ }
+
+ .sort-by {
+ display: flex;
+ margin-left: auto;
+ align-items: center;
+
+ .desc {
+ margin-right: .5em;
+ }
+
+ .combo-box {
+ min-width: 150px;
+ }
+ }
+ }
+
+ .search-title {
+ display: flex;
+ justify-content: flex-start;
+ align-items: center;
+
+ .bulk-select {
+ margin-left: .5em;
+ }
+
+ .fps-select a {
+ margin-left: .5em;
+ font-size: $font-down-1;
+
+ &:hover {
+ text-decoration: underline;
+ }
+ }
+ }
+
+ .search-notice {
+ .fps-invalid {
+ padding: .5em;
+ background-color: $danger-low;
+ border: 1px solid $danger-medium;
+ color: $danger;
+ }
+ }
+ }
+
+ .search-advanced-sidebar {
+ width: 30%;
+ @include small-width { width: 35%; }
+ margin-left: 1em;
+ display: flex;
+ flex-direction: column;
+
+ #search-min-post-count,
+ .date-picker,
+ .combo-box,
+ .ac-wrap,
+ .control-group,
+ .date-picker-wrapper,
+ .search-advanced-category-chooser {
+ box-sizing: border-box;
+ width: 100%;
+ min-width: 100%;
+ input, .item {
+ padding-left: 4px; // temporarily normalizing input padding for this section
+ }
+ }
+
+ .date-picker-wrapper {
+ margin-top: .5em;
+ }
+
+ .date-picker {
+ box-sizing: border-box;
+ text-align: left;
+ padding: 4px;
+ margin-bottom: 0;
+ }
+
+ .search-advanced-title {
+ background: $primary-low;
+ padding: .358em 1em;
+ @include small-width { padding: .358em .5em; }
+ font-weight: 700;
+ text-align: left;
+ font-weight: bold;
+
+ &.btn {
+ background: $primary-low;
+ }
+
+ .d-icon {
+ margin: 0;
+ }
+ }
+
+ .search-advanced-filters {
+ background: $primary-very-low;
+ padding: 1em;
+ .control-group {
+ margin-bottom: 15px;
+ }
+ section.field {
+ margin-top: 5px;
+ }
+ @include small-width {
+ padding: .75em .5em;
+ .ac-wrap, .choices, .select-kit.multi-select { // overriding inline width from JS
+ width: 100% !important;
+ }
+ .select-kit {
+ min-width: unset;
+ }
+ }
+ }
+ }
+}
+
+
.fps-invalid {
margin-bottom: 1em;
}
.fps-result {
-
+ display: flex;
.author {
display: inline-block;
vertical-align: top;
@@ -71,42 +244,6 @@
display: inline-block;
}
-.fps-select {
- margin-top: -15px;
- margin-bottom: 15px;
- a:hover {
- color: $secondary;
- background-color: $tertiary;
- }
- a {
- margin-right: 15px;
- font-size: $font-down-1;
- padding: 2px 5px;
- }
-}
-
-.search.row {
- margin-bottom: 15px;
- .input-xxlarge {
- width: 100%;
- }
-
- .search-bar {
- display: flex;
- margin-bottom: 10px;
- max-width: 780px;
- input {
- height: 22px;
- padding-left: 6px;
- margin: 0 5px 0 0;
- }
- }
-
- .new-topic-btn {
- float:right;
- }
-}
-
.no-results-suggestion {
margin-top: 30px;
}
@@ -118,96 +255,6 @@
float: left;
}
-.search-title {
- position: relative;
- margin: 10px 0 15px;
- max-width: 780px;
- border-bottom: 3px solid $primary-low;
- width: 100%;
- .term {
- font-weight: bold;
- }
-
- .result-count {
- float: left;
- margin-bottom: 4px;
- span {
- line-height: $line-height-large;
- height: 28px;
- display: inline-block;
- }
- }
-
- .sort-by {
- float: right;
- margin-bottom: 4px;
- .desc {
- margin-right: 5px;
- }
- select {
- margin-bottom: 0;
- width: auto;
- min-width: 150px;
- }
- }
-}
-
.google-search-form {
margin-top: 2em;
}
-
-.search-advanced {
- display: flex;
- flex-wrap: wrap;
- margin-bottom: 20px;
- max-width: 780px;
- .search-advanced-options {
- border: 1px solid $primary-low;
- padding: 0 20px;
- width: 100%;
- .date-picker-wrapper {
- vertical-align: top;
- }
- @media screen and (max-width: 715px) {
- padding: 0 10px;
- #postTime {
- margin: 0 0 5px 0;
- }
- }
- }
-
- .search-advanced-btn {
- flex: 1 1 100%;
- width: 100%;
- text-align: left;
- font-weight: bold;
- }
-
- .tag-chooser {
- width: 70%;
- }
-
- .container {
- display: flex;
- flex: 1 1 100%;
- padding: 15px 0 10px 0;
- .all-tags {
- margin-bottom: 0;
- }
- @media screen and (max-width: 600px) {
- flex-wrap: wrap;
- }
- &:not(:first-of-type) {
- border-top: 1px solid $primary-low;
- }
- .control-group {
- flex: 1 1 100%;
- @media screen and (max-width: 600px) {
- margin: 0;
- &:nth-of-type(2) {
- margin-top: 5px;
- }
- }
- }
- }
-}
diff --git a/app/assets/stylesheets/common/select-kit/multi-select.scss b/app/assets/stylesheets/common/select-kit/multi-select.scss
index 91ef4c15395..1978d1c43ac 100644
--- a/app/assets/stylesheets/common/select-kit/multi-select.scss
+++ b/app/assets/stylesheets/common/select-kit/multi-select.scss
@@ -65,7 +65,6 @@
.choices {
margin: 0;
- padding: 2.5px;
box-sizing: border-box;
display: inline-flex;
justify-content: flex-start;
diff --git a/app/assets/stylesheets/common/select-kit/select-kit.scss b/app/assets/stylesheets/common/select-kit/select-kit.scss
index 0ba0af1bf5a..22598ff4184 100644
--- a/app/assets/stylesheets/common/select-kit/select-kit.scss
+++ b/app/assets/stylesheets/common/select-kit/select-kit.scss
@@ -194,6 +194,10 @@
&.is-selected.is-highlighted {
background: $tertiary-low;
}
+
+ .discourse-tag, .discourse-tag-count {
+ color: $primary;
+ }
}
.select-kit-collection {
diff --git a/app/assets/stylesheets/mobile/search.scss b/app/assets/stylesheets/mobile/search.scss
index c9903295ecc..b27a8d326f0 100644
--- a/app/assets/stylesheets/mobile/search.scss
+++ b/app/assets/stylesheets/mobile/search.scss
@@ -1,43 +1,45 @@
-.search button.btn-primary, .search button.btn {
- float: none;
-}
+.search-container {
+ flex-direction: column;
+ margin-top: .5em;
-.search-advanced {
- .search-advanced-options {
- .control-group {
- margin-bottom: 10px;
- .controls {
- input:not([type="checkbox"]),select {
- width: 75%;
+ .search-advanced {
+ order: 1;
+ width: 100%;
+
+ .search-info {
+ flex-direction: column;
+ align-items: left;
+ justify-content: center;
+
+ .sort-by {
+ display: flex;
+ align-items: center;
+ margin-top: .5em;
+ margin-left: 0;
+ width: 100%;
+
+ .select-kit {
+ flex: 1 1 auto;
}
}
}
}
-}
-.search-title {
- .sort-by {
- display: flex;
+ .search-notice {
+ margin-top: 1em;
+ }
+
+ .search-advanced-sidebar {
+ order: 0;
width: 100%;
- align-items: center;
- .select-kit {
- flex: 1 1 auto;
+ margin: 0;
+
+ .tag-chooser {
+ width: 100%;
}
}
}
-.search.row {
- margin-top: 10px;
-}
-
-.search.row input.search {
- height: 25px;
-}
-
-.fps-search-context {
- margin-bottom: 15px;
-}
-
.fps-topic {
max-width: 75%;
}
diff --git a/config/locales/client.cs.yml b/config/locales/client.cs.yml
index 2670e4dbd59..6ed3acb2878 100644
--- a/config/locales/client.cs.yml
+++ b/config/locales/client.cs.yml
@@ -1328,9 +1328,9 @@ cs:
clear_all: "Vymazat vše"
too_short: "Hledaný výraz je příliš krátký."
result_count:
- one: "1 výsledek pro
\"{{term}}\""
- few: "{{count}}{{plus}} výsledky pro
\"{{term}}\""
- other: "{{count}}{{plus}} výsledků pro
\"{{term}}\""
+ one: "
1 výsledek pro\"{{term}}\""
+ few: "
{{count}}{{plus}} výsledky pro\"{{term}}\""
+ other: "
{{count}}{{plus}} výsledků pro\"{{term}}\""
title: "vyhledávat témata, příspěvky, uživatele nebo kategorie"
no_results: "Nenalezeny žádné výsledky."
no_more_results: "Nenalezeny žádné další výsledky."
diff --git a/config/locales/client.de.yml b/config/locales/client.de.yml
index 3c1e9754351..79a99ce3b0c 100644
--- a/config/locales/client.de.yml
+++ b/config/locales/client.de.yml
@@ -1288,8 +1288,8 @@ de:
clear_all: "Auswahl aufheben"
too_short: "Der Suchbegriff ist zu kurz."
result_count:
- one: "1 Ergebnis für
{{term}}"
- other: "{{count}}{{plus}} Ergebnisse für
{{term}}"
+ one: "
1 Ergebnis für{{term}}"
+ other: "
{{count}}{{plus}} Ergebnisse für{{term}}"
title: "suche nach Themen, Beiträgen, Benutzern oder Kategorien"
no_results: "Keine Ergebnisse gefunden."
no_more_results: "Es wurde keine weiteren Ergebnisse gefunden."
diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml
index c5924a7a38b..d65cc600fe8 100644
--- a/config/locales/client.en.yml
+++ b/config/locales/client.en.yml
@@ -1464,8 +1464,8 @@ en:
clear_all: "Clear All"
too_short: "Your search term is too short."
result_count:
- one: "1 result for
{{term}}"
- other: "{{count}}{{plus}} results for
{{term}}"
+ one: "
1 result for{{term}}"
+ other: "
{{count}}{{plus}} results for{{term}}"
title: "search topics, posts, users, or categories"
no_results: "No results found."
no_more_results: "No more results found."
diff --git a/config/locales/client.es.yml b/config/locales/client.es.yml
index 42a4ef7444c..350ff14f916 100644
--- a/config/locales/client.es.yml
+++ b/config/locales/client.es.yml
@@ -1342,8 +1342,8 @@ es:
clear_all: "Limpiar todo"
too_short: "El término de búsqueda es demasiado corto."
result_count:
- one: "1 resultado para
{{term}}"
- other: "{{count}}{{plus}} resultados para
{{term}}"
+ one: "
1 resultado para{{term}}"
+ other: "
{{count}}{{plus}} resultados para{{term}}"
title: "buscar temas, posts, usuarios o categorías"
no_results: "No se ha encontrado ningún resultado."
no_more_results: "No se encontraron más resultados."
diff --git a/config/locales/client.fi.yml b/config/locales/client.fi.yml
index a73bd3d6e01..3f7d63d8332 100644
--- a/config/locales/client.fi.yml
+++ b/config/locales/client.fi.yml
@@ -1292,8 +1292,8 @@ fi:
clear_all: "Tyhjennä kaikki"
too_short: "Hakusana on liian lyhyt."
result_count:
- one: "Yksi tulos haulle
{{term}}"
- other: "{{count}}{{plus}} tulosta haulle
{{term}}"
+ one: "
Yksi tulos haulle{{term}}"
+ other: "
{{count}}{{plus}} tulosta haulle{{term}}"
title: "etsi ketjuja, viestejä, käyttäjiä tai alueita"
no_results: "Ei tuloksia."
no_more_results: "Enempää tuloksia ei löytynyt."
diff --git a/config/locales/client.fr.yml b/config/locales/client.fr.yml
index a0d39ad1dc5..74446674a55 100644
--- a/config/locales/client.fr.yml
+++ b/config/locales/client.fr.yml
@@ -1345,8 +1345,8 @@ fr:
clear_all: "Tout désélectionner"
too_short: "Votre terme de recherche est trop court."
result_count:
- one: "1 résultat pour
{{term}}"
- other: "{{count}}{{plus}} résultats pour
{{term}}"
+ one: "
1 résultat pour{{term}}"
+ other: "
{{count}}{{plus}} résultats pour{{term}}"
title: "rechercher des sujets, messages, utilisateurs ou catégories"
no_results: "Aucun résultat."
no_more_results: "Aucun résultat supplémentaire."
diff --git a/config/locales/client.it.yml b/config/locales/client.it.yml
index 7aba5bcbb21..be60bbab0ce 100644
--- a/config/locales/client.it.yml
+++ b/config/locales/client.it.yml
@@ -1192,8 +1192,8 @@ it:
clear_all: "Cancella Tutto"
too_short: "La tua chiave di ricerca è troppo corta."
result_count:
- one: "1 risultato per
{{term}}"
- other: "{{count}}{{plus}} risultati per
{{term}}"
+ one: "
1 risultato per{{term}}"
+ other: "
{{count}}{{plus}} risultati per{{term}}"
title: "cerca argomenti, messaggi, utenti o categorie"
no_results: "Nessun risultato trovato."
no_more_results: "Nessun altro risultato trovato."
diff --git a/config/locales/client.nb_NO.yml b/config/locales/client.nb_NO.yml
index 67a72fb333a..37dc087d047 100644
--- a/config/locales/client.nb_NO.yml
+++ b/config/locales/client.nb_NO.yml
@@ -1316,8 +1316,8 @@ nb_NO:
clear_all: "Fjern Alle"
too_short: "Din søketekst er for kort."
result_count:
- one: "1 resultat for
{{term}}"
- other: "{{count}}{{plus}} resultater for
{{term}}"
+ one: "
1 resultat for{{term}}"
+ other: "
{{count}}{{plus}} resultater for{{term}}"
title: "søk etter tråder, innlegg, brukere eller kategorier"
no_results: "Ingen resultater funnet."
no_more_results: "Ingen flere resultater funnet."
diff --git a/config/locales/client.sl.yml b/config/locales/client.sl.yml
index bb6bf4637bd..0d406a8c7f6 100644
--- a/config/locales/client.sl.yml
+++ b/config/locales/client.sl.yml
@@ -889,10 +889,10 @@ sl:
clear_all: "Počisti vse"
too_short: "Niz za iskanje je prekratek"
result_count:
- one: "1 zadetek za
{{term}}"
- two: "{{count}}{{plus}} zadetka za
{{term}}"
- few: "{{count}}{{plus}} zadetkov za
{{term}}"
- other: "{{count}}{{plus}} zadetkov za
{{term}}"
+ one: "
1 zadetek za{{term}}"
+ two: "
{{count}}{{plus}} zadetka za{{term}}"
+ few: "
{{count}}{{plus}} zadetkov za{{term}}"
+ other: "
{{count}}{{plus}} zadetkov za{{term}}"
title: "išči po temah, objavah, uporabnikih ali kategorijah"
no_results: "Iskanje nima zadetkov."
no_more_results: "Ni več zadetkov iskanja."
diff --git a/config/locales/client.tr_TR.yml b/config/locales/client.tr_TR.yml
index f08f57434ba..7046934980d 100644
--- a/config/locales/client.tr_TR.yml
+++ b/config/locales/client.tr_TR.yml
@@ -1189,8 +1189,8 @@ tr_TR:
clear_all: "Tümünü Temizle"
too_short: "Aradığın terim çok kısa."
result_count:
- one: "
{{term}} için {{count}}{{plus}} sonuç"
- other: "
{{term}} için {{count}}{{plus}} sonuç"
+ one: "
{{term}}için {{count}}{{plus}} sonuç"
+ other: "
{{term}}için {{count}}{{plus}} sonuç"
title: "konu, gönderi, kullanıcı veya kategori ara"
no_results: "Hiç bir sonuç bulunamadı."
no_more_results: "Başka sonuç yok."