summaryrefslogtreecommitdiffstats
path: root/application/views/scripts/event/index.phtml
blob: e6eddfdd419c6ee97631d6cba6b851357baf5b05 (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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<h1>Events</h1>
<?php echo $this->formButton('addEvent', 'Add Event', array(
							'onclick' => 'self.location="/event/add/"',
							'class' => 'addbutton'))
?>
<form name="PoolSelectForm">
	<select name="PoolSelectbox" onChange="deselectAll();selectPool();">
		<option> Choose a Pool </option>
<?php if(count($this->poollist)>0){
	foreach($this->poollist as $pool => $p){
		 echo "<option value='" . $p->getID() . "'>" . $p->getTitle() . "</option>";
	}
} else echo '<option> No Pools </option>';?>
	</select>
</form>
<script type="text/javascript">
	function selectPool() {
		selectForm = document.PoolSelectForm;
		selectBox = selectForm.PoolSelectbox;
		selectedValue = selectBox.options.selectedIndex;
		selectedOption = selectBox.options[selectedValue];
		poolID = selectedOption.value;
		setVisible('pool' + poolID);
	}
	function deselectAll() {
		selectForm = document.PoolSelectForm;
		selectBox = selectForm.PoolSelectbox;
		selectOptions = selectBox.options;
		for(i = 0; i < selectOptions.length; i++) {
			selectOption = selectOptions[i];
			poolID = selectOption.value;
			if(poolID != 'Choose a Pool') {
				setInvisible('pool' + poolID);
			}
		}
	}	
</script>
<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 />