private function pager(\Request $request)
 {
     \Pager::prepare();
     $template = new \Template();
     $template->setModuleTemplate('pulse', 'pager.html');
     if (\Settings::get('pulse', 'allow_web_access')) {
         $template->add('button_class', 'btn-success');
         $template->add('button_status', 'Web Access Allowed');
         $template->add('button_icon', 'fa-check');
         $template->add('button_title', 'Pulse will process schedules via the web.');
     } else {
         $template->add('button_class', 'btn-danger');
         $template->add('button_status', 'Web Access Denied');
         $template->add('button_icon', 'fa-ban');
         $template->add('button_title', 'Pulse will not allow access via the web.');
     }
     return $template;
 }
Example #2
0
 /**
  * Handle the submit from the search form.
  * 
  * @param \Request $request
  * @return \Response
  */
 public function post(\Request $request)
 {
     $script = PHPWS_SOURCE_HTTP . 'mod/systemsinventory/javascript/sys_pager.js';
     $source_http = PHPWS_SOURCE_HTTP;
     \Layout::addJSHeader("<script type='text/javascript'>var source_http = '{$source_http}';</script>");
     \Layout::addLink("<script type='text/javascript' src='{$script}'></script>");
     $factory = new Factory();
     $search_vars = $request->getVars();
     $_SESSION['system_search_vars'] = $search_vars['vars'];
     \Pager::prepare();
     $template = new \Template();
     $template->setModuleTemplate('systemsinventory', 'search_results.html');
     $view = new \View\HtmlView($template->get());
     $response = new \Response($view);
     return $response;
 }
 public static function editDepartmentsView($data, $request)
 {
     $vars = array();
     $departments = SystemDevice::getSystemDepartments();
     $dep_options = '';
     $dep_options .= '<option value="1">NONE</option>';
     foreach ($departments as $val) {
         if ($val['id'] != 1) {
             $dep_options .= '<option value="' . $val['id'] . '">' . $val['display_name'] . '</option>';
         }
     }
     $vars['departments'] = $dep_options;
     $script = PHPWS_SOURCE_HTTP . 'mod/systemsinventory/javascript/edit_dept.js';
     \Layout::addLink("<script type='text/javascript' src='{$script}'></script>");
     $vars['add'] = '<a href="#" class="btn btn-md btn-success" data-toggle="modal" data-target="#edit-department-modal"><i class="fa fa-plus">&nbsp;</i>Add Department</a>';
     \Pager::prepare();
     $template = new \Template();
     $template = new \Template($vars);
     $template->setModuleTemplate('systemsinventory', 'Edit_Departments.html');
     return $template->get();
 }
Example #4
0
 public function purge()
 {
     javascript('jquery');
     $script = PHPWS_SOURCE_HTTP . 'mod/pagesmith/javascript/purge/script.js';
     \Pager::prepare();
     \Layout::addJSHeader("<script type='text/javascript' src='{$script}'><script>");
     $template = new \Template();
     $template->setModuleTemplate('pagesmith', 'purge.html');
     $this->ps->title = 'Purge deleted pages';
     $this->ps->content = $template->get();
 }