summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorBjörn Geiger2011-08-22 12:47:09 +0200
committerBjörn Geiger2011-08-22 12:47:09 +0200
commit4c4bc2ebac0658fc603608159e8458972f01d7ce (patch)
treed7788e6ac7fa52130e61afa3de7401f9d63248a6 /application
parentkorrektur (diff)
parentMerge branch 'master' of git.openslx.org:lsfks/projekte/poolctrl (diff)
downloadpoolctrl-4c4bc2ebac0658fc603608159e8458972f01d7ce.tar.gz
poolctrl-4c4bc2ebac0658fc603608159e8458972f01d7ce.tar.xz
poolctrl-4c4bc2ebac0658fc603608159e8458972f01d7ce.zip
Merge branch 'master' of git.openslx.org:lsfks/projekte/poolctrl
Diffstat (limited to 'application')
-rw-r--r--application/controllers/EventController.php44
-rw-r--r--application/views/scripts/event/calendarEvents.php26
-rw-r--r--application/views/scripts/event/index.phtml3
-rw-r--r--application/views/scripts/event/poolEvents.php1
4 files changed, 21 insertions, 53 deletions
diff --git a/application/controllers/EventController.php b/application/controllers/EventController.php
index a0c342b..46529b8 100644
--- a/application/controllers/EventController.php
+++ b/application/controllers/EventController.php
@@ -495,33 +495,27 @@ class EventController extends Zend_Controller_Action
}
}
- public function listAction() {
-
+ public function listAction(){
+
$this->_helper->layout->disableLayout();
$this->_helper->viewRenderer->setNoRender();
-
- $year = date('Y');
- $month = date('m');
-
- echo json_encode(array(
- array(
- 'id' => 111,
- 'title' => "Event1",
- 'start' => "$year-$month-10",
- 'end' => "$year-$month-11",
- 'url' => "http://yahoo.com/"
- ),
-
- array(
- 'id' => 222,
- 'title' => "Event2",
- 'start' => "$year-$month-20",
- 'end' => "$year-$month-22",
- 'url' => "http://yahoo.com/"
- )
-
- ));
- return;
+ $eventList = $this->eventMapper->fetchAll();
+
+ foreach ($eventList as $event){
+ $events[] = array(
+ 'id' => $event->getID(),
+ 'title' => $event->getTitle(),
+ 'start' => $event->getStart(),
+ 'end' => $event->getEnd(),
+ 'category' => $event->getCategory(),
+ 'participants' => $event->getParticipants(),
+ 'note' => $event->getNote(),
+ 'poolID' => $event->getPbs_poolID(),
+ 'bootosID' => $event->getPbs_bootosID(),
+ 'allDay' => false,
+ );
+ }
+ echo json_encode($events);
}
public function runAction() {
diff --git a/application/views/scripts/event/calendarEvents.php b/application/views/scripts/event/calendarEvents.php
deleted file mode 100644
index 691c434..0000000
--- a/application/views/scripts/event/calendarEvents.php
+++ /dev/null
@@ -1,26 +0,0 @@
-<?php
-
- $year = date('Y');
- $month = date('m');
-
- echo json_encode(array(
-
- array(
- 'id' => 111,
- 'title' => "Event1",
- 'start' => "$year-$month-10",
- 'end' => "$year-$month-11",
- 'url' => "http://yahoo.com/"
- ),
-
- array(
- 'id' => 222,
- 'title' => "Event2",
- 'start' => "$year-$month-20",
- 'end' => "$year-$month-22",
- 'url' => "http://yahoo.com/"
- )
-
- ));
-
-?> \ No newline at end of file
diff --git a/application/views/scripts/event/index.phtml b/application/views/scripts/event/index.phtml
index 0155e2f..8bfe4c1 100644
--- a/application/views/scripts/event/index.phtml
+++ b/application/views/scripts/event/index.phtml
@@ -62,7 +62,7 @@ $(document).ready(function() {iniCalendar();});
default: 'week',
left: 'title',
center: 'prev,next today',
- right: 'agendaWeek,agendaDay'
+ right: 'month,agendaWeek,agendaDay'
},
editable: true,
// disableDragging: false,
@@ -70,6 +70,7 @@ $(document).ready(function() {iniCalendar();});
selectable: true,
selectHelper: true,
defaultView: 'agendaWeek',
+ allDay : false,
events: "/event/list",
diff --git a/application/views/scripts/event/poolEvents.php b/application/views/scripts/event/poolEvents.php
deleted file mode 100644
index b3d9bbc..0000000
--- a/application/views/scripts/event/poolEvents.php
+++ /dev/null
@@ -1 +0,0 @@
-<?php