From 0d0c5700cbdcaf0c709960049515fb0ed0f1c604 Mon Sep 17 00:00:00 2001 From: Gopesh Tulsyan Date: Wed, 13 Aug 2014 14:05:25 +0530 Subject: [PATCH] Revert "Added route to root path for navigation from splash" --- app/helpers/application_helper.rb | 18 ++++++++++++++++++ app/views/conference/show.html.haml | 2 ++ app/views/layouts/_navigation.html.haml | 2 +- 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 44deebd4..04ac8a88 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -179,6 +179,24 @@ module ApplicationHelper result end + def default_brand + link_to CONFIG['name'], root_path, + class: 'navbar-brand', + title: 'Open Source Event Manager' + end + + def short_title_brand(conference) + link_to conference.short_title, conference_path(conference.short_title), + class: 'navbar-brand', + title: conference.title + end + + def brand + content_for(:brand) || + (default_brand if controller.class.parent == Admin) || + default_brand + end + def markdown(text) options = { autolink: true, diff --git a/app/views/conference/show.html.haml b/app/views/conference/show.html.haml index 500feb3c..3c0c9779 100644 --- a/app/views/conference/show.html.haml +++ b/app/views/conference/show.html.haml @@ -1,3 +1,5 @@ += content_for :brand do + = link_to @conference.short_title, conference_url(@conference.short_title), class: 'navbar-brand' = content_for :splash do .splash - if @conference.include_banner_in_splash? diff --git a/app/views/layouts/_navigation.html.haml b/app/views/layouts/_navigation.html.haml index 02b7f679..3b200e11 100644 --- a/app/views/layouts/_navigation.html.haml +++ b/app/views/layouts/_navigation.html.haml @@ -7,7 +7,7 @@ %span.icon-bar %span.icon-bar %span.icon-bar - = link_to CONFIG['name'], root_path, class: 'navbar-brand', title: 'Open Source Event Manager' + = brand .collapse.navbar-collapse - if content_for :splash_nav %ul.nav.navbar-nav#splash-nav