From: hickert Date: Tue, 1 Jul 2008 06:14:09 +0000 (+0000) Subject: Partly implemented ticket #493 - Add event to trigger goto_reload X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=958d7bcb23d2bb35844dc70d1425f9e448d3e311;p=gosa.git Partly implemented ticket #493 - Add event to trigger goto_reload git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11486 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/goto/addons/goto/events/DaemonEvent_goto_reload.tpl b/gosa-plugins/goto/addons/goto/events/DaemonEvent_goto_reload.tpl new file mode 100644 index 000000000..d8db5666c --- /dev/null +++ b/gosa-plugins/goto/addons/goto/events/DaemonEvent_goto_reload.tpl @@ -0,0 +1,63 @@ + +{if $is_new} + + + + + + +
+ + + + +
{t}Time schedule{/t}

+ {$timestamp}
+
+ + + + +
+ {t}System list{/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_goto_reload.inc b/gosa-plugins/goto/addons/goto/events/class_DaemonEvent_goto_reload.inc new file mode 100644 index 000000000..00e431dc1 --- /dev/null +++ b/gosa-plugins/goto/addons/goto/events/class_DaemonEvent_goto_reload.inc @@ -0,0 +1,67 @@ +s_Menu_Name = _("Goto reload"); + $this->s_Event_Name = _("Reload goto settings"); + $this->s_Schedule_Action= "job_trigger_goto_settings_reload"; + $this->s_Trigger_Action = "gosa_trigger_goto_settings_reload"; + $this->s_Queued_Action = "trigger_action_wake"; + $this->s_Menu_Image = "images/lists/reload.png"; + $this->s_List_Image = "images/lists/reload.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_goto_reload.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: +?>