diff options
author | Robin Millette <millette@controlyourself.ca> | 2009-04-07 03:26:33 +0000 |
---|---|---|
committer | Robin Millette <millette@controlyourself.ca> | 2009-04-07 03:26:33 +0000 |
commit | 17fb51f747c023392cd6127abe9b019e693f0544 (patch) | |
tree | 2e6afaeba787d0962b68d124db32abd12b2bed66 /actions/groupsearch.php | |
parent | 9ad8307b7ee60b3263733b8b8c3d7ac6f350a452 (diff) |
added filler text to notice and group search, suggesting other search options.
Diffstat (limited to 'actions/groupsearch.php')
-rw-r--r-- | actions/groupsearch.php | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/actions/groupsearch.php b/actions/groupsearch.php index 109a53ce1..31c4ffd94 100644 --- a/actions/groupsearch.php +++ b/actions/groupsearch.php @@ -72,12 +72,23 @@ class GroupsearchAction extends SearchAction $terms = preg_split('/[\s,]+/', $q); $results = new GroupSearchResults($user_group, $terms, $this); $results->show(); + $user_group->free(); + $this->pagination($page > 1, $cnt > GROUPS_PER_PAGE, + $page, 'groupsearch', array('q' => $q)); } else { - $this->element('p', 'error', _('No results')); + $this->element('p', 'error', _('No results.')); + $this->searchSuggestions($q); + if (common_logged_in()) { + $message = _('If you can\'t find the group you\'re looking for, you can [create it](%%action.newgroup%%) yourself.'); + } + else { + $message = _('Why not [register an account](%%action.register%%) and [create the group](%%action.newgroup%%) yourself!'); + } + $this->elementStart('div', 'blankfiller'); + $this->raw(common_markup_to_html($message)); + $this->elementEnd('div'); + $user_group->free(); } - $user_group->free(); - $this->pagination($page > 1, $cnt > GROUPS_PER_PAGE, - $page, 'groupsearch', array('q' => $q)); } } @@ -98,10 +109,5 @@ class GroupSearchResults extends GroupList { return preg_replace($this->pattern, '<strong>\\1</strong>', htmlspecialchars($text)); } - - function isReadOnly() - { - return true; - } } |