tweaks to full page search

This commit is contained in:
Sam 2016-10-11 10:36:08 +11:00
parent 0f0b657182
commit b6d0d4d94d
3 changed files with 12 additions and 7 deletions

View File

@ -138,9 +138,9 @@ export default Ember.Controller.extend({
return this.currentUser && this.currentUser.staff && hasResults;
},
@computed
@computed('isExpanded')
canCreateTopic() {
return this.currentUser && !this.site.mobileView;
return this.currentUser && !this.site.mobileView && !this.get('isExpanded');
},
_search() {

View File

@ -2,7 +2,7 @@
{{search-text-field value=searchTerm class="full-page-search input-xxlarge search no-blur" action="search" hasAutofocus=hasAutofocus}}
{{d-button action="search" icon="search" class="btn-primary" disabled=searching}}
{{search-advanced-options searchTerm=searchTerm}}
{{search-advanced-options searchTerm=searchTerm isExpanded=isExpanded}}
{{#if canCreateTopic}}
<span class="new-topic-btn">{{d-button id="create-topic" class="btn-default" action="createTopic" actionParam=searchTerm icon="plus" label="topic.create"}}</span>
@ -42,7 +42,9 @@
{{#if searchActive}}
{{i18n "search.no_results"}}
{{/if}}
<a href class="show-help" {{action "showSearchHelp" bubbles=false}}>{{i18n "search.search_help"}}</a>
{{#unless isExpanded}}
<a href class="show-help" {{action "showSearchHelp" bubbles=false}}>{{i18n "search.search_help"}}</a>
{{/unless}}
</h3>
{{/unless}}
@ -118,7 +120,9 @@
{{#if hasResults}}
<h3 class="search-footer">
{{i18n "search.no_more_results"}}
<a href class="show-help" {{action "showSearchHelp" bubbles=false}}>{{i18n "search.search_help"}}</a>
{{#unless isExpanded}}
<a href class="show-help" {{action "showSearchHelp" bubbles=false}}>{{i18n "search.search_help"}}</a>
{{/unless}}
</h3>
{{/if}}

View File

@ -101,8 +101,9 @@
margin-bottom: 15px;
.panel-title {
background-color: dark-light-diff($primary, $secondary, 90%, -75%);
padding: 5px 10px 5px 10px;
background-color: dark-light-diff($primary, $secondary, 94%, -80%);
padding: 8px 10px;
cursor: pointer;
}
.search-options {