aboutsummaryrefslogtreecommitdiff
path: root/template/feedback-read.phtml
blob: 15d491ff715fa471b1f3c88e3af2062da94ac4ce (plain)
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
<div class="container">
<h1><?=h($title)?></h1> <span><i>on <?= $hostname ?></i></span>
	<form action="<?=h($conference->getFeedbackReadUrl())?>" method="POST">

		<div class="row">
			<div class="col-xs-12">
				<div class="form-inline">

					<div class="form-group">
						<label class="sr-only" for="from">From Date</label>
						<div class="input-group">
							<div class="input-group-addon">From:</div>
							<input
								type="text"
								data-provide="datepicker"
								data-date-format="yyyy-mm-dd"
								data-date-week-start="1"
								data-date-today-btn="linked"
								data-date-today-highlight="true"
								class="form-control"
								name="from"
								id="from"
								value="<?=h(date('Y-m-d', $from))?>">
						</div>
					</div>

					<div class="form-group">
						<label class="sr-only" for="to">To Date</label>
						<div class="input-group">
							<div class="input-group-addon">To:</div>
							<input
								type="text"
								data-provide="datepicker"
								data-date-format="yyyy-mm-dd"
								data-date-week-start="1"
								data-date-today-btn="linked"
								data-date-today-highlight="true"
								class="form-control"
								name="to"
								id="to"
								value="<?=h(date('Y-m-d', $to))?>">
						</div>
					</div>

					<button type="submit" class="btn btn-primary">Filter</button>
				</div>
			</div>
		</div>

		<div class="row">
			<div class="col-xs-12">
				<div class="form-inline">
				<? foreach($allcolumns as $column): ?>
					<label class="checkbox-inline">
						<input
							type="checkbox"
							name="col[]"
							value="<?=h($column)?>"
							<? if(in_array($column, $columns)): ?>checked<? endif ?>
						> <?=h($column)?>
					</label>
				<? endforeach ?>
				</div>
			</div>
		</div>

		<div class="row">
			<div class="col-xs-12">
				<table class="table table-striped table-hover">
					<thead>
						<tr>
							<? foreach($columns as $column): ?>
								<th class="<?=h($column)?>"><?=h($column)?></th>
							<? endforeach ?>
						</tr>
					</thead>
					<tbody>
						<? foreach($responses as $response): ?>
							<tr>
								<? foreach($columns as $column): ?>
									<td class="<?=h($column)?>">
										<? if($column == 'reported' || $column == 'datetime'): ?>
											<?=h(date('Y-m-d H:i:s', $response[$column]))?>
										<? else: ?>
											<?=h($response[$column])?>
										<? endif ?>
									</td>
								<? endforeach ?>
							</tr>
						<? endforeach ?>
					</tbody>
				</table>
			</div>
		</div>

	</form>
</div>