Esempio n. 1
0
 /**
  * @see FWS_Module::init($doc)
  * 
  * @param TDL_Document $doc
  */
 public function init($doc)
 {
     parent::init($doc);
     $input = FWS_Props::get()->input();
     $functions = FWS_Props::get()->functions();
     $renderer = $doc->use_default_renderer();
     $locale = FWS_Props::get()->locale();
     $cfg = FWS_Props::get()->cfg();
     $renderer->add_action(TDL_ACTION_EDIT_ENTRY, 'edit');
     $renderer->add_action(TDL_ACTION_NEW_ENTRY, 'add');
     $mode = $input->correct_var(TDL_URL_MODE, 'get', FWS_Input::STRING, array('add', 'edit'), 'add');
     if ($mode == 'edit') {
         $id = $input->get_predef(TDL_URL_IDS, 'get');
         $murl = TDL_URL::get_entry_url();
         $murl->set(TDL_URL_ACTION, 'edit_entry');
         $murl->set(TDL_URL_MODE, 'edit');
         $murl->set(TDL_URL_IDS, $id);
         if (FWS_String::substr_count($id, ',') > 1) {
             $title = $locale->_('Edit entries');
         } else {
             $title = $locale->_('Edit entry');
         }
     } else {
         $murl = TDL_URL::get_mod_url();
         $murl->set(TDL_URL_MODE, 'add');
         $title = $locale->_('New entry');
     }
     $renderer->set_has_access($mode == 'edit' || $cfg['project_id'] != 0);
     $renderer->add_breadcrumb($title, $murl->to_url());
 }
Esempio n. 2
0
 /**
  * @see FWS_Module::init($doc)
  * 
  * @param TDL_Document $doc
  */
 public function init($doc)
 {
     parent::init($doc);
     $input = FWS_Props::get()->input();
     $renderer = $doc->use_default_renderer();
     $locale = FWS_Props::get()->locale();
     $renderer->add_action(TDL_ACTION_ADD_PROJECT, 'add_project');
     $renderer->add_action(TDL_ACTION_EDIT_PROJECT, 'edit_project');
     $renderer->add_action(TDL_ACTION_ADD_CATEGORY, 'add_category');
     $renderer->add_action(TDL_ACTION_DELETE_CATEGORY, 'delete_category');
     $renderer->add_action(TDL_ACTION_ADD_VERSION, 'add_version');
     $renderer->add_action(TDL_ACTION_DELETE_VERSION, 'delete_version');
     $mode = $input->correct_var(TDL_URL_MODE, 'get', FWS_Input::STRING, array('add', 'edit'), 'add');
     if ($mode == 'edit') {
         $id = (int) $input->get_var(TDL_URL_ID, 'get', FWS_Input::STRING);
         $murl = TDL_URL::get_mod_url();
         $murl->set(TDL_URL_MODE, 'edit');
         $murl->set(TDL_URL_ID, $id);
         $title = $locale->_('Edit project');
     } else {
         $murl = TDL_URL::get_mod_url();
         $murl->set(TDL_URL_MODE, 'add');
         $title = $locale->_('New project');
     }
     $renderer->add_breadcrumb('Projekte', TDL_URL::get_mod_url('view_projects')->to_url());
     $renderer->add_breadcrumb($title, $murl->to_url());
 }
Esempio n. 3
0
 /**
  * @see FWS_Module::init($doc)
  * 
  * @param TDL_Document $doc
  */
 public function init($doc)
 {
     parent::init($doc);
     $renderer = $doc->use_default_renderer();
     $renderer->set_show_header(false);
     $renderer->set_show_footer(false);
     $renderer->set_template('inc_delete_message.htm');
 }
Esempio n. 4
0
 /**
  * @see FWS_Module::init($doc)
  * 
  * @param TDL_Document $doc
  */
 public function init($doc)
 {
     parent::init($doc);
     $renderer = $doc->use_default_renderer();
     $locale = FWS_Props::get()->locale();
     $renderer->add_action(TDL_ACTION_DELETE_PROJECTS, 'delete');
     $renderer->add_breadcrumb($locale->_('Projects'), TDL_URL::get_mod_url()->to_url());
 }
Esempio n. 5
0
 /**
  * @see FWS_Module::init($doc)
  * 
  * @param TDL_Document $doc
  */
 public function init($doc)
 {
     parent::init($doc);
     $input = FWS_Props::get()->input();
     $renderer = $doc->use_default_renderer();
     $id = $input->get_predef(TDL_URL_ID, 'get');
     $renderer->add_breadcrumb('Eintrags Details', TDL_URL::get_mod_url()->set(TDL_URL_ID, $id)->to_url());
 }
Esempio n. 6
0
 /**
  * @see FWS_Module::init($doc)
  * 
  * @param TDL_Document $doc
  */
 public function init($doc)
 {
     parent::init($doc);
     $input = FWS_Props::get()->input();
     $renderer = $doc->use_default_renderer();
     $locale = FWS_Props::get()->locale();
     $renderer->add_action(TDL_ACTION_CHANGE_STATUS, 'default');
     $id_str = $input->get_predef(TDL_URL_IDS, 'get');
     $renderer->add_breadcrumb($locale->_('Change state'), TDL_URL::get_mod_url()->set(TDL_URL_IDS, $id_str)->to_url());
 }
Esempio n. 7
0
 /**
  * @see FWS_Module::init($doc)
  * 
  * @param TDL_Document $doc
  */
 public function init($doc)
 {
     parent::init($doc);
     $input = FWS_Props::get()->input();
     $renderer = $doc->use_default_renderer();
     $mode = $input->get_predef(TDL_URL_MODE, 'get');
     if ($mode == 'export') {
         $doc->use_raw_renderer();
     }
     $renderer->add_breadcrumb('Changelog', TDL_URL::build_mod_url('changelog'));
 }
Esempio n. 8
0
 /**
  * @see FWS_Module::init($doc)
  * 
  * @param TDL_Document $doc
  */
 public function init($doc)
 {
     parent::init($doc);
     $renderer = $doc->use_default_renderer();
     $renderer->add_action(TDL_ACTION_DELETE_ENTRIES, 'delete');
 }