Skip to content

Commit

Permalink
First Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Silas Montgomery committed Mar 2, 2011
0 parents commit 53b39ca
Show file tree
Hide file tree
Showing 27 changed files with 2,109 additions and 0 deletions.
149 changes: 149 additions & 0 deletions LICENSE
@@ -0,0 +1,149 @@
-------------------
THE CAKEPHP LICENSE
-------------------

CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
Copyright 2005-2010, Cake Software Foundation, Inc.(http://cakefoundation.org)

Licensed under The MIT License
Redistributions of files must retain the above copyright notice.

@copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
@link http://cakephp.org CakePHP(tm) Project
@package cake
@since CakePHP(tm) v 0.2.9
@license MIT License (http://www.opensource.org/licenses/mit-license.php)


-------------------------
THE FULL CALENDAR LICENSE
-------------------------

Copyright (c) 2009 Adam Shaw

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.


------------------
THE JQUERY LICENSE
------------------

Copyright (c) 2011 John Resig, http://jquery.com/

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


---------------------
THE JQUERY UI LICENSE
---------------------

Copyright (c) 2011 Paul Bakaus, http://jqueryui.com/

This software consists of voluntary contributions made by many
individuals (AUTHORS.txt, http://jqueryui.com/about) For exact
contribution history, see the revision history and logs, available
at http://jquery-ui.googlecode.com/svn/

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


------------------------------
THE qTIP JQUERY PLUGIN LICENSE
------------------------------

Copyright (c) 2009 Craig Thompson

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


---------------------------------------
THE CAKEPHP-FULLCALENDAR PLUGIN LICENSE
---------------------------------------

Copyright (c) 2010 Silas Montgomery, http://silasmontgomery.com/

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
66 changes: 66 additions & 0 deletions README
@@ -0,0 +1,66 @@
-----------------------------------------
WHAT IS THE CAKEPHP FULL CALENDAR PLUGIN?
-----------------------------------------

The CakePHP Full Calendar Plugin allows you to easily integrate
the jQuery based Full Calendar application with your CakePHP
application for a slick ajax event calendar.

The plugin brings the following MIT licensed software (see
LICENCE) together to create a simple and sleek experience:

-CakePHP (obviously)
-Full Calendar (the alendar itself)
-jQuery (required by Full Calendar)
-jQuery UI (required for draggable and resizable events)
-qTip (jQuery plugin to allow hover event details)


----
WHY?
----

While working on another project I needed a visual calendar for
event management for multiple users/accounts. From that project
I decided to simplify the calendar and turn it into a plugin
because there didn't appear to be a clean (easy to install and
use) CakePHP Calendar plugin out there.

In it's current form this plugin is for a single user though I
plan on creating a few associated plugins to allow for multiple
users, etc.


------------------------
THE INSTALLATION PROCESS
------------------------

NOTE: These instructions assume you already have a working copy
of CakePHP with a database connection on your web server.

You can read up on CakePHP installation and DB config here:
http://book.cakephp.org/#!/view/913/Development AND
http://book.cakephp.org/#!/view/922/Database-Configuration


INSTALLED IN 3 SIMPLE STEPS

1. Download or fork the CakePHP Full Calendar Plugin at:
https://github.com/silasmontgomery/CakePHP-Full-Calendar-Plugin

2. Copy or upload the "full_calendar-?.??" folder to your
CakePHP "app/plugins" directory and rename to
"full_calendar".

3. Create an "events" and "event_types" table by importing the
"full_calendar.sql" file found in the "full_calendar/config"
directory (Using PHPMyAdmin, command-line, etc).


THAT'S IT!

You should now be able to access the Full Calendar Plugin at:
http://yoursite.com/full_calendar

You should add some Event Types first. Then you can start
scheduling some Events!
47 changes: 47 additions & 0 deletions full_calendar-0.91/config/full_calendar.sql
@@ -0,0 +1,47 @@
/*
* config/full_calendar.sql
* CakePHP Full Calendar Plugin
*
* Copyright (c) 2010 Silas Montgomery
* http://silasmontgomery.com
*
* Licensed under MIT
* http://www.opensource.org/licenses/mit-license.php
*/

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

-- --------------------------------------------------------

--
-- Table structure for table `events`
--

CREATE TABLE IF NOT EXISTS `events` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`event_type_id` int(11) NOT NULL,
`title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`details` text COLLATE utf8_unicode_ci NOT NULL,
`start` datetime NOT NULL,
`end` datetime NOT NULL,
`all_day` tinyint(1) NOT NULL DEFAULT '1',
`status` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'Scheduled',
`active` tinyint(1) NOT NULL DEFAULT '1',
`created` date DEFAULT NULL,
`modified` date DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;


-- --------------------------------------------------------

--
-- Table structure for table `event_types`
--

CREATE TABLE IF NOT EXISTS `event_types` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
`color` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
73 changes: 73 additions & 0 deletions full_calendar-0.91/controllers/event_types_controller.php
@@ -0,0 +1,73 @@
<?php
/*
* controllers/event_types_controller.php
* CakePHP Full Calendar Plugin
*
* Copyright (c) 2010 Silas Montgomery
* http://silasmontgomery.com
*
* Licensed under MIT
* http://www.opensource.org/licenses/mit-license.php
*/

class EventTypesController extends FullCalendarAppController {

var $name = 'EventTypes';

function index() {
$this->EventType->recursive = 0;
$this->set('eventTypes', $this->paginate());
}

function view($id = null) {
if(!$id) {
$this->Session->setFlash(__('Invalid event type', true));
$this->redirect(array('action' => 'index'));
}
$this->set('eventType', $this->EventType->read(null, $id));
}

function add() {
if (!empty($this->data)) {
$this->EventType->create();
if ($this->EventType->save($this->data)) {
$this->Session->setFlash(__('The event type has been saved', true));
$this->redirect(array('action' => 'index'));
} else {
$this->Session->setFlash(__('The event type could not be saved. Please, try again.', true));
}
}
}

function edit($id = null) {
if (!$id && empty($this->data)) {
$this->Session->setFlash(__('Invalid event type', true));
$this->redirect(array('action' => 'index'));
}
if (!empty($this->data)) {
if ($this->EventType->save($this->data)) {
$this->Session->setFlash(__('The event type has been saved', true));
$this->redirect(array('action' => 'index'));
} else {
$this->Session->setFlash(__('The event type could not be saved. Please, try again.', true));
}
}
if (empty($this->data)) {
$this->data = $this->EventType->read(null, $id);
}
}

function delete($id = null) {
if (!$id) {
$this->Session->setFlash(__('Invalid id for event type', true));
$this->redirect(array('action'=>'index'));
}
if ($this->EventType->delete($id)) {
$this->Session->setFlash(__('Event type deleted', true));
$this->redirect(array('action'=>'index'));
}
$this->Session->setFlash(__('Event type was not deleted', true));
$this->redirect(array('action' => 'index'));
}
}
?>

0 comments on commit 53b39ca

Please sign in to comment.