Commit 6e907409 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Put shared pages search options into an advanced section (bug #857793)



On Shared Pages, most people will only want to type in a search term.
The new options won't be used often, and clutter up the top of the
page, so they are moved into an 'advanced options' section, hidden by
default on the first page load.

Some additional css is also added here so that the search button
appears alongside the query box, and the options line up in the
advanced section.

Change-Id: I0c5ac8debc7e687ab558fab71596389b5f9bda55
Signed-off-by: default avatarRichard Mansfield <richard.mansfield@catalyst.net.nz>
parent 28a72736
......@@ -2586,8 +2586,29 @@ img.feedicon {
line-height: 2em;
}
/******* Shared Pages **********/
#search #search_query_container #search_query {
margin-right: 3px;
form.search input#search_search {
margin: 0 0 3px;
}
form.search .advanced {
margin: .5em 0 0;
}
form.search .advanced label {
display: block;
clear: left;
width: 9em;
float: left;
padding: 3px;
margin: 3px 0;
font-size: 1em;
}
form.search .advanced select {
width: 20em;
}
form.search .advanced .checkboxes a {
display: block;
float: left;
padding: 3px;
margin: 3px 0;
}
.sharedpages h3 {
margin: 0;
......
......@@ -95,33 +95,46 @@ foreach ($shareoptions as $k => &$v) {
$searchform = pieform(array(
'name' => 'search',
'dieaftersubmit' => false,
'renderer' => 'div',
'class' => 'search',
'elements' => array(
'query' => array(
'type' => 'text',
'title' => get_string('Query') . ': ',
'class' => 'inline',
'defaultvalue' => $searchdefault,
),
'type' => array(
'type' => 'select',
'title' => get_string('searchwithin') . ': ',
'options' => $searchoptions,
'defaultvalue' => $searchtype,
),
'sort' => array(
'type' => 'select',
'title' => get_string('sortresultsby') . ' ',
'options' => $sortoptions,
'defaultvalue' => $sort,
),
'share' => array(
'type' => 'checkboxes',
'title' => get_string('sharedwith', 'view') . ': ',
'elements' => $shareoptions,
'labelwidth' => 0,
),
'search' => array(
'type' => 'submit',
'value' => get_string('search')
'type' => 'submit',
'class' => 'inline',
'value' => get_string('search')
),
'advanced' => array(
'type' => 'fieldset',
'legend' => get_string('moreoptions', 'view'),
'class' => 'advanced',
'collapsible' => true,
'collapsed' => true,
'elements' => array(
'type' => array(
'type' => 'select',
'title' => get_string('searchwithin') . ': ',
'options' => $searchoptions,
'defaultvalue' => $searchtype,
),
'sort' => array(
'type' => 'select',
'title' => get_string('sortresultsby') . ' ',
'options' => $sortoptions,
'defaultvalue' => $sort,
),
'share' => array(
'type' => 'checkboxes',
'title' => get_string('sharedwith', 'view') . ': ',
'elements' => $shareoptions,
'labelwidth' => 0,
),
),
),
)
));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment