summaryrefslogblamecommitdiffstats
path: root/application/modules/user/views/scripts/group/index.phtml
blob: 54beeb8d86a41573ae40ffa8dbc23d0cc3de2711 (plain) (tree)
1
2
3
4
5
6
7
8
9
                        
                                                                 
                                
                                      
                                                            
                                                                                                                            

                                                                                
              

                        


                                                       

      

                         
                              

                                                    




                                                         








                                                                         
          
                                     
                                                                













                                                                                              


                                                                          
                                                                      

                                                  



                                                                                                        


                                                                          
                                                                        

                                                  






                                                                                                            


                                                                          

                                                                               

                                                  



                                                                                                                                        






                                                                               



                                                                                                        






                                                                               


                                                                                                                                















                                                                                           
      
                                        
                                        
                                                                        
                                                                                                        

                                                                                   

      
<h1>Groups Overview</h1>
<?php if($this->notification != ''){echo $this->notification;} ?>
<?php echo $this->searchform; ?>
<?php if(Pbs_Acl::checkRight('gc')):?>
<?php echo $this->formButton('addgroup', 'Add Group', array(
							'onclick' => 'self.location="/user/group/add/page/'.$this->page.'"',
							'class' => 'addbutton'))
?>
<?php endif;?>

<div class='searchvars'>
	<div class='head'>Available searchfilter:</div>
	<div class='code'>title</div>
	<div class='code'>description</div>
</div>

<div class='listelement'>
<?php
if(count($this->groupList)==0)
echo "There are no groups" ?>
<?php foreach ($this->groupList as $k => $group): ?>
<?php
$class='';
if($group->getID() == $this->userIDsNamespace['groupID'])
$class= 'highlight checked';
?>
	<div class='element<?php echo " $class";?>'>
	<?php if($group->getID() != $this->userIDsNamespace['groupID']) {
		?>
		<div class='number'>
			<div class='smallnumber'>Group</div>
			<?php echo $k+1; ?>
		</div>
		<?php
	}
	?>
		<div class='content'>
			<div class='actions'>			
			<?php if($group->getID() == $this->userIDsNamespace['groupID'] ): ?>
				<?php if(Pbs_Acl::checkRight('gsdo') ): ?>
					<a href="<?php echo $this->url(
						array(
							'module'	=> 'user',
							'controller' => 'group',
							'action'     => 'show'
						),
						'default',
						true);?>">
					<img src='/media/img/show.png' alt='Show Group' /></a>
				<?php endif; ?>
				<?php if(Pbs_Acl::checkRight('geo')): ?>
				<a href="<?php echo $this->url(
					array(
						'module'	=> 'user',
						'controller' => 'group',
						'action'     => 'edit'
					),
					'default',
					true);?>"><img src='/media/img/edit.png' alt='Edit Group' /></a>
				<?php endif; ?>
				<?php if(Pbs_Acl::checkRight('gd')): ?>
				<a href="<?php echo $this->url(
					array(
						'module'	=> 'user',
						'controller' => 'group',
						'action'     => 'delete'
					),
					'default',
					true);?>"><img src='/media/img/delete.png' alt='Delete Group' /></a>
				<?php endif; ?>
				
			<?php endif; ?>
			<?php if($group->getID() != $this->userIDsNamespace['groupID']) : ?>
				<?php if(Pbs_Acl::checkRight('gsdog') ): ?>
					<a href="<?php echo $this->url(
					array(
						'module'	=> 'user',
						'controller' => 'group',
						'action'     => 'show',
						'groupID'   =>  $group->getID()
					),
					'default',
					true); ?>"><img src='/media/img/show.png' alt='Show Group' /></a>				
				<?php endif; ?>
				<?php if(Pbs_Acl::checkRight('ge')): ?>
				<a href="<?php echo $this->url(
					array(
						'module'	=> 'user',
						'controller' => 'group',
						'action'     => 'edit',
						'groupID'   =>  $group->getID()
					),
					'default',
					true);?>"><img src='/media/img/edit.png' alt='Edit Group' /></a>
				<?php endif; ?>
				<?php if(Pbs_Acl::checkRight('gd')): ?>
				<a href="<?php echo $this->url(
					array(
						'module'	=> 'user',
						'controller' => 'group',
						'action'     => 'delete',
						'groupID'   =>  $group->getID()
					),
					'default',
					true);?>"><img src='/media/img/delete.png' alt='Delete Group' /></a>
				<?php endif; ?>
			<?php endif; ?>												
			</div>
			<div class='title'><?php echo $group->getTitle(); ?></div>
			<?php if($group->getDescription()) {
				?>
			<div class='subtitle'><?php echo $group->getDescription(); ?></div>
			<?php
			} else {
				?>
			<div class='subtitle'>&nbsp;</div>
			<?php
			}
			?>
		</div>
		<div class='clear'></div>
	</div>
	<?php endforeach ?>
</div>
	<?php echo $this->pagination; ?>
<?php if(Pbs_Acl::checkRight('glk')): ?>
	<?php echo $this->formButton('linkgroups', 'Link Groups', array(
							'onclick' => 'self.location="/user/group/link"',
							'class' => 'addbutton'));?>
<?php endif ?>
<br />
<br />