Skip to content
Snippets Groups Projects
Commit 30c203b4 authored by Arnaud Levy's avatar Arnaud Levy
Browse files

url

parent 8dae3802
No related branches found
No related tags found
No related merge requests found
......@@ -136,6 +136,14 @@ class Communication::Website::Agenda::Event < ApplicationRecord
abouts_with_agenda_block
end
def url
return unless published
return if website.url.blank?
return if website.special_page(Communication::Website::Page::CommunicationAgenda)&.path.blank?
return if current_permalink_in_website(website).blank?
"#{Static.remove_trailing_slash website.url}#{Static.clean_path current_permalink_in_website(website).path}"
end
def to_s
"#{title}"
end
......
......@@ -37,6 +37,10 @@
<% end %>
<% content_for :action_bar_right do %>
<%= link_to t('open'),
@event.url,
target: :_blank,
class: 'btn btn-light btn-xs' if @event.url %>
<%= edit_link @event %>
<%= publish_link @event %>
<% end %>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment