diff options
author | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-08-07 11:23:52 +0000 |
---|---|---|
committer | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-08-07 11:23:52 +0000 |
commit | 5028eba1c6087d32ff5db192f12581cfe60a5b87 (patch) | |
tree | 55f40226dea46ce9fa09d1343d0422776dd7cb32 /mod/logbrowser/views/default | |
parent | 0171329bbf3b881493b5e45b841781ab03442f94 (diff) | |
download | elgg-5028eba1c6087d32ff5db192f12581cfe60a5b87.tar.gz elgg-5028eba1c6087d32ff5db192f12581cfe60a5b87.tar.bz2 |
The log browser is now searchable.
git-svn-id: https://code.elgg.org/elgg/trunk@1747 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/logbrowser/views/default')
-rw-r--r-- | mod/logbrowser/views/default/logbrowser/css.php | 42 | ||||
-rw-r--r-- | mod/logbrowser/views/default/logbrowser/form.php | 66 | ||||
-rw-r--r-- | mod/logbrowser/views/default/object/logwrapper.php | 12 |
3 files changed, 114 insertions, 6 deletions
diff --git a/mod/logbrowser/views/default/logbrowser/css.php b/mod/logbrowser/views/default/logbrowser/css.php new file mode 100644 index 000000000..95dabb7d7 --- /dev/null +++ b/mod/logbrowser/views/default/logbrowser/css.php @@ -0,0 +1,42 @@ +<?php
+
+?>
+
+ #logbrowser_search_area {
+ margin: 3px;
+ }
+
+ #logbrowserSearchform {
+
+ padding: 10px;
+ background-color: #eee;
+
+ }
+
+ .log_entry {
+ margin: 3px;
+ width: 650px;
+ font-size: 80%;
+ }
+
+ .log_entry_user {
+ width: 120px;
+ background-color: #eee;
+ margin-left: 5px;
+ }
+
+ .log_entry_time {
+ width: 210px;
+ background-color: #eee;
+ }
+
+ .log_entry_item {
+ background-color: #eee;
+ margin-left: 5px;
+ }
+
+ .log_entry_action {
+ width: 75px;
+ background-color: #eee;
+ margin-left: 5px;
+ }
\ No newline at end of file diff --git a/mod/logbrowser/views/default/logbrowser/form.php b/mod/logbrowser/views/default/logbrowser/form.php new file mode 100644 index 000000000..2b0c78720 --- /dev/null +++ b/mod/logbrowser/views/default/logbrowser/form.php @@ -0,0 +1,66 @@ +
+<div id="logbrowser_search_area">
+<?php
+
+ // Time lower limit
+
+ 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 = "";
+
+ $form .= "<p>" . elgg_echo('logbrowser:user');
+ $form .= elgg_view('input/text',array(
+ 'internalname' => 'search_username',
+ 'value' => $userval
+ )) . "</p>";
+
+ $form .= "<p>" . elgg_echo('logbrowser:starttime');
+ $form .= elgg_view('input/text',array(
+ 'internalname' => 'timelower',
+ 'value' => $lowerval
+ )) . "</p>";
+
+ $form .= "<p>" . elgg_echo('logbrowser:endtime');
+ $form .= elgg_view('input/text',array(
+ 'internalname' => 'timeupper',
+ 'value' => $upperval
+ )) . "</p>";
+ $form .= elgg_view('input/submit',array(
+ 'value' => elgg_echo('search')
+ ));
+
+ $wrappedform = elgg_view('input/form',array(
+ 'body' => $form,
+ 'method' => 'get',
+ 'action' => $vars['url'] . "mod/logbrowser/"
+ ));
+
+ if ($upperval || $lowerval || $userval) {
+ $hidden = "";
+ } else {
+ $hidden = "style=\"display:none\"";
+ }
+
+?>
+
+ <div id="logbrowserSearchform" <?php echo $hidden; ?>><?php echo $wrappedform; ?></div>
+ <p>
+ <a href="#" onclick="$('#logbrowserSearchform').toggle()"><?php echo elgg_echo('logbrowser:search'); ?></a>
+ </p>
+ </div>
\ No newline at end of file diff --git a/mod/logbrowser/views/default/object/logwrapper.php b/mod/logbrowser/views/default/object/logwrapper.php index 8450c9b66..a46b166cd 100644 --- a/mod/logbrowser/views/default/object/logwrapper.php +++ b/mod/logbrowser/views/default/object/logwrapper.php @@ -21,17 +21,17 @@ ?>
<table class="log_entry">
<tr>
- <td class="log_entry_user">
- <?php if ($by) {echo "<a href=\"".$by->getURL()."\">{$by->name}</a>"; } else echo " "; ?>
- <td>
<td class="log_entry_time">
<?php echo date('r', $entry->time_created ); ?>
</td>
+ <td class="log_entry_user">
+ <?php if ($by) {echo "<a href=\"".$by->getURL()."\">{$by->name}</a>"; } else echo " "; ?>
+ <td>
<td class="log_entry_item">
<?php
- if ($obj_url) $info .= "<a href=\"$obj_url\">";
- $info .= "{$entry->object_class}";
- if ($obj_url) $info .= "</a>";
+ if ($obj_url) echo "<a href=\"$obj_url\">";
+ echo "{$entry->object_class}";
+ if ($obj_url) echo "</a>";
?>
</td>
<td class="log_entry_action">
|