From ddd18c256fb5c2e9a1c0b59cb2afb3dba646d7b9 Mon Sep 17 00:00:00 2001 From: Petko Bordjukov Date: Wed, 15 Oct 2014 00:18:11 +0300 Subject: [PATCH] Tweak navbar --- app/views/layouts/management.html.slim | 31 ++++++++++++++------------ config/locales/bg.yml | 3 +++ 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/app/views/layouts/management.html.slim b/app/views/layouts/management.html.slim index 4daa68b..596347a 100644 --- a/app/views/layouts/management.html.slim +++ b/app/views/layouts/management.html.slim @@ -25,24 +25,27 @@ html = link_to management_path, class: 'brand' | Clarion ul.right-menu.collapsable + - if @conference.present? + li.dropdown + a.dropdown-toggle href="#" data-toggle="dropdown" + i.fa.fa-users.fa-fw> + span = @conference.title + span.caret< + - if Conference.count > 1 + ul.dropdown-menu role="menu" + - Conference.where.not(id: @conference.id).each do |conference| + li + = link_to conference.title, management_conference_path(conference) + li.dropdown a.dropdown-toggle href="#" data-toggle="dropdown" - i.fa.fa-users.fa-fw> - span = Conference.current.title + i.fa.fa-flag.fa-fw> + span = t "locales.#{I18n.locale}" span.caret< ul.dropdown-menu role="menu" - - Conference.all.each do |conference| - li - = link_to conference.title, '#' - - li - a href="#" - i.fa.fa-flag.fa-fw> - span = I18n.locale - li - a href="#" - i.fa.fa-cogs.fa-fw> - span = t :settings + - I18n.available_locales.each do |locale| + li.text-center + = link_to t("locales.#{locale}"), "?locale=#{locale}" .sidebar.collapsable ul.nav#side-menu li diff --git a/config/locales/bg.yml b/config/locales/bg.yml index e2145c4..e855399 100644 --- a/config/locales/bg.yml +++ b/config/locales/bg.yml @@ -20,6 +20,9 @@ # available at http://guides.rubyonrails.org/i18n.html. bg: + locales: + bg: БГ + en: EN actions: create: button: Създай %{model}