From: cajus Date: Wed, 5 Mar 2008 17:49:07 +0000 (+0000) Subject: Added lock and activate events X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9330898d1d2d978d964f73370f9720d5ac539544;p=gosa.git Added lock and activate events git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9373 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/goto/addons/goto/events/DaemonEvent_activate.tpl b/gosa-plugins/goto/addons/goto/events/DaemonEvent_activate.tpl new file mode 100644 index 000000000..4e3fc127d --- /dev/null +++ b/gosa-plugins/goto/addons/goto/events/DaemonEvent_activate.tpl @@ -0,0 +1,63 @@ + +{if $is_new} + + + + + + +
+ + + + + +
{t}Timestamp{/t}{$timestamp}
+
+ + + + +
+ {t}Target objects{/t} +
+ {$target_list} +
+
+ +{else} + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
{t}ID{/t}{$data.ID}
{t}Status{/t}{$data.STATUS}
{t}Result{/t}{$data.RESULT}
{t}Target{/t}{$data.MACADDRESS}
{t}Timestamp{/t}{$timestamp}
+
+ +
+
+ +{/if} diff --git a/gosa-plugins/goto/addons/goto/events/DaemonEvent_lock.tpl b/gosa-plugins/goto/addons/goto/events/DaemonEvent_lock.tpl new file mode 100644 index 000000000..4e3fc127d --- /dev/null +++ b/gosa-plugins/goto/addons/goto/events/DaemonEvent_lock.tpl @@ -0,0 +1,63 @@ + +{if $is_new} + + + + + + +
+ + + + + +
{t}Timestamp{/t}{$timestamp}
+
+ + + + +
+ {t}Target objects{/t} +
+ {$target_list} +
+
+ +{else} + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
{t}ID{/t}{$data.ID}
{t}Status{/t}{$data.STATUS}
{t}Result{/t}{$data.RESULT}
{t}Target{/t}{$data.MACADDRESS}
{t}Timestamp{/t}{$timestamp}
+
+ +
+
+ +{/if} diff --git a/gosa-plugins/goto/addons/goto/events/class_DaemonEvent_activate.inc b/gosa-plugins/goto/addons/goto/events/class_DaemonEvent_activate.inc new file mode 100644 index 000000000..7300c35ea --- /dev/null +++ b/gosa-plugins/goto/addons/goto/events/class_DaemonEvent_activate.inc @@ -0,0 +1,67 @@ +s_Menu_Name = _("Activate"); + $this->s_Event_Name = _("Activate"); + $this->s_Schedule_Action = "job_trigger_action_activate"; + $this->s_Trigger_Action= "gosa_trigger_action_activate"; + $this->s_Queued_Action= "trigger_action_reboot"; + $this->s_Menu_Image = "images/openlock.png"; + $this->s_List_Image = "images/openlock.png"; + } + + public function execute() + { + DaemonEvent::execute(); + + $display = $this->get_header(); + + $tmp = $this->data; + + /* Check if target add dialog is open */ + if($this->is_target_list_open() && $this->is_new){ + return($this->get_target_add_list()); + } + + $smarty = get_smarty(); + $smarty->assign("data" , $this->data); + $smarty->assign("target_list" , $this->get_target_list()); + $smarty->assign("is_new" , $this->is_new); + $smarty->assign("timestamp" , $this->get_time_select()); + $display.= $smarty->fetch(get_template_path('DaemonEvent_activate.tpl', TRUE, dirname(__FILE__))); + $display.= $this->get_footer(); + return($display); + } + + public function save_object() + { + DaemonEvent::save_object(); + } +} +// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: +?> diff --git a/gosa-plugins/goto/addons/goto/events/class_DaemonEvent_lock.inc b/gosa-plugins/goto/addons/goto/events/class_DaemonEvent_lock.inc new file mode 100644 index 000000000..63c52ea6a --- /dev/null +++ b/gosa-plugins/goto/addons/goto/events/class_DaemonEvent_lock.inc @@ -0,0 +1,67 @@ +s_Menu_Name = _("Lock"); + $this->s_Event_Name = _("Lock"); + $this->s_Schedule_Action = "job_trigger_action_lock"; + $this->s_Trigger_Action= "gosa_trigger_action_lock"; + $this->s_Queued_Action= "trigger_action_reboot"; + $this->s_Menu_Image = "images/closedlock.png"; + $this->s_List_Image = "images/closedlock.png"; + } + + public function execute() + { + DaemonEvent::execute(); + + $display = $this->get_header(); + + $tmp = $this->data; + + /* Check if target add dialog is open */ + if($this->is_target_list_open() && $this->is_new){ + return($this->get_target_add_list()); + } + + $smarty = get_smarty(); + $smarty->assign("data" , $this->data); + $smarty->assign("target_list" , $this->get_target_list()); + $smarty->assign("is_new" , $this->is_new); + $smarty->assign("timestamp" , $this->get_time_select()); + $display.= $smarty->fetch(get_template_path('DaemonEvent_lock.tpl', TRUE, dirname(__FILE__))); + $display.= $this->get_footer(); + return($display); + } + + public function save_object() + { + DaemonEvent::save_object(); + } +} +// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: +?>