Merge branch 'master' into organization-link
This commit is contained in:
commit
1c623b1c8a
4 changed files with 41 additions and 9 deletions
|
|
@ -171,4 +171,18 @@ module ApplicationHelper
|
|||
def hidden_if_conference_over(conference)
|
||||
'hidden' if Date.today > conference.end_date
|
||||
end
|
||||
|
||||
def nav_root_link_for(conference)
|
||||
link_text = (
|
||||
conference.try(:organization).try(:name) ||
|
||||
ENV['OSEM_NAME'] ||
|
||||
'OSEM'
|
||||
)
|
||||
link_to(
|
||||
link_text,
|
||||
root_path,
|
||||
class: 'navbar-brand',
|
||||
title: 'Open Source Event Manager'
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -13,10 +13,8 @@
|
|||
%span.icon-bar
|
||||
%span.icon-bar
|
||||
%span.icon-bar
|
||||
- if conference.nil? || conference.new_record?
|
||||
= link_to (ENV['OSEM_NAME'] || 'OSEM'), root_path, class: 'navbar-brand', title: 'Open Source Event Manager'
|
||||
- else
|
||||
= link_to conference.organization.name, organizations_path, class: 'navbar-brand', title: 'Open Source Event Manager'
|
||||
= nav_root_link_for conference
|
||||
|
||||
.collapse.navbar-collapse#main-nav
|
||||
- if content_for :splash_nav
|
||||
%ul.nav.navbar-nav#splash-nav
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue