Skip to content

Commit

Permalink
readme, license and adapted to new tasks with time (settings)
Browse files Browse the repository at this point in the history
  • Loading branch information
jose-gordo committed Mar 2, 2010
1 parent 873fbe4 commit c4f0a4d
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 12 deletions.
20 changes: 20 additions & 0 deletions MIT-LICENSE
@@ -0,0 +1,20 @@
Copyright (c) 2010 [name of plugin creator]

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.
8 changes: 0 additions & 8 deletions README

This file was deleted.

19 changes: 19 additions & 0 deletions README.markdown
@@ -0,0 +1,19 @@
Google Calendar integration plugin for Fat Free CRM
============

Put/Edit/Delete events for tasks with due date

This plugin needs http://github.com/tractis/crm_google_account_settings plugin to work, google account settings in user profile

Installation
============

The plugin can be installed by running:

script/plugin install git://github.com/tractis/crm_google_account_settings.git
script/plugin install git://github.com/tractis/crm_google_calendar.git
sudo gem install gcal4ruby

Then restart your web server.

Copyright (c) 2010 by Tractis (https://www.tractis.com), released under the MIT License
18 changes: 14 additions & 4 deletions lib/crm_google_calendar/crm_google_calendar_model_hooks.rb
Expand Up @@ -17,8 +17,8 @@ def create_gcalendar
event.attendees = [{ :name => attendee.full_name, :email => attendee.email }]
end
event.title = get_title
event.start = due_at + 28800
event.end = due_at + 32400
event.start = get_event_start
event.end = get_event_end
# TODO: Put the uri of the task: event.where = request.request_uri
event.reminder = { :minutes => "15", :method => 'email' }
event.save
Expand All @@ -40,8 +40,8 @@ def update_gcalendar
event.attendees = [{ :name => attendee.full_name, :email => attendee.email }]
end
event.title = title
event.start = due_at + 28800
event.end = due_at + 32400
event.start = get_event_start
event.end = get_event_end
# TODO: Put the uri of the task: event.where = request.request_uri
event.reminder = { :minutes => "15", :method => 'email' }
event.save
Expand Down Expand Up @@ -96,6 +96,16 @@ def get_category
category == "" ? "other" : category
end

#----------------------------------------------------------------------------
def get_event_start
Setting.task_calendar_with_time == true ? due_at : due_at + 28800
end

#----------------------------------------------------------------------------
def get_event_end
Setting.task_calendar_with_time == true ? due_at : due_at + 32400
end

end

end

0 comments on commit c4f0a4d

Please sign in to comment.