Using save navigation
This commit is contained in:
parent
53971c7b0c
commit
9e367a88ef
|
@ -18,7 +18,7 @@ class EventCallbacks
|
||||||
return unless event.will_save_change_to_moderated? && event.moderated?
|
return unless event.will_save_change_to_moderated? && event.moderated?
|
||||||
|
|
||||||
event.decision_time = Time.zone.now
|
event.decision_time = Time.zone.now
|
||||||
create_repeats event if event.repeat.try(:positive?) && event.rule
|
create_repeats event if event.repeat&.positive? && event.rule
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.after_update(event)
|
def self.after_update(event)
|
||||||
|
|
|
@ -6,5 +6,5 @@
|
||||||
= link_to event do
|
= link_to event do
|
||||||
%strong.city{ title: event.address }= event.city
|
%strong.city{ title: event.address }= event.city
|
||||||
= event.title
|
= event.title
|
||||||
- if event.repeat.positive?
|
- if event.repeat&.positive?
|
||||||
%em.fa.fa-repeat{ title: event.schedule }
|
%em.fa.fa-repeat{ title: event.schedule }
|
||||||
|
|
|
@ -64,14 +64,14 @@
|
||||||
encode: (request.format == 'text/html' ? :javascript : nil),
|
encode: (request.format == 'text/html' ? :javascript : nil),
|
||||||
replace_at: ' CHEZ ', replace_dot: ' POINT '
|
replace_at: ' CHEZ ', replace_dot: ' POINT '
|
||||||
|
|
||||||
- if @event.tags && @event.tags.present?
|
- if @event.tags&.present?
|
||||||
%p.tags
|
%p.tags
|
||||||
%em.fa.fa-tags
|
%em.fa.fa-tags
|
||||||
%span.label= Event.human_attribute_name :tags
|
%span.label= Event.human_attribute_name :tags
|
||||||
- @event.tags.each do |tag|
|
- @event.tags.each do |tag|
|
||||||
= link_to tag, tag_path(tag.name), rel: :tag
|
= link_to tag, tag_path(tag.name), rel: :tag
|
||||||
|
|
||||||
- if @event.repeat > 0 && @event.rule
|
- if @event.repeat&.positive? && @event.rule
|
||||||
%h3
|
%h3
|
||||||
%em.fa.fa-repeat
|
%em.fa.fa-repeat
|
||||||
= @event.schedule
|
= @event.schedule
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
- if @event.contact.present?
|
- if @event.contact.present?
|
||||||
!= display_attr @event, :contact
|
!= display_attr @event, :contact
|
||||||
!= display_attr @event, :tag_list, @event.tag_list
|
!= display_attr @event, :tag_list, @event.tag_list
|
||||||
- if @event.repeat > 0
|
- if @event.repeat&.positive?
|
||||||
= display_attr @event, :repeat
|
= display_attr @event, :repeat
|
||||||
= display_attr @event, :rule, t(@event.rule, scope: 'activerecord.attributes.event.rule_values')
|
= display_attr @event, :rule, t(@event.rule, scope: 'activerecord.attributes.event.rule_values')
|
||||||
\
|
\
|
||||||
|
|
Loading…
Reference in New Issue