From a3bb27109dc01fa5df2c771b84620f1e8f56b849 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Mon, 21 Nov 2016 22:08:35 -0500 Subject: Replace calendar component by vanilla javascript --- app/Helper/CalendarHelper.php | 17 +++++++++++++++++ app/Template/calendar/show.php | 9 ++++++--- app/Template/dashboard/calendar.php | 6 ++++-- 3 files changed, 27 insertions(+), 5 deletions(-) (limited to 'app') diff --git a/app/Helper/CalendarHelper.php b/app/Helper/CalendarHelper.php index b35c40f7..4f78b673 100644 --- a/app/Helper/CalendarHelper.php +++ b/app/Helper/CalendarHelper.php @@ -16,6 +16,23 @@ use Kanboard\Formatter\TaskCalendarFormatter; */ class CalendarHelper extends Base { + /** + * Render calendar component + * + * @param string $checkUrl + * @param string $saveUrl + * @return string + */ + public function render($checkUrl, $saveUrl) + { + $params = array( + 'checkUrl' => $checkUrl, + 'saveUrl' => $saveUrl, + ); + + return '
'; + } + /** * Get formatted calendar task due events * diff --git a/app/Template/calendar/show.php b/app/Template/calendar/show.php index 739d1eea..009fc07e 100644 --- a/app/Template/calendar/show.php +++ b/app/Template/calendar/show.php @@ -1,6 +1,9 @@
projectHeader->render($project, 'CalendarController', 'show') ?> - - + + calendar->render( + $this->url->href('CalendarController', 'project', array('project_id' => $project['id'])), + $this->url->href('CalendarController', 'save', array('project_id' => $project['id'])) + ) ?> +
diff --git a/app/Template/dashboard/calendar.php b/app/Template/dashboard/calendar.php index 6f156db7..0b768b31 100644 --- a/app/Template/dashboard/calendar.php +++ b/app/Template/dashboard/calendar.php @@ -1,2 +1,4 @@ - +calendar->render( + $this->url->href('CalendarController', 'user', array('user_id' => $user['id'])), + $this->url->href('CalendarController', 'save') +) ?> -- cgit v1.2.3