summaryrefslogtreecommitdiffstats
path: root/application/views/scripts/event/index.phtml
blob: cde9ce2224f51a5581d546a77a5e21a753ab06e5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<h1>Events</h1>
<?php echo $this->formButton('addEvent', 'Add Event', array(
							'onclick' => 'self.location="/event/add/"',
							'class' => 'addbutton'))
?>
<select name="PoolSelectbox" onChange="setVisible('pool' + this.value);">
<option> Choose a Pool </option>
<?php if(count($this->poollist)>0){
	foreach($this->poollist as $pool => $p){
		 echo "<option>" . $p->getTitle() . "</option>";
	}
} else echo '<option> No Pools </option>';?>
</select>
<br />
<br />
<div class='listelement'>
<?php
if(count($this->eventlist)>0) {
?>

<?php
	foreach ($this->eventlist as $pool => $poolEvents):
		if(count($poolEvents)==0)
			break;
?>
	<div class='hidden' id='pool<?php echo $poolEvents[0]['pbs_poolID'] ?>' style='visibility:hidden' >
		<h2><?php echo $pool; ?></h2>
		<?php foreach ($poolEvents as $event): ?>
		<div class='element'>
			<div class='content'>
				<div class='actions'>				
					<a href="<?php echo $this->url(
						array(
							'controller' => 'event',
							'action'     => 'edit',
							'eventID'   =>  $event['eventID']
						),
						'default',
						true);?>"><img src='/media/img/edit.png' alt='Edit Group' /></a>
					<a href="<?php echo $this->url(
						array(
							'controller' => 'event',
							'action'     => 'delete',
							'eventID'   =>  $event['eventID']
						),
						'default',
						true);?>"><img src='/media/img/delete.png' alt='Delete Group' /></a>									
				</div>
				<div class='title'><?php echo $event['title']; ?></div>
				<?php if($event['category']) {
					?>
				<div class='subtitle'><?php echo $event['category']; ?></div>
				<?php
				} else {
					?>
				<div class='subtitle'>&nbsp;</div>
				<?php
				}
				?>
				<div class='details'><label>Start Time:</label>
					<div class='item'><?php echo date ('d F Y - H:i', strtotime($event['start'])); ?>&nbsp;</div>
				</div>
				<div class='details'><label>End Time:</label>
					<div class='item'><?php echo date ('d F Y - H:i', strtotime($event['end'])); ?>&nbsp;</div>
				</div>
				<div class='details'><label>Participants:</label>
					<div class='item'><?php echo $event['participants']; ?>&nbsp;</div>
				</div>
				<div class='details'><label>Membership:</label>
					<div class='item'><?php echo $event['pbs_person_name']; ?>&nbsp;</div>
				</div>
				<div class='details'><label>BootOs:</label>
					<div class='item'><?php echo $event['pbs_bootos_title']; ?>&nbsp;</div>
				</div>
				<div class='details'><label>Repeat:</label>
					<div class='item'><?php if($event['repeat']) echo 'yes'; else echo 'no'; ?>&nbsp;</div>
				</div>
				<div class='details'><label>Immediate:</label>
					<div class='item'><?php if($event['immediate']) echo 'yes'; else echo 'no'; ?>&nbsp;</div>
				</div>
				<div class='details'><label>Note:</label>
					<div class='item'><?php echo $event['note']; ?>&nbsp;</div>
				</div>
			</div>
		</div>
		<div class='clear'></div>
		<?php endforeach ?>
	</div>
	<?php endforeach ?>
<?php } else
	echo "You haven't events yet"; ?>
</div>
<br />
<br />