summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9d02047)
raw | patch | inline | side by side (parent: 9d02047)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 7 May 2008 11:16:37 +0000 (11:16 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 7 May 2008 11:16:37 +0000 (11:16 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10815 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto/addons/goto/class_goto_log_view.inc | patch | blob | history | |
gosa-plugins/goto/addons/goto/log_view.tpl | patch | blob | history |
diff --git a/gosa-plugins/goto/addons/goto/class_goto_log_view.inc b/gosa-plugins/goto/addons/goto/class_goto_log_view.inc
index a75aba78cedb92d3f7ca412707ef00a0b6638795..82775d9299c67edbca6f9834a6f71cd05e3ca15b 100644 (file)
var $attributes = array("macAddress");
var $macAddress = "";
- var $sort_by = "file";
+ var $sort_by = "time";
var $sort_dir = 1; // 1 => up, 0 => down
var $ignore_account = TRUE;
+ var $standalone = FALSE;
function __construct(&$config,$dn,$parent)
{
*/
if(is_array($this->parent) && isset($this->parent['MACADDRESS'])){
$this->mac = $this->parent['MACADDRESS'];
+ $this->standalone = TRUE;
}elseif(isset($parent->attrs['macAddress'][0])){
$this->mac = $parent->attrs['macAddress'][0];
+ $this->standalone = FALSE;
}
/* Query for log files
$smarty->assign("selected_file",$this->selected_file);
$smarty->assign("selected_date",$this->selected_date);
$smarty->assign("log_file", $this->get_log($this->mac,$this->selected_date,$this->selected_file));
+ $smarty->assign("standalone",$this->standalone);
+
+ $date = date("d.m.Y H:i:s",$this->logs[$this->mac][$this->selected_date]['REAL_DATE']);
+ $file = $this->selected_file;
+ $smarty->assign("selected_log",$file.", ".$date);
$divlist = new divlist("log_view");
foreach($times as $time => $data){
$rtime = $data['REAL_DATE'];
foreach($data['FILES'] as $file){
+
+ $highlight = "";
+ if($file == $this->selected_file && $time == $this->selected_date && $mac == $this->mac){
+ $highlight = "background-color:#CCCCCC";
+ }
+
$use_link = preg_replace(array("/%mac%/","/%time%/","/%file%/"),array($mac,$time,$file),$link);
$to_add[$$sort_by.$file.$time] = array(
array("string" => preg_replace("/%str%/",$file,$use_link),
- "attach" => "style='width:200px;'"),
+ "attach" => "style='width:200px; $highlight'"),
array("string" => preg_replace("/%str%/",date("d.m.Y H:i:s",$rtime),$use_link),
- "attach" => "style='border-right:none;'"),
+ "attach" => "style='border-right:none; $highlight'"),
);
}
}
diff --git a/gosa-plugins/goto/addons/goto/log_view.tpl b/gosa-plugins/goto/addons/goto/log_view.tpl
index 5e0df9ddd38c8bdaa0a4ead4047b1bc0c9aa17a3..108ec9667f530bd43e1e4175dd22dc1decebbfbf 100644 (file)
<div style="width:99%;border: solid 1px #CCCCCC;">{$divlist}</div>
<br>
<p class="seperator"></p>
- <h2>{t}Selected log{/t}: {$selected_log} fabian, fill the selected log here: name, date</h2>
+ <h2>{t}Selected log{/t}: {$selected_log}</h2>
<div style="width:99%;height:350px;padding:3px;background-color:white; overflow-y: scroll;border: solid 1px;">
{$log_file}
</div>