summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2016-05-09 10:39:25 +0200
committeremkael <emkael@tlen.pl>2016-05-09 12:38:03 +0200
commit6aa0798a84f164425def56d4bff3c8928895362b (patch)
tree51abe9f91a8db4b03d63d015a9416f5db089c659 /app
parentad11c511f7d2516a3e2f04da4e5cd1eaf89e4d0b (diff)
* calendar selection page
Diffstat (limited to 'app')
-rw-r--r--app/php/controls/CalendarSelection.php17
-rw-r--r--app/php/controls/CalendarSelection.tpl8
-rw-r--r--app/php/pages/Select.page8
3 files changed, 33 insertions, 0 deletions
diff --git a/app/php/controls/CalendarSelection.php b/app/php/controls/CalendarSelection.php
new file mode 100644
index 0000000..e53aa36
--- /dev/null
+++ b/app/php/controls/CalendarSelection.php
@@ -0,0 +1,17 @@
+<?php
+
+Prado::using('Application.controls.FacadeTemplateControl');
+
+class CalendarSelection extends FacadeTemplateControl {
+
+ public function onPreRender($param) {
+ parent::onPreRender($param);
+ if (!$this->Page->IsCallBack) {
+ $this->Calendars->DataSource = $this->Facade->getAll();
+ $this->Calendars->dataBind();
+ }
+ }
+
+}
+
+?>
diff --git a/app/php/controls/CalendarSelection.tpl b/app/php/controls/CalendarSelection.tpl
new file mode 100644
index 0000000..d6bdd83
--- /dev/null
+++ b/app/php/controls/CalendarSelection.tpl
@@ -0,0 +1,8 @@
+<com:TRepeater ID="Calendars">
+ <prop:ItemTemplate>
+ <com:CalendarLabel>
+ <prop:Facade><%# $this->SourceTemplateControl->Facade %></prop:Facade>
+ <prop:CalendarUrl><%# $this->Data->CustomUrl %></prop:CalendarUrl>
+ </com:CalendarLabel>
+ </prop:ItemTemplate>
+</com:TRepeater>
diff --git a/app/php/pages/Select.page b/app/php/pages/Select.page
new file mode 100644
index 0000000..5e1f232
--- /dev/null
+++ b/app/php/pages/Select.page
@@ -0,0 +1,8 @@
+<com:TContent ID="Content">
+ <com:CalendarGroupFilter>
+ <prop:Facade><%= CalendarFacade::getInstance() %></prop:Facade>
+ </com:CalendarGroupFilter>
+ <com:CalendarSelection>
+ <prop:Facade><%= CalendarFacade::getInstance() %></prop:Facade>
+ </com:CalendarSelection>
+</com:TContent>