Skip to content
Snippets Groups Projects
Select Git revision
  • a199ba73fefdab1f15d317829a4e8bf06db8fb44
  • master default protected
  • Legacy_Php7
3 results

projectlist.class.php

Blame
  • projectlist.class.php 16.15 KiB
    <?php
    
    /* ######################################################################
    
      IML DEPLOYMENT
    
      class projectlist to render overview page
    
      ---------------------------------------------------------------------
      2013-11-08  Axel <axel.hahn@iml.unibe.ch>
      ###################################################################### */
    
    require_once 'base.class.php';
    require_once 'project.class.php';
    
    /**
     * class for project overview
     */
    class projectlist extends base{
        // ----------------------------------------------------------------------
        // CONFIG
        // ----------------------------------------------------------------------    
        // ----------------------------------------------------------------------
        // constructor
        // ----------------------------------------------------------------------
    
        /**
         * constructor2 called from constructor of base class
         */
        public function _construct2() {
            // define 
        }
    
        // ----------------------------------------------------------------------
        // private functions
        // ----------------------------------------------------------------------
        // ----------------------------------------------------------------------
        // GETTER
        // ----------------------------------------------------------------------
        // ----------------------------------------------------------------------
        // SETTER
        // ----------------------------------------------------------------------
        // ----------------------------------------------------------------------
        // ACTIONS
        // ----------------------------------------------------------------------
    
        /**
         * render html for overview table
         * @return string
         */
        public function renderOverview() {
            
            if (!$this->oUser->hasRole("viewProjectOverview")){
                return $this->oUser->showDenied();
            }
            $sOut = '';  // table
            $sOut2 = ''; // tiles
            $oPrj = false;
            $sTrClass = "trproject";
            $sColClass = "tdphase";
    
            $oPrj1 = new project();
    
            $sPrjFilter = '';
            $sPhaseFilter = '';
            $sPrjFilter.='<option value="' . $sTrClass . '">' . t("all") . '</option>';
            $sPhaseFilter.='<option value="' . $sColClass . '">' . t("all") . '</option>';
            // foreach (array_keys($this->_aPhases) as $sPhase) {
            foreach (array_keys($oPrj1->getPhases()) as $sPhase) {
                $sPhaseFilter.='<option value="' . $sPhase . '" >' . $sPhase . '</option>';