diff options
author | cash <cash.costello@gmail.com> | 2011-09-24 16:38:49 -0400 |
---|---|---|
committer | cash <cash.costello@gmail.com> | 2011-09-24 16:38:49 -0400 |
commit | 094267042bd67cc992d19bdeed7b64a27b409376 (patch) | |
tree | 12092c7308b44ec4cab392fd71506075dce19a88 /mod/logbrowser/views | |
parent | 1f3dfe5d7a04a25e4b6d2bdcad271c52c37a9c20 (diff) | |
download | elgg-094267042bd67cc992d19bdeed7b64a27b409376.tar.gz elgg-094267042bd67cc992d19bdeed7b64a27b409376.tar.bz2 |
Fixes #3865 updated logbrowser refine form
Diffstat (limited to 'mod/logbrowser/views')
3 files changed, 37 insertions, 78 deletions
diff --git a/mod/logbrowser/views/default/admin/administer_utilities/logbrowser.php b/mod/logbrowser/views/default/admin/administer_utilities/logbrowser.php index dadc6cda3..2be1f33dc 100644 --- a/mod/logbrowser/views/default/admin/administer_utilities/logbrowser.php +++ b/mod/logbrowser/views/default/admin/administer_utilities/logbrowser.php @@ -34,7 +34,7 @@ if ($timeupper) { $timeupper = strtotime($timeupper); } -$form = elgg_view('logbrowser/form', array( +$refine = elgg_view('logbrowser/refine', array( 'user_guid' => $user, 'timeupper' => $timeupper, 'timelower' => $timelower, @@ -54,7 +54,7 @@ $nav = elgg_view('navigation/pagination',array( // display admin body $body = <<<__HTML -$form +$refine $nav $table $nav diff --git a/mod/logbrowser/views/default/logbrowser/form.php b/mod/logbrowser/views/default/logbrowser/form.php deleted file mode 100644 index 2cb746eac..000000000 --- a/mod/logbrowser/views/default/logbrowser/form.php +++ /dev/null @@ -1,76 +0,0 @@ -<?php -/** - * Log browser search form - * - * @package ElggLogBrowser - */ -?> - -<div id="logbrowser-search-area"> -<?php - - if ($vars['timelower']) { - $lowerval = date('r',$vars['timelower']); - } else { - $lowerval = ""; - } - if ($vars['timeupper']) { - $upperval = date('r',$vars['timeupper']); - } else { - $upperval = ""; - } - if ($vars['user_guid']) { - if ($user = get_entity($vars['user_guid'])) - $userval = $user->username; - } else { - $userval = ""; - } - - - $form = "<p>" . elgg_echo('logbrowser:user'); - $form .= elgg_view('input/text', array( - 'name' => 'search_username', - 'value' => $userval, - )) . "</p>"; - - $form .= "<p>" . elgg_echo('logbrowser:starttime'); - $form .= elgg_view('input/text', array( - 'name' => 'timelower', - 'value' => $lowerval, - )) . "</p>"; - - $form .= "<p>" . elgg_echo('logbrowser:endtime'); - $form .= elgg_view('input/text', array( - 'name' => 'timeupper', - 'value' => $upperval, - )) . "</p>"; - $form .= elgg_view('input/submit', array( - 'value' => elgg_echo('search'), - )); - - //@todo Forms 1.8: Convert to use elgg_view_form() - $wrappedform = elgg_view('input/form', array( - 'body' => $form, - 'method' => 'get', - 'action' => "admin/utilities/logbrowser", - 'disable_security' => true, - )); - - $toggle_link = elgg_view('output/url', array( - 'href' => '#log-browser-search-form', - 'text' => elgg_echo('logbrowser:search'), - 'rel' => 'toggle', - )); -?> - <p> - <?php echo $toggle_link; ?> - </p> - <div id="log-browser-search-form" class="elgg-module elgg-module-inline hidden"> - <div class="elgg-head"> - <h3><?php echo elgg_echo('logbrowser:search'); ?></h3> - </div> - <div class="elgg-body"> - <?php echo $wrappedform; ?> - </div> - </div> -</div>
\ No newline at end of file diff --git a/mod/logbrowser/views/default/logbrowser/refine.php b/mod/logbrowser/views/default/logbrowser/refine.php new file mode 100644 index 000000000..27cb6042f --- /dev/null +++ b/mod/logbrowser/views/default/logbrowser/refine.php @@ -0,0 +1,35 @@ +<?php +/** + * Log browser search form + * + * @package ElggLogBrowser + */ + +$form_vars = array( + 'method' => 'get', + 'action' => 'admin/administer_utilities/logbrowser', + 'disable_security' => true, +); +$form = elgg_view_form('logbrowser/refine', $form_vars, $vars); + +$toggle_link = elgg_view('output/url', array( + 'href' => '#log-browser-search-form', + 'text' => elgg_echo('logbrowser:search'), + 'rel' => 'toggle', +)); + +?> + +<div id="logbrowser-search-area" class="mbm"> + <div> + <?php echo $toggle_link; ?> + </div> + <div id="log-browser-search-form" class="elgg-module elgg-module-inline hidden"> + <div class="elgg-head"> + <h3><?php echo elgg_echo('logbrowser:search'); ?></h3> + </div> + <div class="elgg-body"> + <?php echo $form; ?> + </div> + </div> +</div>
\ No newline at end of file |