event_calendar_engine 0.1.3 → 0.1.4

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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.3
1
+ 0.1.4
@@ -22,16 +22,28 @@ module EventCalendar::ApplicationHelper
22
22
  end
23
23
 
24
24
  def link_to_events(wrapper_options={}, link_options={})
25
+ return unless has_authorization?(:read, Event.new)
25
26
  link_wrapper(events_path, wrapper_options, link_options.reverse_merge!({
26
27
  :link_text => 'Event Calendar'
27
28
  }))
28
29
  end
30
+
31
+ def link_to_event_revisions(wrapper_options={}, link_options={})
32
+ return unless has_authorization?(:read, EventRevision.new)
33
+ link_wrapper(event_revisions_path, {
34
+ :no_wrapper => true
35
+ }.merge!(wrapper_options), {
36
+ :link_text => 'Browse Event Revisions'
37
+ }.merge!(link_options))
38
+ end
29
39
 
30
- def link_to_new_event(wrapper_options={})
40
+ def link_to_new_event(wrapper_options={}, link_options={})
31
41
  return unless has_authorization?(:create, Event.new)
32
- link_wrapper(new_event_path, wrapper_options, {
42
+ link_wrapper(new_event_path, {
43
+ :no_wrapper => true
44
+ }.merge!(wrapper_options), {
33
45
  :link_text => "Create New Event"
34
- })
46
+ }.merge!(link_options))
35
47
  end
36
48
 
37
49
  def link_to_deleted_events(wrapper_options={})
@@ -10,7 +10,7 @@
10
10
  <tbody>
11
11
  <% for event in @deleted_events %>
12
12
  <tr style="background-color: #f5c6d7;">
13
- <td><%= link_to event.name, event_path(event) %></td>
13
+ <td><%= link_to event.name, event_revision_path(event) %></td>
14
14
  <td><%= truncate(event.location, :length => 100) %></td>
15
15
  <td><%= truncate(event.description, :length => 100) %></td>
16
16
  <td><%= link_to 'restore', restore_event_revision_path(event),
@@ -1,5 +1,7 @@
1
+ <% if @event_revision.revisable_is_current %>
1
2
  <p>
2
3
  <%= link_to "< Current Version", event_path(@event_revision.current_revision), :class => 'fake_button' %>
3
4
  </p>
5
+ <% end %>
4
6
  <h1>Event - Version: <%= @event_revision.revision_number %><hr /></h1>
5
7
  <%= render :partial => 'events/event_details', :object => @event_revision %>
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: event_calendar_engine
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 3
10
- version: 0.1.3
9
+ - 4
10
+ version: 0.1.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jason LaPier