tb_events 1.0.2 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +6 -14
- data/README.md +4 -4
- data/app/controllers/{spud/admin → admin}/calendar_events_controller.rb +14 -9
- data/app/controllers/{spud/admin → admin}/calendars_controller.rb +12 -7
- data/app/controllers/calendar_events_controller.rb +1 -1
- data/app/controllers/calendars_controller.rb +3 -3
- data/app/helpers/admin/calendar_events_helper.rb +2 -0
- data/app/helpers/admin/calendars_helper.rb +15 -0
- data/app/models/spud_calendar.rb +0 -3
- data/app/models/spud_calendar_event.rb +0 -2
- data/app/views/{spud/admin → admin}/calendar_events/_calendar.html.erb +1 -1
- data/app/views/{spud/admin → admin}/calendar_events/_form.html.erb +7 -2
- data/app/views/admin/calendar_events/edit.html.erb +1 -0
- data/app/views/{spud/admin → admin}/calendar_events/index.html.erb +3 -3
- data/app/views/admin/calendar_events/new.html.erb +1 -0
- data/app/views/admin/calendars/_calendar_legend.html.erb +7 -0
- data/app/views/{spud/admin → admin}/calendars/_form.html.erb +2 -2
- data/app/views/{spud/admin → admin}/calendars/edit.html.erb +0 -0
- data/app/views/{spud/admin → admin}/calendars/new.html.erb +0 -0
- data/app/views/calendar_events/show.html.erb +5 -5
- data/app/views/calendars/show.html.erb +13 -1
- data/config/routes.rb +9 -12
- data/lib/spud/events/configuration.rb +2 -4
- data/lib/spud/events/engine.rb +1 -1
- data/lib/spud/events/version.rb +1 -1
- metadata +39 -39
- data/app/helpers/spud/admin/calendar_events_helper.rb +0 -2
- data/app/helpers/spud/admin/calendars_helper.rb +0 -15
- data/app/views/spud/admin/calendar_events/edit.html.erb +0 -1
- data/app/views/spud/admin/calendar_events/new.html.erb +0 -1
- data/app/views/spud/admin/calendars/_calendar_legend.html.erb +0 -7
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
ZDAzOWU5ZDIwNDY1NDVkNWQ0ZDg2MzliYjA0Yjg0NzgxNWIxN2RiNDhlMzI5
|
10
|
-
Y2M2ODk2ODA4Yjg2ODg1OTk3OTc0ZTVjMjIyNTNkNWQ4MzQ1ZTY0YzhhZDNl
|
11
|
-
NmIxNzc4MTdmMTJjOTRlZjYyNzI3YmQ2N2Y3Njk1MzhjOGJjMWE=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
MzdhZWI5Yzk2NWY3ZmUyOGU5ZjNjMjliMDk3NjlhZGM0ZTU0Njk2YzBlYTA2
|
14
|
-
NGU5ZWYzOTM2ODEzZGM5MGQwYWUxZjZkNjQ0ZTU3NWU3NzVkN2IzNTgwM2Q4
|
15
|
-
NTg1NGM1NTExNDlkY2ZkODUzYTk5OTE0ZGI5Njg0ZDA1ZDg2ZDE=
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 62d8730ede7b8aed8931aba4790a22f605310a55
|
4
|
+
data.tar.gz: e34410c623e5c079f2a73ddd171052c6e5457146
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 640e250412a1ced8da27f58c0eb9961c2b5160b7cb2f18d37301b73afc55a4395b2113339aec6aee53b9c241fa2daafd7a08151bc8288f9d6d4b677164223ab6
|
7
|
+
data.tar.gz: 783ee6db9798f88395d683a3c74973cca1fee061d9e7be723a0eae63d5fc61f073c7c45259061e31bdf5561637bbd6bbe15a94a9c0548c337437aaf4ef3b66fd
|
data/README.md
CHANGED
@@ -1,15 +1,15 @@
|
|
1
|
-
|
1
|
+
TB Events
|
2
2
|
===========
|
3
3
|
|
4
|
-
|
4
|
+
TB Events is an event and calendaring engine for Twice Baked.
|
5
5
|
|
6
6
|
Installation/Usage
|
7
7
|
------------------
|
8
8
|
|
9
9
|
1. Add the following to your Gemfile
|
10
10
|
|
11
|
-
gem '
|
12
|
-
gem '
|
11
|
+
gem 'tb_core'
|
12
|
+
gem 'tb_events'
|
13
13
|
|
14
14
|
2. Run ```bundle install```
|
15
15
|
3. Copy the database migrations in to your rails project
|
@@ -1,7 +1,6 @@
|
|
1
|
-
class
|
1
|
+
class Admin::CalendarEventsController < Admin::ApplicationController
|
2
2
|
|
3
|
-
|
4
|
-
add_breadcrumb "Events", :spud_admin_list_spud_calendar_events_path
|
3
|
+
add_breadcrumb "Events", :admin_list_spud_calendar_events_path
|
5
4
|
belongs_to_spud_app :events
|
6
5
|
|
7
6
|
respond_to :html, :xml, :json
|
@@ -24,7 +23,7 @@ class Spud::Admin::CalendarEventsController < Spud::Admin::ApplicationController
|
|
24
23
|
else
|
25
24
|
@calendar_events = SpudCalendarEvent
|
26
25
|
end
|
27
|
-
@calendar_events = @calendar_events.in_month_of(@calendar_date).order('spud_calendar_events.start_at ASC').
|
26
|
+
@calendar_events = @calendar_events.in_month_of(@calendar_date).order('spud_calendar_events.start_at ASC').to_a
|
28
27
|
|
29
28
|
@calendars = SpudCalendar.all
|
30
29
|
@current_calendar = params[:spud_calendar] ? params[:spud_calendar] : 0
|
@@ -44,21 +43,27 @@ class Spud::Admin::CalendarEventsController < Spud::Admin::ApplicationController
|
|
44
43
|
end
|
45
44
|
|
46
45
|
def create
|
47
|
-
@calendar_event = SpudCalendarEvent.new(
|
46
|
+
@calendar_event = SpudCalendarEvent.new(calendar_event_params)
|
48
47
|
flash[:notice] = 'Calendar event was successfully created.' if @calendar_event.save
|
49
|
-
respond_with(@calendar_event, :location =>
|
48
|
+
respond_with(@calendar_event, :location => admin_list_spud_calendar_events_path)
|
50
49
|
end
|
51
50
|
|
52
51
|
def update
|
53
52
|
@calendar_event = SpudCalendarEvent.find(params[:id])
|
54
|
-
flash[:notice] = 'Calendar event was successfully updated.' if @calendar_event.update_attributes(
|
55
|
-
respond_with(@calendar_event, :location =>
|
53
|
+
flash[:notice] = 'Calendar event was successfully updated.' if @calendar_event.update_attributes(calendar_event_params)
|
54
|
+
respond_with(@calendar_event, :location =>admin_list_spud_calendar_events_path)
|
56
55
|
end
|
57
56
|
|
58
57
|
def destroy
|
59
58
|
@calendar_event = SpudCalendarEvent.find(params[:id])
|
60
59
|
@calendar_event.destroy
|
61
|
-
respond_with(@calendar_event, :location =>
|
60
|
+
respond_with(@calendar_event, :location => admin_list_spud_calendar_events_path)
|
61
|
+
end
|
62
|
+
|
63
|
+
private
|
64
|
+
|
65
|
+
def calendar_event_params
|
66
|
+
params.require(:spud_calendar_event).permit(:title, :description, :start_at, :end_at, :all_day, :spud_calendar_id, :spud_calendar, :location, :address, :address_2, :city, :state, :zip)
|
62
67
|
end
|
63
68
|
|
64
69
|
end
|
@@ -1,7 +1,6 @@
|
|
1
|
-
class
|
1
|
+
class Admin::CalendarsController < Admin::ApplicationController
|
2
2
|
|
3
|
-
|
4
|
-
add_breadcrumb "Events", :spud_admin_list_spud_calendar_events_path
|
3
|
+
add_breadcrumb "Events", :admin_list_spud_calendar_events_path
|
5
4
|
|
6
5
|
belongs_to_spud_app :events
|
7
6
|
|
@@ -14,9 +13,9 @@ class Spud::Admin::CalendarsController < Spud::Admin::ApplicationController
|
|
14
13
|
end
|
15
14
|
|
16
15
|
def create
|
17
|
-
@calendar = SpudCalendar.new(
|
16
|
+
@calendar = SpudCalendar.new(calendar_params)
|
18
17
|
if @calendar.save
|
19
|
-
redirect_to
|
18
|
+
redirect_to admin_list_spud_calendar_events_path
|
20
19
|
else
|
21
20
|
render :action => "new"
|
22
21
|
end
|
@@ -30,9 +29,9 @@ class Spud::Admin::CalendarsController < Spud::Admin::ApplicationController
|
|
30
29
|
|
31
30
|
def update
|
32
31
|
@calendar = SpudCalendar.find(params[:id])
|
33
|
-
if @calendar.update_attributes(
|
32
|
+
if @calendar.update_attributes(calendar_params)
|
34
33
|
flash[:notice] = 'Calendar was successfully updated.'
|
35
|
-
redirect_to
|
34
|
+
redirect_to admin_list_spud_calendar_events_path
|
36
35
|
else
|
37
36
|
render :action => "edit"
|
38
37
|
end
|
@@ -49,4 +48,10 @@ class Spud::Admin::CalendarsController < Spud::Admin::ApplicationController
|
|
49
48
|
end
|
50
49
|
end
|
51
50
|
|
51
|
+
private
|
52
|
+
|
53
|
+
def calendar_params
|
54
|
+
params.require(:spud_calendar).permit(:title, :color)
|
55
|
+
end
|
56
|
+
|
52
57
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
class CalendarsController < ApplicationController
|
2
2
|
|
3
|
-
layout Spud::Events.config.calendar_layout
|
3
|
+
layout Spud::Events.config.calendar_layout
|
4
4
|
|
5
5
|
def show
|
6
6
|
if params[:month]
|
@@ -14,9 +14,9 @@ class CalendarsController < ApplicationController
|
|
14
14
|
@calendar_date = default_date
|
15
15
|
end
|
16
16
|
if params[:calendar] && calendar = SpudCalendar.find_by_title(params[:calendar].titleize)
|
17
|
-
@events = calendar.spud_calendar_events.where(["start_at >= ?",@calendar_date]).order(:start_at).
|
17
|
+
@events = calendar.spud_calendar_events.where(["start_at >= ?",@calendar_date]).order(:start_at).to_a
|
18
18
|
else
|
19
|
-
@events = SpudCalendarEvent.where(["start_at >= ?",@calendar_date]).order(:start_at).
|
19
|
+
@events = SpudCalendarEvent.where(["start_at >= ?",@calendar_date]).order(:start_at).to_a
|
20
20
|
end
|
21
21
|
@current_calendar = params[:calendar] ? params[:calendar] : 0
|
22
22
|
@page_title = @calendar_date.strftime("Calendar - %B %Y")
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Admin::CalendarsHelper
|
2
|
+
|
3
|
+
def link_to_previous_admin_calendar_month(date, url_for_options)
|
4
|
+
date = date.advance(:months => -1)
|
5
|
+
calendar = params[:calendar] ? params[:calendar] : nil
|
6
|
+
link_to('« Previous Month'.html_safe, admin_list_spud_calendar_events_path(:month => date.month, :year => date.year, :calendar => calendar), :class => 'spud_events_calendar_link previous_calendar btn').html_safe
|
7
|
+
end
|
8
|
+
|
9
|
+
def link_to_next_admin_calendar_month(date, url_for_options)
|
10
|
+
date = date.advance(:months => 1)
|
11
|
+
calendar = params[:calendar] ? params[:calendar] : nil
|
12
|
+
link_to('Next Month »'.html_safe, admin_list_spud_calendar_events_path(:month => date.month, :year => date.year, :calendar => calendar), :class => 'spud_events_calendar_link next_calendar btn').html_safe
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
data/app/models/spud_calendar.rb
CHANGED
@@ -2,8 +2,6 @@ class SpudCalendarEvent < ActiveRecord::Base
|
|
2
2
|
belongs_to :spud_calendar
|
3
3
|
validates_presence_of :title, :start_at, :end_at, :spud_calendar_id
|
4
4
|
|
5
|
-
attr_accessible :title, :description, :start_at, :end_at, :all_day, :spud_calendar_id, :spud_calendar, :location, :address, :address_2, :city, :state, :zip
|
6
|
-
|
7
5
|
def self.in_month_of(month)
|
8
6
|
where(["spud_calendar_events.start_at <= ? AND spud_calendar_events.start_at >= ?", month.end_of_month, month.beginning_of_month])
|
9
7
|
end
|
@@ -7,7 +7,7 @@
|
|
7
7
|
<div class="spud_events_admin_calendar_date_container">
|
8
8
|
<%= content_tag :span, day.day, :class => (tasks.count > 0 ? "spud_events_admin_calendar_date spud_events_admin_calendar_date_active" : "spud_events_admin_calendar_date") %>
|
9
9
|
<% tasks.each do |task| %>
|
10
|
-
<%= link_to truncate(task.title, :length => 25),
|
10
|
+
<%= link_to truncate(task.title, :length => 25), edit_admin_calendar_event_path(task.id), :class => "spud_events_admin_calendar_event_marker spud_events_calendar_event_#{task.spud_calendar_id}", :style => "background-color: \##{task.spud_calendar.color}; color:\##{calendar_fore_color(task.spud_calendar.color)}" %>
|
11
11
|
<% end %>
|
12
12
|
</div>
|
13
13
|
<% end %>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<%= form_for @calendar_event, :url => path
|
1
|
+
<%= form_for @calendar_event, :url => path, :html=>{:class=>"form-horizontal"} do |f| %>
|
2
2
|
<%= error_messages_for(f.object) %>
|
3
3
|
<fieldset>
|
4
4
|
<legend>Details</legend>
|
@@ -86,7 +86,12 @@
|
|
86
86
|
</fieldset>
|
87
87
|
|
88
88
|
<div class="form-actions">
|
89
|
-
<%=f.submit "
|
89
|
+
<%= f.submit "Save", :class=>"btn btn-primary"%>
|
90
|
+
<%=link_to "cancel",admin_list_spud_calendar_events_path,:class => "btn"%>
|
91
|
+
<% if !@calendar_event.new_record? %>
|
92
|
+
or
|
93
|
+
<%= link_to "Delete", admin_calendar_event_path(@calendar_event), :method=>:delete,:class => "btn btn-danger", :data => {:confirm=>"Are you sure you want delete this event?"} %>
|
94
|
+
<% end %>
|
90
95
|
</div>
|
91
96
|
|
92
97
|
<% end %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render :partial => 'form', :locals => {:path => admin_calendar_event_path(@calendar_event)} %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<%=content_for :data_controls do%>
|
2
|
-
<%= link_to "New Event",
|
2
|
+
<%= link_to "New Event", new_admin_calendar_event_path, :class => "btn btn-primary right" %>
|
3
3
|
<%end%>
|
4
4
|
<%=content_for :detail do%>
|
5
5
|
<h3>Calendar Events - <%= @calendar_date.strftime('%B %Y') %></h3>
|
@@ -9,9 +9,9 @@
|
|
9
9
|
</div>
|
10
10
|
|
11
11
|
<ul id="spud_events_admin_calendar_legend">
|
12
|
-
<%= render :partial => '
|
12
|
+
<%= render :partial => 'admin/calendars/calendar_legend', :collection => @calendars, :as => :calendar %>
|
13
13
|
<li>
|
14
|
-
<%= link_to("New Calendar",
|
14
|
+
<%= link_to("New Calendar", new_admin_calendar_path, :class => "btn btn-primary btn-small pull-right") %>
|
15
15
|
<br style="clear:right;"/>
|
16
16
|
</li>
|
17
17
|
</ul>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render :partial => 'form', :locals => {:path => admin_calendar_events_path} %>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<li id="spud_events_admin_calendar_legend_<%= calendar.id %>" class="spud_events_admin_calendar_legend_item">
|
2
|
+
<%= content_tag :span, calendar.title, :style => "background-color: \##{calendar.color};color:\##{calendar_fore_color(calendar.color)}"%>
|
3
|
+
<div class="spud_events_admin_calendar_actions">
|
4
|
+
<%= link_to 'edit', edit_admin_calendar_path(calendar), :class => "btn btn-mini" %>
|
5
|
+
<%= link_to 'delete', admin_calendar_path(calendar), :remote => true, :data => {:confirm => "This action can't be undone. Would you like to remove the calendar \"#{calendar.title}\"?"}, :method => :delete, :class => 'js-spud-calendar-delete-action btn btn-mini btn-danger' %>
|
6
|
+
</div>
|
7
|
+
</li>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<%= form_for @calendar, :url => (@calendar.new_record? ?
|
1
|
+
<%= form_for @calendar, :url => (@calendar.new_record? ? admin_calendars_path : admin_calendar_path(@calendar)),:html=>{:class=>"form-horizontal"} do |f| %>
|
2
2
|
<%= error_messages_for(f.object) %>
|
3
3
|
<div class="control-group">
|
4
4
|
<%= f.label :title,:class => "control-label" %>
|
@@ -14,7 +14,7 @@
|
|
14
14
|
</div>
|
15
15
|
</div>
|
16
16
|
<div class="form-actions">
|
17
|
-
<%=f.submit "Save", :class=>"btn btn-primary"%> or <%=link_to "cancel",
|
17
|
+
<%= f.submit "Save", :class=>"btn btn-primary"%> or <%=link_to "cancel", admin_list_spud_calendar_events_path, :class => "btn" %>
|
18
18
|
</div>
|
19
19
|
|
20
20
|
<% end %>
|
File without changes
|
File without changes
|
@@ -1,5 +1,5 @@
|
|
1
|
-
<
|
2
|
-
<
|
3
|
-
|
4
|
-
|
5
|
-
<p><%=
|
1
|
+
<h1><%= @event.title %></h1>
|
2
|
+
<p><b>Calendar:</b> <%= @event.spud_calendar.title %></p>
|
3
|
+
<p><em><%= @event.start_at %> - <%= @event.end_at %></em></p>
|
4
|
+
<%= simple_format(@event.description) %>
|
5
|
+
<p><%= link_to 'Back', calendar_path %></p>
|
@@ -1,4 +1,16 @@
|
|
1
1
|
<%= render :partial => 'calendar_options' %>
|
2
2
|
<div id="spud_events_calendar">
|
3
|
-
|
3
|
+
<%= render :partial => 'calendar', :locals => {:date => @calendar_date} %>
|
4
|
+
</div>
|
5
|
+
|
6
|
+
<div id="spud_events_list">
|
7
|
+
<% @events.each do |event| %>
|
8
|
+
<div class="spud_event_list_item">
|
9
|
+
<h3><%= event.title %></h3>
|
10
|
+
<p><b>Calendar:</b> <%= event.spud_calendar.title %></p>
|
11
|
+
<p><em><%= event.start_at %> - <%= event.end_at %></em></p>
|
12
|
+
<%= simple_format(event.description) %>
|
13
|
+
<p><%= link_to 'Details', event_path(event) %></p>
|
14
|
+
</div>
|
15
|
+
<% end %>
|
4
16
|
</div>
|
data/config/routes.rb
CHANGED
@@ -1,17 +1,14 @@
|
|
1
1
|
Rails.application.routes.draw do
|
2
2
|
|
3
|
-
# Calendar
|
4
|
-
|
5
|
-
match '
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
end
|
3
|
+
# Calendar
|
4
|
+
get 'calendar/event/:id' => "calendar_events#show", :as => "event"
|
5
|
+
match 'calendar(/:month(/:year(/:calendar)))' => "calendars#show", :as => "calendar", :via => [:get, :post]
|
6
|
+
|
7
|
+
namespace :admin do
|
8
|
+
# Events
|
9
|
+
resources :calendar_events, :except => [:index]
|
10
|
+
resources :calendars, :except => [:index]
|
11
|
+
get 'events(/:month(/:year(/:calendar)))' => "calendar_events#index", :as => "list_spud_calendar_events"
|
13
12
|
end
|
14
13
|
|
15
|
-
|
16
14
|
end
|
17
|
-
|
@@ -1,10 +1,8 @@
|
|
1
1
|
module Spud
|
2
2
|
module Events
|
3
3
|
include ActiveSupport::Configurable
|
4
|
-
|
5
|
-
config_accessor :base_layout, :content_for, :calendar_layout
|
6
|
-
self.base_layout = "application"
|
4
|
+
config_accessor :content_for, :calendar_layout
|
7
5
|
self.content_for = nil
|
8
6
|
self.calendar_layout = nil
|
9
7
|
end
|
10
|
-
end
|
8
|
+
end
|
data/lib/spud/events/engine.rb
CHANGED
@@ -9,7 +9,7 @@ module Spud
|
|
9
9
|
|
10
10
|
initializer :admin do
|
11
11
|
Spud::Core.configure do |config|
|
12
|
-
config.admin_applications += [{:name => "Events", :thumbnail => "spud/admin/events_thumb.png", :url => "/
|
12
|
+
config.admin_applications += [{:name => "Events", :thumbnail => "spud/admin/events_thumb.png", :url => "/admin/events",:order => 10}]
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
data/lib/spud/events/version.rb
CHANGED
metadata
CHANGED
@@ -1,57 +1,57 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tb_events
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Westlake Design
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-02-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: '4.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: '4.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: tb_core
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '1.
|
33
|
+
version: '1.2'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '1.
|
40
|
+
version: '1.2'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: mysql2
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0
|
47
|
+
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0
|
54
|
+
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -84,14 +84,14 @@ dependencies:
|
|
84
84
|
name: shoulda
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - ~>
|
87
|
+
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: 3.0.1
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - ~>
|
94
|
+
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: 3.0.1
|
97
97
|
- !ruby/object:Gem::Dependency
|
@@ -128,26 +128,26 @@ dependencies:
|
|
128
128
|
requirements:
|
129
129
|
- - '='
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: 0.
|
131
|
+
version: 1.0.0.RC1
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - '='
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: 0.
|
138
|
+
version: 1.0.0.RC1
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: simplecov
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
|
-
- - ~>
|
143
|
+
- - "~>"
|
144
144
|
- !ruby/object:Gem::Version
|
145
145
|
version: 0.6.4
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
|
-
- - ~>
|
150
|
+
- - "~>"
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: 0.6.4
|
153
153
|
description:
|
@@ -157,6 +157,8 @@ executables: []
|
|
157
157
|
extensions: []
|
158
158
|
extra_rdoc_files: []
|
159
159
|
files:
|
160
|
+
- README.md
|
161
|
+
- Rakefile
|
160
162
|
- app/assets/images/spud/admin/events_thumb.png
|
161
163
|
- app/assets/javascripts/calendar_events.js
|
162
164
|
- app/assets/javascripts/calendars.js
|
@@ -196,28 +198,28 @@ files:
|
|
196
198
|
- app/assets/stylesheets/spud/calendar_events.css
|
197
199
|
- app/assets/stylesheets/spud/calendars.css
|
198
200
|
- app/assets/stylesheets/spud/events.css
|
201
|
+
- app/controllers/admin/calendar_events_controller.rb
|
202
|
+
- app/controllers/admin/calendars_controller.rb
|
199
203
|
- app/controllers/calendar_events_controller.rb
|
200
204
|
- app/controllers/calendars_controller.rb
|
201
|
-
- app/
|
202
|
-
- app/
|
205
|
+
- app/helpers/admin/calendar_events_helper.rb
|
206
|
+
- app/helpers/admin/calendars_helper.rb
|
203
207
|
- app/helpers/calendars_helper.rb
|
204
|
-
- app/helpers/spud/admin/calendar_events_helper.rb
|
205
|
-
- app/helpers/spud/admin/calendars_helper.rb
|
206
208
|
- app/models/spud_calendar.rb
|
207
209
|
- app/models/spud_calendar_event.rb
|
210
|
+
- app/views/admin/calendar_events/_calendar.html.erb
|
211
|
+
- app/views/admin/calendar_events/_form.html.erb
|
212
|
+
- app/views/admin/calendar_events/edit.html.erb
|
213
|
+
- app/views/admin/calendar_events/index.html.erb
|
214
|
+
- app/views/admin/calendar_events/new.html.erb
|
215
|
+
- app/views/admin/calendars/_calendar_legend.html.erb
|
216
|
+
- app/views/admin/calendars/_form.html.erb
|
217
|
+
- app/views/admin/calendars/edit.html.erb
|
218
|
+
- app/views/admin/calendars/new.html.erb
|
208
219
|
- app/views/calendar_events/show.html.erb
|
209
220
|
- app/views/calendars/_calendar.html.erb
|
210
221
|
- app/views/calendars/_calendar_options.html.erb
|
211
222
|
- app/views/calendars/show.html.erb
|
212
|
-
- app/views/spud/admin/calendar_events/_calendar.html.erb
|
213
|
-
- app/views/spud/admin/calendar_events/_form.html.erb
|
214
|
-
- app/views/spud/admin/calendar_events/edit.html.erb
|
215
|
-
- app/views/spud/admin/calendar_events/index.html.erb
|
216
|
-
- app/views/spud/admin/calendar_events/new.html.erb
|
217
|
-
- app/views/spud/admin/calendars/_calendar_legend.html.erb
|
218
|
-
- app/views/spud/admin/calendars/_form.html.erb
|
219
|
-
- app/views/spud/admin/calendars/edit.html.erb
|
220
|
-
- app/views/spud/admin/calendars/new.html.erb
|
221
223
|
- config/application.rb
|
222
224
|
- config/boot.rb
|
223
225
|
- config/routes.rb
|
@@ -231,8 +233,6 @@ files:
|
|
231
233
|
- lib/spud/events/table_builder.rb
|
232
234
|
- lib/spud/events/version.rb
|
233
235
|
- lib/tb_events.rb
|
234
|
-
- Rakefile
|
235
|
-
- README.md
|
236
236
|
homepage:
|
237
237
|
licenses: []
|
238
238
|
metadata: {}
|
@@ -242,17 +242,17 @@ require_paths:
|
|
242
242
|
- lib
|
243
243
|
required_ruby_version: !ruby/object:Gem::Requirement
|
244
244
|
requirements:
|
245
|
-
- -
|
245
|
+
- - ">="
|
246
246
|
- !ruby/object:Gem::Version
|
247
247
|
version: '0'
|
248
248
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
249
249
|
requirements:
|
250
|
-
- -
|
250
|
+
- - ">="
|
251
251
|
- !ruby/object:Gem::Version
|
252
252
|
version: '0'
|
253
253
|
requirements: []
|
254
254
|
rubyforge_project:
|
255
|
-
rubygems_version: 2.
|
255
|
+
rubygems_version: 2.2.1
|
256
256
|
signing_key:
|
257
257
|
specification_version: 4
|
258
258
|
summary: Twice Baked Events engine
|
@@ -1,15 +0,0 @@
|
|
1
|
-
module Spud::Admin::CalendarsHelper
|
2
|
-
|
3
|
-
def link_to_previous_admin_calendar_month(date, url_for_options)
|
4
|
-
date = date.advance(:months => -1)
|
5
|
-
calendar = params[:calendar] ? params[:calendar] : nil
|
6
|
-
link_to('« Previous Month'.html_safe, spud_admin_list_spud_calendar_events_path(:month => date.month, :year => date.year, :calendar => calendar), :class => 'spud_events_calendar_link previous_calendar btn').html_safe
|
7
|
-
end
|
8
|
-
|
9
|
-
def link_to_next_admin_calendar_month(date, url_for_options)
|
10
|
-
date = date.advance(:months => 1)
|
11
|
-
calendar = params[:calendar] ? params[:calendar] : nil
|
12
|
-
link_to('Next Month »'.html_safe, spud_admin_list_spud_calendar_events_path(:month => date.month, :year => date.year, :calendar => calendar), :class => 'spud_events_calendar_link next_calendar btn').html_safe
|
13
|
-
end
|
14
|
-
|
15
|
-
end
|
@@ -1 +0,0 @@
|
|
1
|
-
<%= render :partial => 'form', :locals => {:path => spud_admin_calendar_event_path(@calendar_event)} %>
|
@@ -1 +0,0 @@
|
|
1
|
-
<%= render :partial => 'form', :locals => {:path => spud_admin_calendar_events_path} %>
|
@@ -1,7 +0,0 @@
|
|
1
|
-
<li id="spud_events_admin_calendar_legend_<%= calendar.id %>" class="spud_events_admin_calendar_legend_item">
|
2
|
-
<%= content_tag :span, calendar.title, :style => "background-color: \##{calendar.color};color:\##{calendar_fore_color(calendar.color)}"%>
|
3
|
-
<div class="spud_events_admin_calendar_actions">
|
4
|
-
<%= link_to 'edit', edit_spud_admin_calendar_path(calendar), :class => "btn btn-mini" %>
|
5
|
-
<%= link_to 'delete', spud_admin_calendar_path(calendar), :remote => true, :confirm => "This action can't be undone. Would you like to remove the calendar \"#{calendar.title}\"?", :method => :delete, :class => 'js-spud-calendar-delete-action btn btn-mini btn-danger' %>
|
6
|
-
</div>
|
7
|
-
</li>
|