radiant-event_calendar-extension 1.3.9 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. data/VERSION +1 -1
  2. data/app/controllers/events_controller.rb +19 -19
  3. data/app/models/event.rb +41 -30
  4. data/app/models/event_calendar_page.rb +5 -9
  5. data/app/views/admin/calendars/_form.html.haml +12 -12
  6. data/app/views/admin/calendars/edit.html.haml +2 -3
  7. data/app/views/admin/calendars/index.html.haml +9 -9
  8. data/app/views/admin/calendars/new.html.haml +3 -4
  9. data/app/views/admin/calendars/show.html.haml +6 -6
  10. data/app/views/admin/event_venues/_event_venue.html.haml +2 -2
  11. data/app/views/admin/event_venues/_form.html.haml +13 -13
  12. data/app/views/admin/event_venues/edit.html.haml +6 -6
  13. data/app/views/admin/event_venues/index.html.haml +9 -8
  14. data/app/views/admin/event_venues/new.html.haml +6 -6
  15. data/app/views/admin/event_venues/remove.html.haml +12 -11
  16. data/app/views/admin/events/_event.html.haml +1 -1
  17. data/app/views/admin/events/_form.html.haml +21 -20
  18. data/app/views/admin/events/edit.html.haml +2 -2
  19. data/app/views/admin/events/index.html.haml +12 -12
  20. data/app/views/admin/events/remove.html.haml +8 -9
  21. data/app/views/events/_event.html.haml +11 -8
  22. data/app/views/events/_faceting.html.haml +6 -13
  23. data/app/views/events/_minicalendar.html.haml +3 -3
  24. data/app/views/events/_views.html.haml +5 -4
  25. data/app/views/events/index.html.haml +9 -9
  26. data/config/locales/de.yml +213 -0
  27. data/config/locales/en.yml +212 -6
  28. data/event_calendar_extension.rb +12 -6
  29. data/lib/calendar_period.rb +23 -18
  30. data/lib/event_calendar_tags.rb +13 -7
  31. data/radiant-event_calendar-extension.gemspec +3 -2
  32. metadata +6 -5
@@ -5,7 +5,7 @@
5
5
  %h3.title
6
6
  = link_to event_venue.title, edit_admin_event_venue_url(event_venue)
7
7
  %p.description
8
- = link_to "#{event_venue.events.count} #{pluralize(event_venue.events.count, 'event')}", admin_event_venue_events_url(event_venue)
8
+ = link_to "#{event_venue.events.count} #{pluralize(event_venue.events.count, t('event_venues_admin.index.event'))}", admin_event_venue_events_url(event_venue)
9
9
  - tbody.location_cell do
10
10
  %td.location
11
11
  = event_venue.address
@@ -16,4 +16,4 @@
16
16
  - tbody.modify_cell do
17
17
  %td.actions
18
18
  - confirmation = "Are you sure you want to delete entirely the event venue '#{event_venue.title}'?"
19
- = link_to image('minus') + ' remove', remove_admin_event_venue_url(event_venue), :class => 'action'
19
+ = link_to image('minus') + " " + t('event_venues_admin.index.remove'), remove_admin_event_venue_url(event_venue), :class => 'action'
@@ -3,46 +3,46 @@
3
3
 
4
4
  .main
5
5
  %p.title
6
- = f.label :title, "Venue or location title"
6
+ = f.label :title, t('event_venues_admin.form.title')
7
7
  = f.text_field :title, :class => 'textbox'
8
8
  - if or_choose && @venues.any?
9
- = link_to "choose an existing place", '#', :class => 'swapper', :rel => 'toggle[venue,new_venue]'
9
+ = link_to t('event_venues_admin.form.choose'), '#', :class => 'swapper', :rel => 'toggle[venue,new_venue]'
10
10
  - else
11
11
  %span.note
12
- We remember these details for you, so changes here affect every event occurring in this place
12
+ = t('event_venues_admin.form.choose_note')
13
13
 
14
14
  - if or_choose && @venues.any?
15
15
  %p.note
16
- If you've used this place before, please
17
- = link_to "choose it from the list", '#', :class => 'swapper', :rel => 'toggle[venue,new_venue]'
18
- so that you can update it globally
16
+ = t('event_venues_admin.form.choose_before')
17
+ = link_to t('event_venues_admin.form.choose_list'), '#', :class => 'swapper', :rel => 'toggle[venue,new_venue]'
18
+ = t('event_venues_admin.form.choose_after')
19
19
 
20
20
  .metadata
21
21
  %p.keywords
22
- = f.label :keywords
22
+ = f.label :keywords, t('event_venues_admin.form.keywords')
23
23
  = f.text_field :keywords, :class => "textbox"
24
24
 
25
25
  .main
26
26
  %p.location
27
- = f.label :location, "Location tag"
27
+ = f.label :location, t('event_venues_admin.form.location_tag')
28
28
  = f.text_field :location, :class => "textbox"
29
29
  %span.note
30
- This is used to recognise the venue in a calendar feed. It can be postcode, grid reference or any distinctive string.
30
+ = t('event_venues_admin.form.location_tag_note')
31
31
 
32
32
  %p.address
33
33
  - if defined? TinyMceFilter
34
34
  = link_to image('mce', :alt=> 'toolbar icon'), '#', :class => 'toggleMCE', :rel => (@event ? "toggle[event_event_venue_attributes_address]" : "toggle[event_venue_address]")
35
- = f.label :address, "Address or directions"
35
+ = f.label :address, t('event_venues_admin.form.address')
36
36
  = f.text_area :address, :class => 'textarea'
37
37
 
38
38
  .metadata
39
39
  %p.venue_postcode
40
- = f.label :postcode, "Postcode or grid reference"
40
+ = f.label :postcode, t('event_venues_admin.form.postcode')
41
41
  = f.text_field :postcode, :class => 'textbox place'
42
42
  %span.note
43
- This is only required if your address is unusual or you want these events to show on a map in a particular place.
43
+ = t('event_venues_admin.form.postcode_note')
44
44
 
45
45
  %p.url
46
- = f.label :url, "Location url"
46
+ = f.label :url, t('event_venues_admin.form.url')
47
47
  = f.text_field :url, :class => 'textbox'
48
48
 
@@ -1,5 +1,5 @@
1
1
  - @page_title = @event_venue.title
2
- - @page_title += ' - Calendar - ' + default_page_title
2
+ - @page_title += ' - ' + t('event_venues_admin.defaults.title') + ' - ' + default_page_title
3
3
 
4
4
  - include_stylesheet "admin/event_calendar"
5
5
  - include_javascript "admin/event_calendar"
@@ -11,9 +11,9 @@
11
11
  - render_region :main do |main|
12
12
  - main.edit_header do
13
13
  %h1
14
- Edit Location
14
+ =t('event_venues_admin.edit.title')
15
15
  %p
16
- Remember that changes you make here will affect the display of every event in this location.
16
+ =t('event_venues_admin.edit.description')
17
17
 
18
18
  - main.edit_form do
19
19
  - form_for [:admin, @event_venue] do |f|
@@ -34,7 +34,7 @@
34
34
  = updated_stamp @event_venue
35
35
  - form_bottom.edit_buttons do
36
36
  %p.buttons
37
- = f.submit "Update Venue", :name => "commit", :class => "button"
37
+ = f.submit t('event_venues_admin.edit.update'), :name => "commit", :class => "button"
38
38
  = save_model_and_continue_editing_button(@event_venue)
39
- or
40
- = link_to 'Cancel', admin_event_venues_url
39
+ = t('defaults.or')
40
+ = link_to t('defaults.cancel'), admin_event_venues_url
@@ -1,5 +1,5 @@
1
- - @page_title = 'Locations'
2
- - @page_title += ' - Calendar - ' + default_page_title
1
+ - @page_title = t('event_venues_admin.index.title')
2
+ - @page_title += ' - ' + t('event_venues_admin.defaults.title') + ' - ' + default_page_title
3
3
 
4
4
  - include_stylesheet "admin/event_calendar"
5
5
 
@@ -10,13 +10,14 @@
10
10
  - render_region :thead do |thead|
11
11
  - thead.title_header do
12
12
  %th.event
13
- %strong Place
13
+ %strong
14
+ = t('event_venues_admin.index.place')
14
15
  - thead.location_header do
15
- %th.location Address
16
+ %th.location= t('event_venues_admin.index.address')
16
17
  - thead.url_header do
17
- %th.keywords Website
18
+ %th.keywords= t('event_venues_admin.index.website')
18
19
  - thead.modify_header do
19
- %th.modify Modify
20
+ %th.modify= t('event_venues_admin.index.modify')
20
21
  %tbody
21
22
  - if @event_venues.any?
22
23
  - @event_venues.each do |event_venue|
@@ -24,11 +25,11 @@
24
25
  - else
25
26
  %tr
26
27
  %td.note{:colspan => admin.event_venue.index.tbody.length}
27
- No places in the system yet. You can create one here or when you add an event.
28
+ = t('event_venues_admin.index.no_places')
28
29
 
29
30
  - render_region :bottom do |bottom|
30
31
  - bottom.buttons do
31
32
  #actions
32
33
  = pagination_for @event_venues
33
34
  %ul
34
- %li= link_to image('plus') + " " + "new venue", new_admin_event_venue_url
35
+ %li= link_to image('plus') + " " + t('event_venues_admin.index.new'), new_admin_event_venue_url
@@ -1,5 +1,5 @@
1
1
  - @page_title = 'Add a location'
2
- - @page_title += ' - Calendar - ' + default_page_title
2
+ - @page_title += ' - ' + t('event_venues_admin.defaults.title') + ' - ' + default_page_title
3
3
 
4
4
  - include_stylesheet "admin/event_calendar"
5
5
  - include_javascript "admin/event_calendar"
@@ -12,9 +12,9 @@
12
12
  - render_region :main do |main|
13
13
  - main.edit_header do
14
14
  %h1
15
- Add an event location
15
+ = t('event_venues_admin.new.title')
16
16
  %p
17
- You can also do this whenever you enter a new event.
17
+ = t('event_venues_admin.new.text')
18
18
 
19
19
  - main.edit_form do
20
20
  - form_for [:admin, @event_venue] do |f|
@@ -35,7 +35,7 @@
35
35
  = updated_stamp @event_venue
36
36
  - form_bottom.edit_buttons do
37
37
  %p.buttons
38
- = f.submit "Create Venue", :name => "commit", :class => "button"
38
+ = f.submit t('event_venues_admin.new.create'), :name => "commit", :class => "button"
39
39
  = save_model_and_continue_editing_button(@event_venue)
40
- or
41
- = link_to 'Cancel', admin_event_venues_url
40
+ = t('defaults.or')
41
+ = link_to t('defaults.cancel'), admin_event_venues_url
@@ -1,22 +1,23 @@
1
1
  - include_stylesheet "admin/event_calendar"
2
2
 
3
- %h1 Remove location
3
+ %h1
4
+ = t('event_venues_admin.remove.title')
4
5
 
5
6
  %p
6
- Are you sure you want to
7
+ = t('event_venues_admin.remove.confirm')
7
8
  %strong.warning
8
- remove permanently
9
- the location
9
+ = t('event_venues_admin.remove.warning')
10
+ = t('event_venues_admin.remove.the_location')
10
11
  = link_to @event_venue.title + '?', edit_admin_event_venue_url(@event_venue)
11
12
 
12
13
  - if @event_venue.events.any?
13
14
  %br
14
- It is associated with
15
+ = t('event_venues_admin.remove.associated')
15
16
  = @event_venue.events.count
16
- = pluralize(@event_venue.events.count, 'event')
17
- that will remain in the calendar without a location:
17
+ = pluralize(@event_venue.events.count, t('event_venues_admin.remove.event'))
18
+ = t('event_venues_admin.remove.remain')
18
19
  - else
19
- It has no events.
20
+ = t('event_venues_admin.remove.no_events')
20
21
 
21
22
  - if @event_venue.events.any?
22
23
  %ul
@@ -28,6 +29,6 @@
28
29
 
29
30
  - form_for [:admin, @event_venue], :html => {:method => :delete} do
30
31
  %p.buttons
31
- %input.button{:type=>"submit", :value=>"Delete location"}
32
- or
33
- = link_to 'Cancel', admin_event_venues_url
32
+ %input.button{:type=>"submit", :value=>t('event_venues_admin.remove.delete')}
33
+ = t('defaults.or')
34
+ = link_to t('defaults.cancel'), admin_event_venues_url
@@ -8,7 +8,7 @@
8
8
  - tbody.date_cell do
9
9
  %td.datemark
10
10
  %a{:href => admin_event_url(master_event), :class => event.occurrence? ? 'occurrence' : 'master'}
11
- %span.month= Date::ABBR_MONTHNAMES[event.start_date.month]
11
+ %span.month= (I18n.t 'date.abbr_month_names')[event.start_date.month]
12
12
  %span.day= event.mday_padded
13
13
  - tbody.title_cell do
14
14
  %td.event
@@ -21,17 +21,17 @@
21
21
  - render_region :form do |form|
22
22
  - form.edit_event do
23
23
  %p.title
24
- = f.label :title, "Title"
24
+ = f.label :title, t('event_admin.form.title')
25
25
  = f.text_field :title, :class => 'textbox', :disabled => imported
26
26
 
27
27
  - form.edit_date do
28
28
  %p.start_date
29
- = f.label :start_date, "Start date and time"
29
+ = f.label :start_date, t('event_admin.form.start')
30
30
  = f.text_field :start_date, :class => 'textbox date time', :disabled => imported
31
31
  = f.check_box :all_day, :disabled => imported
32
- = f.label :all_day, 'All-day event?', :class => 'minor'
32
+ = f.label :all_day, t('event_admin.form.all_day'), :class => 'minor'
33
33
  %p.end_date
34
- = f.label :end_date, "end date and time"
34
+ = f.label :end_date, t('event_admin.form.end')
35
35
  = f.text_field :end_date, :class => 'textbox date time', :disabled => imported
36
36
 
37
37
  .recurrence
@@ -39,49 +39,50 @@
39
39
 
40
40
  %p.recurrence
41
41
  = rf.check_box 'active', :class => 'toggle', :rel => "toggle[recurrence_detail]", :disabled => imported
42
- = rf.label :active, 'Repeats', :class => 'minor'
42
+ = rf.label :active, t('event_admin.form.repeats'), :class => 'minor'
43
43
  %span.note
44
- (this is for separate similar events. For events that span several days you only need to set the start and end.)
44
+ = t('event_admin.form.repeat_note')
45
45
 
46
46
  %p#recurrence_detail
47
47
  %span#recurrence_interval
48
- = rf.label :interval, "Repeats every"
48
+ = rf.label :interval, t('event_admin.form.repeats_every')
49
49
  = rf.text_field :interval, :class => 'textbox short'
50
50
  %span#recurrence_period
51
51
  = rf.label :period, " "
52
- = rf.select :period, [['day', 'daily'], ['week', 'weekly'], ['month', 'monthly'], ['year', 'yearly']], {}, :class => 'textbox'
52
+ = rf.select :period, [[t('defaults.day'), 'daily'], [t('defaults.week'), 'weekly'], [t('defaults.month'), 'monthly'], [t('defaults.year'), 'yearly']], {}, :class => 'textbox'
53
53
  %span#recurrence_basis
54
54
  = rf.label :basis, " "
55
- = rf.select :basis, [['forever', 'unbounded'],['until', 'limit'], ['for', 'count']], {}, :class => 'textbox basis'
55
+ = rf.select :basis, [[t('defaults.forever'), 'unbounded'],[t('defaults.until'), 'limit'], [t('defaults.for'), 'count']], {}, :class => 'textbox basis'
56
56
  %span#recurrence_unbounded
57
57
  %span#recurrence_limit
58
58
  = rf.label :limiting_date, " "
59
59
  = rf.text_field :limiting_date, :class => 'textbox date'
60
60
  %span#recurrence_count
61
- = rf.label :limiting_count, "this many times:", :class => 'inline'
61
+ = rf.label :limiting_count, t('event_admin.form.many_times'), :class => 'inline'
62
62
  = rf.text_field :limiting_count, :class => 'textbox short'
63
63
 
64
64
  - form.edit_description do
65
65
  %p.description
66
66
  - if !imported && defined? TinyMceFilter
67
67
  = link_to image('mce', :alt=> 'toolbar icon'), '#', :class => 'toggleMCE', :rel => 'toggle[event_description]'
68
- = f.label :description, "Description"
68
+ = f.label :description, t('event_admin.form.description')
69
69
  = f.text_area :description, :class => 'textarea', :style => "width: 100%; height: 8em;", :disabled => imported
70
70
 
71
71
  - render_region :form_bottom do |form_bottom|
72
72
  - form_bottom.edit_metadata do
73
73
  .metadata
74
74
  %p.keywords
75
- = f.label :keywords
75
+ = f.label :keywords, t('event_admin.form.keywords')
76
76
  = f.text_field :keywords, :class => "textbox"
77
77
  %p.calendar
78
- = f.label :calendar_id, "Calendar"
78
+ = f.label :calendar_id, t('event_admin.form.calendar')
79
79
  = f.select :calendar_id, Calendar.all.map {|c| [c.name, c.id]}, {:include_blank => true}, :class => 'textbox', :disabled => imported
80
80
  %br
81
81
  %span.note
82
- This is optional but can be used to file your events or to mix local events into a subscribed calendar.
82
+ = t('event_admin.form.calendar_note')
83
+
83
84
  %p.url
84
- = f.label :url, "Event url"
85
+ = f.label :url, t('event_admin.form.event_url')
85
86
  = f.text_field :url, :class => 'textbox', :disabled => imported
86
87
 
87
88
  - form_bottom.edit_venue do
@@ -96,13 +97,13 @@
96
97
  -if @venues.any?
97
98
  #venue.main
98
99
  %p#existing_venue
99
- = f.label :event_venue_id, "Choose a location"
100
+ = f.label :event_venue_id, t('event_admin.form.choose_location')
100
101
  = f.select :event_venue_id, @venues.map {|v| [v.title, v.id]}, {:include_blank => true}, :class => 'textbox', :disabled => imported
101
102
  - if imported
102
- = link_to "edit this location", admin_event_venue_url(@event.event_venue)
103
+ = link_to t('event_admin.form.edit_location'), admin_event_venue_url(@event.event_venue)
103
104
  to add title, description and directions
104
105
  - else
105
- = link_to "add a new location", new_admin_event_venue_url, :class => 'swapper', :rel => "toggle[#{toggle_precedence.join(',')}]"
106
+ = link_to t('event_admin.form.new_location'), new_admin_event_venue_url, :class => 'swapper', :rel => "toggle[#{toggle_precedence.join(',')}]"
106
107
  #new_venue
107
108
  - @event.build_event_venue unless @event.event_venue
108
109
  - f.fields_for :event_venue, @event.event_venue do |ef|
@@ -116,5 +117,5 @@
116
117
  %p.buttons
117
118
  = save_model_button(@event)
118
119
  = save_model_and_continue_editing_button(@event)
119
- or
120
- = link_to 'Cancel', admin_events_url
120
+ = t('defaults.or')
121
+ = link_to t('defaults.cancel'), admin_events_url
@@ -1,5 +1,5 @@
1
1
  - @page_title = @event.title
2
- - @page_title += ' - Calendar - ' + default_page_title
2
+ - @page_title += ' - ' + t('event_admin.defaults.title') + ' - ' + default_page_title
3
3
 
4
4
  - include_stylesheet "admin/event_calendar"
5
5
  - include_javascript "admin/event_calendar"
@@ -7,7 +7,7 @@
7
7
  - render_region :main do |main|
8
8
  - main.edit_header do
9
9
  %h1
10
- Edit Event
10
+ = t('event_admin.edit.header')
11
11
 
12
12
  - main.edit_form do
13
13
  - form_for :event, @event, :url => admin_event_path(@calendar), :html => { :method => "put", :multipart => true } do |f|
@@ -1,6 +1,6 @@
1
- - @page_title = 'Events'
2
- - @page_title += " at #{@event_venue.title}" if @event_venue
3
- - @page_title += ' - Calendar - ' + default_page_title
1
+ - @page_title = t('event_admin.index.title')
2
+ - @page_title += t('defaults.at') + "#{@event_venue.title}" if @event_venue
3
+ - @page_title += ' - ' + t('event_admin.defaults.title') + ' - ' + default_page_title
4
4
 
5
5
  - include_stylesheet "admin/event_calendar"
6
6
 
@@ -14,21 +14,21 @@
14
14
  - thead.title_header do
15
15
  %th.event
16
16
  %strong
17
- Events
17
+ = t('event_admin.index.events')
18
18
  - if @event_venue
19
19
  at
20
20
  = @event_venue.title
21
- = link_to "(show all)", admin_events_url
21
+ = link_to t('event_admin.index.show_all'), admin_events_url
22
22
  - thead.calendar_header do
23
- %th.calendar Calendar
23
+ %th.calendar= t('event_admin.index.calendar')
24
24
  - thead.time_header do
25
- %th.date Time
25
+ %th.date= t('event_admin.index.time')
26
26
  - thead.location_header do
27
- %th.location Location
27
+ %th.location= t('event_admin.index.location')
28
28
  - thead.keywords_header do
29
- %th.keywords Keywords
29
+ %th.keywords= t('event_admin.index.keywords')
30
30
  - thead.modify_header do
31
- %th.modify Modify
31
+ %th.modify= t('event_admin.index.modify')
32
32
 
33
33
  %tbody
34
34
  - if @events.any?
@@ -37,11 +37,11 @@
37
37
  - else
38
38
  %tr
39
39
  %td.note{:colspan => admin.event.index.tbody.length}
40
- No events to display
40
+ =t('event_admin.index.no_events')
41
41
 
42
42
  - render_region :bottom do |bottom|
43
43
  - bottom.buttons do
44
44
  #actions
45
45
  = pagination_for @events
46
46
  %ul
47
- %li= link_to image('plus') + " " + "new event", new_admin_event_url
47
+ %li= link_to image('plus') + " " + t('event_admin.index.new'), new_admin_event_url
@@ -1,16 +1,15 @@
1
- %h1 Delete event
1
+ %h1
2
+ = t('event_admin.remove.title')
2
3
 
3
4
  %p
4
- Are you sure you want to
5
+ = t('event_admin.remove.message')
5
6
  %strong.warning
6
- remove permanently
7
- the event
7
+ = t('event_admin.remove.warning')
8
+ = t('event_admin.remove.event')
8
9
  = link_to(@event.title, edit_admin_event_url(@event)) + '?'
9
10
 
10
-
11
-
12
11
  - form_for [:admin, @event], :html => {:method => :delete} do
13
12
  %p.buttons
14
- %input.button{:type=>"submit", :value=>"Delete event"}/
15
- or
16
- = link_to 'Cancel', admin_events_url
13
+ %input.button{:type=>"submit", :value=>t('event_admin.remove.submit')}/
14
+ = t('defaults.or')
15
+ = link_to t('defaults.cancel'), admin_events_url
@@ -20,16 +20,19 @@
20
20
  = render :partial => 'events/keywords', :locals => {:event => event}
21
21
 
22
22
  %p.practicalities
23
- = event.summarize_start
23
+ %span.date
24
+ = event.summarize_start
24
25
  - if event.event_venue
25
- = t('at')
26
- - if event.event_venue.url
27
- = link_to event.event_venue.title, event.event_venue.url, :class => 'location'
28
- - else
29
- = event.event_venue.title
30
- = event.event_venue.address
26
+ %span.location
27
+ = t('event_page.at')
28
+ - if event.event_venue.url
29
+ = link_to event.event_venue.title, event.event_venue.url, :class => 'location'
30
+ - else
31
+ = event.event_venue.title
32
+ = event.event_venue.address
31
33
  - elsif event.location
32
- = event.location
34
+ %span.location
35
+ = event.location
33
36
  - unless repeating
34
37
  = event.description_paragraph
35
38