radiant-event_calendar-extension 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/app/views/admin/calendars/index.html.haml +0 -2
- data/app/views/admin/event_venues/index.html.haml +0 -2
- data/app/views/admin/event_venues/remove.html.haml +0 -6
- data/app/views/admin/events/index.html.haml +0 -2
- data/app/views/admin/events/remove.html.haml +0 -6
- data/app/views/events/_event.html.haml +1 -1
- data/event_calendar_extension.rb +5 -3
- data/lib/event_calendar_tags.rb +24 -9
- data/pkg/radiant-event_calendar-extension-1.1.1.gem +0 -0
- data/radiant-event_calendar-extension.gemspec +3 -2
- metadata +5 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.2
|
@@ -31,9 +31,3 @@
|
|
31
31
|
%input.button{:type=>"submit", :value=>"Delete location"}
|
32
32
|
or
|
33
33
|
= link_to 'Cancel', admin_event_venues_url
|
34
|
-
|
35
|
-
#actions
|
36
|
-
%ul
|
37
|
-
%li= link_to "event list", admin_events_url
|
38
|
-
%li= link_to "calendar list", admin_calendars_url
|
39
|
-
%li= link_to "venue list", admin_event_venues_url
|
@@ -14,9 +14,3 @@
|
|
14
14
|
%input.button{:type=>"submit", :value=>"Delete event"}/
|
15
15
|
or
|
16
16
|
= link_to 'Cancel', admin_events_url
|
17
|
-
|
18
|
-
#actions
|
19
|
-
%ul
|
20
|
-
%li= link_to "event list", admin_events_url
|
21
|
-
%li= link_to "calendar list", admin_calendars_url
|
22
|
-
%li= link_to "venue list", admin_event_venues_url
|
@@ -24,7 +24,7 @@
|
|
24
24
|
- if event.event_venue
|
25
25
|
at
|
26
26
|
- if event.event_venue.url
|
27
|
-
= link_to event.event_venue.title, event.event_venue.url
|
27
|
+
= link_to event.event_venue.title, event.event_venue.url, :class => 'location'
|
28
28
|
- else
|
29
29
|
= event.event_venue.title
|
30
30
|
= event.event_venue.address
|
data/event_calendar_extension.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
class EventCalendarExtension < Radiant::Extension
|
2
|
-
version "1.1.
|
2
|
+
version "1.1.2"
|
3
3
|
description "An event calendar extension that administers events locally or draws them from any ical or CalDAV publishers (Google Calendar, .Mac, Darwin Calendar Server, etc.)"
|
4
4
|
url "http://github.com/radiant/radiant-event_calendar-extension"
|
5
5
|
|
@@ -27,8 +27,10 @@ class EventCalendarExtension < Radiant::Extension
|
|
27
27
|
end
|
28
28
|
|
29
29
|
if respond_to?(:tab)
|
30
|
-
tab("
|
31
|
-
add_item("
|
30
|
+
tab("Calendar") do
|
31
|
+
add_item("Events", '/admin/event_calendar')
|
32
|
+
add_item("Calendars", '/admin/event_calendar/calendars')
|
33
|
+
add_item("Locations", '/admin/event_calendar/event_venues')
|
32
34
|
end
|
33
35
|
else
|
34
36
|
admin.tabs.add "Calendar", '/admin/event_calendar', :after => "Snippets", :visibility => [:all]
|
data/lib/event_calendar_tags.rb
CHANGED
@@ -69,6 +69,23 @@ module EventCalendarTags
|
|
69
69
|
end
|
70
70
|
result
|
71
71
|
end
|
72
|
+
|
73
|
+
desc %{
|
74
|
+
Equivalent to calling events:each with a limit of 1. All the usual attributes are passed through.
|
75
|
+
If no events match the specification, nothing is returned.
|
76
|
+
|
77
|
+
To show the next event in a particular calendar:
|
78
|
+
|
79
|
+
<pre><code><r:events:first calendar="slug"><r:event:summary /></r:events:first></code></pre>
|
80
|
+
}
|
81
|
+
|
82
|
+
tag "events:first" do |tag|
|
83
|
+
tag.locals.events ||= get_events(tag)
|
84
|
+
if tag.locals.event = tag.locals.events.first
|
85
|
+
tag.locals.calendar = tag.locals.event.calendar
|
86
|
+
tag.expand
|
87
|
+
end
|
88
|
+
end
|
72
89
|
|
73
90
|
tag "if_events" do | tag|
|
74
91
|
tag.locals.events ||= get_events(tag)
|
@@ -442,7 +459,7 @@ module EventCalendarTags
|
|
442
459
|
#todo: venue:* tags
|
443
460
|
|
444
461
|
desc %{
|
445
|
-
|
462
|
+
Renders a sensible location string, based on whatever venue information is available.
|
446
463
|
|
447
464
|
Usage:
|
448
465
|
<pre><code><r:event:venue /></code></pre>
|
@@ -450,10 +467,12 @@ module EventCalendarTags
|
|
450
467
|
tag "event:venue" do |tag|
|
451
468
|
if venue = tag.locals.event.event_venue
|
452
469
|
if venue.url
|
453
|
-
%{<a href="#{venue.url}">#{venue.title}</a
|
470
|
+
html = %{<a class="location" href="#{venue.url}">#{venue.title}</a>}
|
454
471
|
else
|
455
|
-
%{
|
472
|
+
html = %{<span class="location">venue.title</span>}
|
456
473
|
end
|
474
|
+
html << %{, <span class="address">#{venue.address}</span>} unless venue.address.blank?
|
475
|
+
html
|
457
476
|
else
|
458
477
|
tag.render('event:location')
|
459
478
|
end
|
@@ -520,11 +539,7 @@ module EventCalendarTags
|
|
520
539
|
<pre><code><r:event:time />: <r:event:title /></code></pre>
|
521
540
|
}
|
522
541
|
tag "event:time" do |tag|
|
523
|
-
|
524
|
-
"All day"
|
525
|
-
else
|
526
|
-
tag.locals.event.start_time
|
527
|
-
end
|
542
|
+
tag.locals.event.summarize_start
|
528
543
|
end
|
529
544
|
|
530
545
|
[:start, :end].each do |attribute|
|
@@ -688,7 +703,7 @@ module EventCalendarTags
|
|
688
703
|
|
689
704
|
def _datemark(date=Time.now)
|
690
705
|
%{
|
691
|
-
<div class="datemark"><span class="
|
706
|
+
<div class="datemark"><span class="mon">#{Date::ABBR_MONTHNAMES[date.month]}</span><span class="dom">#{"%02d" % date.mday}</span></div>
|
692
707
|
}
|
693
708
|
end
|
694
709
|
|
Binary file
|
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{radiant-event_calendar-extension}
|
8
|
-
s.version = "1.1.
|
8
|
+
s.version = "1.1.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["spanner"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-10-05}
|
13
13
|
s.description = %q{An event calendar extension that administers events locally or draws them from any ical or CalDAV publishers (Google Calendar, .Mac, Darwin Calendar Server, etc.)}
|
14
14
|
s.email = %q{will@spanner.org}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -98,6 +98,7 @@ Gem::Specification.new do |s|
|
|
98
98
|
"pkg/radiant-event_calendar-extension-1.0.1.gem",
|
99
99
|
"pkg/radiant-event_calendar-extension-1.0.2.gem",
|
100
100
|
"pkg/radiant-event_calendar-extension-1.1.0.gem",
|
101
|
+
"pkg/radiant-event_calendar-extension-1.1.1.gem",
|
101
102
|
"public/icals/blank",
|
102
103
|
"public/images/admin/calendar.png",
|
103
104
|
"public/images/event_calendar/calendarlinkbg.png",
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: radiant-event_calendar-extension
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 1.1.
|
9
|
+
- 2
|
10
|
+
version: 1.1.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- spanner
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-10-05 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -181,6 +181,7 @@ files:
|
|
181
181
|
- pkg/radiant-event_calendar-extension-1.0.1.gem
|
182
182
|
- pkg/radiant-event_calendar-extension-1.0.2.gem
|
183
183
|
- pkg/radiant-event_calendar-extension-1.1.0.gem
|
184
|
+
- pkg/radiant-event_calendar-extension-1.1.1.gem
|
184
185
|
- public/icals/blank
|
185
186
|
- public/images/admin/calendar.png
|
186
187
|
- public/images/event_calendar/calendarlinkbg.png
|