diff options
author | Sem <sembrestels@riseup.net> | 2012-01-12 16:15:16 +0100 |
---|---|---|
committer | Sem <sembrestels@riseup.net> | 2012-01-12 16:15:16 +0100 |
commit | cc544cfa2086e418318a899ffd550adfb744c7ba (patch) | |
tree | 6c04fbe2e3df67513aa76803cb8d05c105ba219b /mod/groups/views/default | |
parent | e7d64510ebd823f186282e2b80780295bcca1b79 (diff) | |
parent | 68e4829ac0959d86c651e7ed6dc255c39694c8af (diff) | |
download | elgg-cc544cfa2086e418318a899ffd550adfb744c7ba.tar.gz elgg-cc544cfa2086e418318a899ffd550adfb744c7ba.tar.bz2 |
Merge Elgg 1.8.3.
Diffstat (limited to 'mod/groups/views/default')
-rw-r--r-- | mod/groups/views/default/forms/groups/find.php | 16 | ||||
-rw-r--r-- | mod/groups/views/default/forms/groups/search.php | 14 | ||||
-rw-r--r-- | mod/groups/views/default/groups/group_sort_menu.php | 10 | ||||
-rw-r--r-- | mod/groups/views/default/groups/js.php | 3 | ||||
-rw-r--r-- | mod/groups/views/default/groups/sidebar/find.php | 2 | ||||
-rw-r--r-- | mod/groups/views/default/groups/sidebar/search.php | 15 |
6 files changed, 48 insertions, 12 deletions
diff --git a/mod/groups/views/default/forms/groups/find.php b/mod/groups/views/default/forms/groups/find.php new file mode 100644 index 000000000..ddf639b74 --- /dev/null +++ b/mod/groups/views/default/forms/groups/find.php @@ -0,0 +1,16 @@ +<?php +/** + * Group tag-based search form body + */ + +$tag_string = elgg_echo('groups:search:tags'); + +$params = array( + 'name' => 'tag', + 'class' => 'elgg-input-search mbm', + 'value' => $tag_string, + 'onclick' => "if (this.value=='$tag_string') { this.value='' }", +); +echo elgg_view('input/text', $params); + +echo elgg_view('input/submit', array('value' => elgg_echo('search:go'))); diff --git a/mod/groups/views/default/forms/groups/search.php b/mod/groups/views/default/forms/groups/search.php index ddf639b74..850b6088e 100644 --- a/mod/groups/views/default/forms/groups/search.php +++ b/mod/groups/views/default/forms/groups/search.php @@ -1,16 +1,20 @@ <?php /** - * Group tag-based search form body + * Group search form + * + * @uses $vars['entity'] ElggGroup */ -$tag_string = elgg_echo('groups:search:tags'); - $params = array( - 'name' => 'tag', + 'name' => 'q', 'class' => 'elgg-input-search mbm', 'value' => $tag_string, - 'onclick' => "if (this.value=='$tag_string') { this.value='' }", ); echo elgg_view('input/text', $params); +echo elgg_view('input/hidden', array( + 'name' => 'container_guid', + 'value' => $vars['entity']->getGUID(), +)); + echo elgg_view('input/submit', array('value' => elgg_echo('search:go'))); diff --git a/mod/groups/views/default/groups/group_sort_menu.php b/mod/groups/views/default/groups/group_sort_menu.php index c53b49c8e..f5631a31f 100644 --- a/mod/groups/views/default/groups/group_sort_menu.php +++ b/mod/groups/views/default/groups/group_sort_menu.php @@ -2,6 +2,7 @@ /** * All groups listing page navigation * + * @uses $vars['selected'] Name of the tab that has been selected */ $tabs = array( @@ -22,14 +23,13 @@ $tabs = array( ), ); -// sets default selected item -if (strpos(full_url(), 'filter') === false) { - $tabs['newest']['selected'] = true; -} - foreach ($tabs as $name => $tab) { $tab['name'] = $name; + if ($vars['selected'] == $name) { + $tab['selected'] = true; + } + elgg_register_menu_item('filter', $tab); } diff --git a/mod/groups/views/default/groups/js.php b/mod/groups/views/default/groups/js.php index ad742445b..1b4d33f32 100644 --- a/mod/groups/views/default/groups/js.php +++ b/mod/groups/views/default/groups/js.php @@ -1,5 +1,6 @@ -$(function() { +// this adds a class to support IE8 and older +elgg.register_hook_handler('init', 'system', function() { // jQuery uses 0-based indexing $('#groups-tools').children('li:even').addClass('odd'); }); diff --git a/mod/groups/views/default/groups/sidebar/find.php b/mod/groups/views/default/groups/sidebar/find.php index c5c986759..c1a8da3c2 100644 --- a/mod/groups/views/default/groups/sidebar/find.php +++ b/mod/groups/views/default/groups/sidebar/find.php @@ -5,7 +5,7 @@ * @package ElggGroups */ $url = elgg_get_site_url() . 'groups/search'; -$body = elgg_view_form('groups/search', array( +$body = elgg_view_form('groups/find', array( 'action' => $url, 'method' => 'get', 'disable_security' => true, diff --git a/mod/groups/views/default/groups/sidebar/search.php b/mod/groups/views/default/groups/sidebar/search.php new file mode 100644 index 000000000..226835715 --- /dev/null +++ b/mod/groups/views/default/groups/sidebar/search.php @@ -0,0 +1,15 @@ +<?php +/** + * Search for content in this group + * + * @uses vars['entity'] ElggGroup + */ + +$url = elgg_get_site_url() . 'search'; +$body = elgg_view_form('groups/search', array( + 'action' => $url, + 'method' => 'get', + 'disable_security' => true, +), $vars); + +echo elgg_view_module('aside', elgg_echo('groups:search_in_group'), $body);
\ No newline at end of file |