public function pathdetails($parameters = array())
 {
     $view = new ui($this);
     $flash = new popupController();
     $model = new dirstatusModel();
     $current = $model->getfromId($parameters['id']);
     if (count($current) == 1) {
         $current = $current[0];
         $view->assign('current', $current);
         $closerequest = new ajaxrequest('mygrid', 'closeextra', array('id' => 'gridextra_' . $parameters['-gridid-']));
         $view->assign('closerequest', $closerequest);
         $history = new mygrid('directorywatcher_' . $current->getId());
         $history->setModel(new dirstatusModel());
         $history->setDefaultconditions(array('path' => array('mode' => '=', 'value' => $current->getPath())));
         $history->setDefaultorder(array('fields' => array('reporttime'), 'type' => 'DESC'));
         $view->assign('history', $history);
         $testmodel = new directorywatchertresholdModel();
         $treshold = new mygrid('treshold_' . $current->getId());
         $treshold->setModel($testmodel);
         $currentresholds = $testmodel->getfromPath($current->getPath());
         if (count($currentresholds) == 0) {
             $treshold->registerAddrequest('directorywatcher', 'addTreshold', array('title' => 'Treshold toevoegen', 'currentid' => $current->getId()));
             $parent = $current->getParent();
             $parenttresholds = array();
             if ($parent != '') {
                 $parentobj = $model->getfromPath($parent);
                 $parentobj = $parentobj[0];
                 $parenttresholds = $testmodel->getfromPath($parent);
                 while (count($parenttresholds) == 0 && $parent != '') {
                     $parent = $parentobj->getParent();
                     $parentobj = $model->getfromPath($parent);
                     $parentobj = $parentobj[0];
                     $parenttresholds = $testmodel->getfromPath($parent);
                 }
             }
             if (count($parenttresholds) == 0 && $parent == '') {
                 $parent = '_default_';
                 $parenttresholds = $testmodel->getfromPath($parent);
             }
             $treshold->setDefaultconditions(array('path' => array('mode' => '=', 'value' => $parent)));
             $treshold->unregisterRequest('-edit-');
             $treshold->unregisterRequest('-delete-');
         } else {
             $treshold->setDefaultconditions(array('path' => array('mode' => '=', 'value' => $current->getPath())));
             $treshold->unregisterRequest('-add-');
             $treshold->registerEditrequest('directorywatcher', 'editTreshold', array('title' => 'Treshold aanpassen', 'id' => '{id}'));
             $treshold->registerDeleterequest('directorywatcher', 'deleteTreshold', array('title' => 'Treshold verwijderen', 'id' => '{id}', 'currentid' => $current->getId()));
         }
         $view->assign('tresholdgrid', $treshold);
         $this->response->assign('gridextra_' . $parameters['-gridid-'], 'innerHTML', $view->fetch('directorywatcher_pathdetails.tpl'));
         $this->response->script('var myFx = new Fx.Scroll(window).toElement(\'gridextra_' . $parameters['-gridid-'] . '\')');
     } else {
         $flash->createflash(array('name' => 'err', 'type' => 'error', 'content' => 'Dit path werd niet gevonden.'));
         return false;
     }
 }