Skip to content
Snippets Groups Projects
Select Git revision
  • a34f89efb147f21da0537a101563663c5a5d4e5a
  • master default
  • devel
3 results

action.editGroups.php

Blame
  • action.editGroups.php 1.27 KiB
    <?php
    if (!isset($gCms)) exit;
    //echo '<pre>'; print_r($params); echo '</pre>';
    //require_once 'lib/class.Group.php';
    $canChangeRecord = $this->CheckPermission('Use ReglerAddress');
    
    /* if (! $this->CheckPermission('Use ReglerAddress')) { */
    /*   return $this->DisplayErrorPage($id, $params, $returnid, */
    /* 				 'ReglerAddress access denied.'); */
    /* } */
    
    $smarty = $this->smarty;
    $smarty->assign('headline','Grupphantering');
    
    $place = $this->CreateFormStart($id, 'add_edit_Group', $returnid);
    $smarty->assign('start_form', $place);
    $smarty->assign('end_form', $this->CreateFormEnd());
    
    $groups = Groups::GetGroupList();
    foreach ($groups as $group) {
      if ($canChangeRecord) {
        $group->change =  $this->CreateInputSubmit($id, 'change_'.$group->ID,
    					       'Ändra');
      } else {
        $group->change = '';
      }
      $group->print = $this->CreateInputSubmit($id, 'print_'.$group->ID, 'Skriv ut');
    }
    $place = $this->CreateInputSubmit($id, 'back', 'Tillbaka');
    $smarty->assign('backButton',$place);
    
    if ($canChangeRecord) {
      $place = $this->CreateInputSubmit($id, 'new', 'Lägg till grupp');
    } else {
      $place = '';
    }
    $smarty->assign('newButton',$place);
    
    $smarty->assign('Groups',$groups);
    //echo '<pre>'; print_r($groups); echo '</pre>';
    echo $this->ProcessTemplate('groupEditPanel.tpl');  
      
    
    
    
    
    ?>