From 710b17aa37dd5c90db695219defdfef7a889f29a Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Wed, 14 Sep 2011 21:09:48 -0400 Subject: Fixes #3681 fixed Utilities menu collisions in admin section and added documentation about registering more than one menu item with the same name to a menu --- .../admin/administer_utilities/logbrowser.php | 63 ++++++++++++++++++++++ .../views/default/admin/utilities/logbrowser.php | 63 ---------------------- 2 files changed, 63 insertions(+), 63 deletions(-) create mode 100644 mod/logbrowser/views/default/admin/administer_utilities/logbrowser.php delete mode 100644 mod/logbrowser/views/default/admin/utilities/logbrowser.php (limited to 'mod/logbrowser/views/default/admin') diff --git a/mod/logbrowser/views/default/admin/administer_utilities/logbrowser.php b/mod/logbrowser/views/default/admin/administer_utilities/logbrowser.php new file mode 100644 index 000000000..dadc6cda3 --- /dev/null +++ b/mod/logbrowser/views/default/admin/administer_utilities/logbrowser.php @@ -0,0 +1,63 @@ +guid; + } +} else { + $user_guid = get_input('user_guid',0); + if ($user_guid) { + $user = (int) $user_guid; + } else { + $user = ""; + } +} + +$timelower = get_input('timelower'); +if ($timelower) { + $timelower = strtotime($timelower); +} + +$timeupper = get_input('timeupper'); +if ($timeupper) { + $timeupper = strtotime($timeupper); +} + +$form = elgg_view('logbrowser/form', array( + 'user_guid' => $user, + 'timeupper' => $timeupper, + 'timelower' => $timelower, +)); + +// Get log entries +$log = get_system_log($user, "", "", "","", $limit, $offset, false, $timeupper, $timelower); +$count = get_system_log($user, "", "", "","", $limit, $offset, true, $timeupper, $timelower); + +$table = elgg_view('logbrowser/table', array('log_entries' => $log)); + +$nav = elgg_view('navigation/pagination',array( + 'offset' => $offset, + 'count' => $count, + 'limit' => $limit, +)); + +// display admin body +$body = <<<__HTML +$form +$nav +$table +$nav +__HTML; + +echo $body; diff --git a/mod/logbrowser/views/default/admin/utilities/logbrowser.php b/mod/logbrowser/views/default/admin/utilities/logbrowser.php deleted file mode 100644 index dadc6cda3..000000000 --- a/mod/logbrowser/views/default/admin/utilities/logbrowser.php +++ /dev/null @@ -1,63 +0,0 @@ -guid; - } -} else { - $user_guid = get_input('user_guid',0); - if ($user_guid) { - $user = (int) $user_guid; - } else { - $user = ""; - } -} - -$timelower = get_input('timelower'); -if ($timelower) { - $timelower = strtotime($timelower); -} - -$timeupper = get_input('timeupper'); -if ($timeupper) { - $timeupper = strtotime($timeupper); -} - -$form = elgg_view('logbrowser/form', array( - 'user_guid' => $user, - 'timeupper' => $timeupper, - 'timelower' => $timelower, -)); - -// Get log entries -$log = get_system_log($user, "", "", "","", $limit, $offset, false, $timeupper, $timelower); -$count = get_system_log($user, "", "", "","", $limit, $offset, true, $timeupper, $timelower); - -$table = elgg_view('logbrowser/table', array('log_entries' => $log)); - -$nav = elgg_view('navigation/pagination',array( - 'offset' => $offset, - 'count' => $count, - 'limit' => $limit, -)); - -// display admin body -$body = <<<__HTML -$form -$nav -$table -$nav -__HTML; - -echo $body; -- cgit v1.2.3 From 094267042bd67cc992d19bdeed7b64a27b409376 Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 24 Sep 2011 16:38:49 -0400 Subject: Fixes #3865 updated logbrowser refine form --- .../admin/administer_utilities/logbrowser.php | 4 +- mod/logbrowser/views/default/logbrowser/form.php | 76 ---------------------- mod/logbrowser/views/default/logbrowser/refine.php | 35 ++++++++++ 3 files changed, 37 insertions(+), 78 deletions(-) delete mode 100644 mod/logbrowser/views/default/logbrowser/form.php create mode 100644 mod/logbrowser/views/default/logbrowser/refine.php (limited to 'mod/logbrowser/views/default/admin') 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 @@ - - -
-username; - } else { - $userval = ""; - } - - - $form = "

" . elgg_echo('logbrowser:user'); - $form .= elgg_view('input/text', array( - 'name' => 'search_username', - 'value' => $userval, - )) . "

"; - - $form .= "

" . elgg_echo('logbrowser:starttime'); - $form .= elgg_view('input/text', array( - 'name' => 'timelower', - 'value' => $lowerval, - )) . "

"; - - $form .= "

" . elgg_echo('logbrowser:endtime'); - $form .= elgg_view('input/text', array( - 'name' => 'timeupper', - 'value' => $upperval, - )) . "

"; - $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', - )); -?> -

- -

- -
\ 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 @@ + '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', +)); + +?> + +
+
+ +
+ +
\ No newline at end of file -- cgit v1.2.3