aboutsummaryrefslogtreecommitdiff
path: root/mod/logbrowser/views/default
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2011-11-18 07:32:27 +0100
committerSem <sembrestels@riseup.net>2011-11-18 07:32:27 +0100
commite53d410129701ea1c9d19529afa493f11b5f5b70 (patch)
treed9963b24bf8932654b4a47e36602c75975e50dba /mod/logbrowser/views/default
parent377da25d2965c64941f83baae119fc970ec60982 (diff)
parent08a962c98e2923724f8013d6eaae89101243752a (diff)
downloadelgg-e53d410129701ea1c9d19529afa493f11b5f5b70.tar.gz
elgg-e53d410129701ea1c9d19529afa493f11b5f5b70.tar.bz2
Merge github.com:Elgg/Elgg
Conflicts: engine/lib/input.php
Diffstat (limited to 'mod/logbrowser/views/default')
-rw-r--r--mod/logbrowser/views/default/admin/administer_utilities/logbrowser.php (renamed from mod/logbrowser/views/default/admin/utilities/logbrowser.php)4
-rw-r--r--mod/logbrowser/views/default/forms/logbrowser/refine.php53
-rw-r--r--mod/logbrowser/views/default/logbrowser/form.php76
-rw-r--r--mod/logbrowser/views/default/logbrowser/refine.php35
-rw-r--r--mod/logbrowser/views/default/logbrowser/table.php9
5 files changed, 96 insertions, 81 deletions
diff --git a/mod/logbrowser/views/default/admin/utilities/logbrowser.php b/mod/logbrowser/views/default/admin/administer_utilities/logbrowser.php
index dadc6cda3..2be1f33dc 100644
--- a/mod/logbrowser/views/default/admin/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/forms/logbrowser/refine.php b/mod/logbrowser/views/default/forms/logbrowser/refine.php
new file mode 100644
index 000000000..ff3f48b03
--- /dev/null
+++ b/mod/logbrowser/views/default/forms/logbrowser/refine.php
@@ -0,0 +1,53 @@
+<?php
+/**
+ * Form body for refining the log browser search.
+ * Look for a particular person or in a time window.
+ *
+ * @uses $vars['user_guid']
+ * @uses $vars['timelower']
+ * @uses $vars['timeupper']
+ */
+
+if (isset($vars['timelower'])) {
+ $lowerval = date('r',$vars['timelower']);
+} else {
+ $lowerval = "";
+}
+if (isset($vars['timeupper'])) {
+ $upperval = date('r',$vars['timeupper']);
+} else {
+ $upperval = "";
+}
+if (isset($vars['user_guid'])) {
+ if ($user = get_entity($vars['user_guid'])) {
+ $userval = $user->username;
+ }
+} else {
+ $userval = "";
+}
+
+
+$form = "<div>" . elgg_echo('logbrowser:user');
+$form .= elgg_view('input/text', array(
+ 'name' => 'search_username',
+ 'value' => $userval,
+)) . "</div>";
+
+$form .= "<div>" . elgg_echo('logbrowser:starttime');
+$form .= elgg_view('input/text', array(
+ 'name' => 'timelower',
+ 'value' => $lowerval,
+)) . "</div>";
+
+$form .= "<div>" . elgg_echo('logbrowser:endtime');
+$form .= elgg_view('input/text', array(
+ 'name' => 'timeupper',
+ 'value' => $upperval,
+)) . "</div>";
+$form .= '<div class="elgg-foot">';
+$form .= elgg_view('input/submit', array(
+ 'value' => elgg_echo('search'),
+));
+$form .= '</div>';
+
+echo $form;
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
diff --git a/mod/logbrowser/views/default/logbrowser/table.php b/mod/logbrowser/views/default/logbrowser/table.php
index 86c8a1423..b7f6a1f20 100644
--- a/mod/logbrowser/views/default/logbrowser/table.php
+++ b/mod/logbrowser/views/default/logbrowser/table.php
@@ -24,11 +24,13 @@ $log_entries = $vars['log_entries'];
if ($user) {
$user_link = elgg_view('output/url', array(
'href' => $user->getURL(),
- 'text' => $user->name
+ 'text' => $user->name,
+ 'is_trusted' => true,
));
$user_guid_link = elgg_view('output/url', array(
'href' => "admin/overview/logbrowser?user_guid=$user->guid",
- 'text' => $user->getGUID()
+ 'text' => $user->getGUID(),
+ 'is_trusted' => true,
));
} else {
$user_guid_link = $user_link = '&nbsp;';
@@ -38,7 +40,8 @@ $log_entries = $vars['log_entries'];
if (is_callable(array($object, 'getURL'))) {
$object_link = elgg_view('output/url', array(
'href' => $object->getURL(),
- 'text' => $entry->object_class
+ 'text' => $entry->object_class,
+ 'is_trusted' => true,
));
} else {
$object_link = $entry->object_class;