diff --git a/include/text.php b/include/text.php index 956344d63..c57af1feb 100644 --- a/include/text.php +++ b/include/text.php @@ -975,6 +975,7 @@ function search($s,$id='search-box',$url='search',$save = false, $aside = true) '$search_label' => t('Search'), '$save_label' => t('Save'), '$savedsearch' => feature_enabled(local_user(),'savedsearch'), + '$search_hint' => t('@name, !forum, #tags, content'), ); if (!$aside) { diff --git a/mod/search.php b/mod/search.php index 790f577ba..fd8a9eb64 100644 --- a/mod/search.php +++ b/mod/search.php @@ -132,9 +132,6 @@ function search_content(&$a) { nav_set_selected('search'); - - $o = '

' . t('Search') . '

'; - if(x($a->data,'search')) $search = notags(trim($a->data['search'])); else @@ -146,8 +143,13 @@ function search_content(&$a) { $search = ((x($_GET,'tag')) ? notags(trim(rawurldecode($_GET['tag']))) : ''); } - - $o .= search($search,'search-box','search',((local_user()) ? true : false), false); + // contruct a wrapper for the search header + $o .= replace_macros(get_markup_template("content_wrapper.tpl"),array( + 'name' => "search-header", + '$title' => t("Search"), + '$title_size' => 3, + '$content' => search($search,'search-box','search',((local_user()) ? true : false), false) + )); if(strpos($search,'#') === 0) { $tag = true; @@ -160,7 +162,7 @@ function search_content(&$a) { return dirfind_content($a); } - if(x($_GET,'search-option')) + if(x($_GET,'search-option')) switch($_GET['search-option']) { case 'fulltext': break; diff --git a/view/templates/content_wrapper.tpl b/view/templates/content_wrapper.tpl new file mode 100644 index 000000000..e323b12e1 --- /dev/null +++ b/view/templates/content_wrapper.tpl @@ -0,0 +1,12 @@ + +
+ {{* give different possibilities for the size of the heading *}} + {{if $title && $title_size}} + {{$title}} + {{elseif $title}} + {{include file="section_title.tpl"}} + {{/if}} + + {{* output the content *}} + {{$content}} +
diff --git a/view/theme/frio/css/style.css b/view/theme/frio/css/style.css index 08cf81db8..788c9747d 100644 --- a/view/theme/frio/css/style.css +++ b/view/theme/frio/css/style.css @@ -138,6 +138,12 @@ a#item-delete-selected { padding: 4px 8px; font-size: 12px; } +.btn-small { + padding: 6px 10px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; +} .btn-primary { background: $nav_bg; color: $btn_primary_color !important; @@ -186,6 +192,13 @@ a#item-delete-selected { background: $link_hover_color; } +.form-control-sm, .input-group-sm>.form-control, .input-group-sm>.input-group-addon, .input-group-sm>.input-group-btn>.btn { + padding: .275rem .75rem; + /*font-size: .875rem;*/ + line-height: 1.5; + height: 30px; + border-radius: .2rem; +} /* Bootstrap media class fix/hack * This is a test. I thought it does have some * issues in some corner cases. Maybe we remove @@ -939,15 +952,18 @@ aside #follow-sidebar .form-group-search .form-button-search { padding: 2px 8px; } -aside #group-sidebar .group-edit-tool { +aside #group-sidebar .group-edit-tool, +aside #saved-search-list .savedsearchdrop { opacity: 0.1; transition: all 0.25s ease-in-out; } -aside #group-sidebar .sidebar-group-li:hover .group-edit-tool { +aside #group-sidebar .sidebar-group-li:hover .group-edit-tool, +aside #saved-search-list .saved-search-li:hover .savedsearchdrop { opacity: 0.8; transition: all 0.25s ease-in-out; } -aside #group-sidebar .sidebar-group-li .group-edit-tool:hover { +aside #group-sidebar .sidebar-group-li .group-edit-tool:hover, +aside #saved-search-list .saved-search-li .savedsearchdrop:hover { opacity: 1; } @@ -1643,7 +1659,22 @@ ul.dropdown-menu li:hover { color: $link_color; font-size: 20px; } - +/* Section-Content-Wrapper */ +#search-header-wrapper { + padding: 15px; + padding-bottom: 20px; + margin-bottom: 20px; + border: none; + /*background-color: #fff;*/ + background-color: rgba(255,255,255,$contentbg_transp); + border-radius: 4px; + position: relative; + /*overflow: hidden;*/ + color: #555; + box-shadow: 0 0 3px #dadada; + -webkit-box-shadow: 0 0 3px #dadada; + -moz-box-shadow: 0 0 3px #dadada; +} /* PAGES */ diff --git a/view/theme/frio/js/theme.js b/view/theme/frio/js/theme.js index 5138a4822..34596166e 100644 --- a/view/theme/frio/js/theme.js +++ b/view/theme/frio/js/theme.js @@ -114,6 +114,9 @@ $(document).ready(function(){ } }); + // initialize the bootstrap-select + $('.selectpicker').selectpicker(); + }); //function commentOpenUI(obj, id) { diff --git a/view/theme/frio/templates/saved_searches_aside.tpl b/view/theme/frio/templates/saved_searches_aside.tpl new file mode 100644 index 000000000..da4cd1541 --- /dev/null +++ b/view/theme/frio/templates/saved_searches_aside.tpl @@ -0,0 +1,16 @@ + +{{if $saved}} +
+ + + +
+
+{{/if}} diff --git a/view/theme/frio/templates/searchbox.tpl b/view/theme/frio/templates/searchbox.tpl new file mode 100644 index 000000000..cc39ba6dc --- /dev/null +++ b/view/theme/frio/templates/searchbox.tpl @@ -0,0 +1,46 @@ + +
+
+
+
+
+
+ + + +
+
+ {{* The button to save searches *}} + {{if $savedsearch}} + + {{/if}} + + {{* The select popup menu to select what kind of results the user would like to search for *}} + {{if $searchoption}} +
+
+ + +
+
+ {{/if}} + +
+
+
+ +
+ +
+ +
+
+