From ba1aed3c544adfbbaecdc203c3bc1a1b9f394cfb Mon Sep 17 00:00:00 2001 From: James Mason Date: Fri, 15 Aug 2014 18:28:14 -0700 Subject: [PATCH] Switch admin navigation glyphs to FontAwesome --- app/assets/javascripts/osem.js | 4 +-- app/views/layouts/_admin_sidebar.html.haml | 36 +++++++++---------- .../layouts/_admin_sidebar_index.html.haml | 10 +++--- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/app/assets/javascripts/osem.js b/app/assets/javascripts/osem.js index 1afb2c3a..82a72a77 100644 --- a/app/assets/javascripts/osem.js +++ b/app/assets/javascripts/osem.js @@ -104,11 +104,11 @@ $(function () { //Hide all except this $siblings = $(this).siblings().find("ul:visible"); $siblings.hide(); - $siblings.parent().find('span:nth-child(2)').toggleClass("glyphicon-chevron-down glyphicon-chevron-right"); + $siblings.parent().find('span:nth-child(2)').toggleClass("fa-chevron-down fa-chevron-right"); //show this $(this).find("ul").show(); - $(this).find('span:nth-child(2)').toggleClass("glyphicon-chevron-down glyphicon-chevron-right"); + $(this).find('span:nth-child(2)').toggleClass("fa-chevron-down fa-chevron-right"); } }); diff --git a/app/views/layouts/_admin_sidebar.html.haml b/app/views/layouts/_admin_sidebar.html.haml index fee18ecc..d37d35c0 100644 --- a/app/views/layouts/_admin_sidebar.html.haml +++ b/app/views/layouts/_admin_sidebar.html.haml @@ -1,25 +1,25 @@ %ul.nav.nav-stacked.nav-pills.mySidebar .btn-group %button{type:'button', class:'btn btn-default btn-link dropdown-toggle', 'data-toggle'=>'dropdown'} - %span.glyphicon.glyphicon-cog + %span.fa.fa-cog = @conference.short_title %span.caret %ul.dropdown-menu{role:'menu'} %li = link_to(admin_conference_index_path) do - %span.glyphicon.glyphicon-home + %span.fa.fa-home All Conferences - @conferences.each do |conference| - if can? :show, conference %li = link_to(admin_conference_path(conference.short_title)) do - %span.glyphicon.glyphicon-cog + %span.fa.fa-cog Manage = conference.short_title - if (current_user.is_admin) || (current_user.has_role? :organizer, :any) %li = link_to(new_admin_conference_path) do - %span.glyphicon.glyphicon-plus + %span.fa.fa-plus New Conference %hr - if can? :show, @conference @@ -56,35 +56,35 @@ - if can? :update, @conference.events.build %li{:class=> active_nav_li(admin_conference_events_path(@conference.short_title))} = link_to(admin_conference_events_path(@conference.short_title)) do - %span.glyphicon.glyphicon-comment + %span.fa.fa-comment Events - if can? :update, Registration.new(conference_id: @conference.id) %li{:class=> active_nav_li(admin_conference_registrations_path(@conference.short_title))} = link_to(admin_conference_registrations_path(@conference.short_title)) do - %span.glyphicon.glyphicon-user + %span.fa.fa-user Registrations - if can? :update, @conference.events.build %li{class: active_nav_li(admin_conference_schedule_path(@conference.short_title))} = link_to(admin_conference_schedule_path(@conference.short_title), target: '_blank') do - %span.glyphicon.glyphicon-calendar + %span.fa.fa-calendar Schedule - if can? :update, @conference %li{class: active_nav_li(admin_conference_campaigns_path(@conference.short_title))} = link_to(admin_conference_campaigns_path(@conference.short_title)) do - %span.glyphicon.glyphicon-bullhorn + %span.fa.fa-bullhorn Campaigns %hr - if can? :update, @conference.targets.build %li{:class=> "#{active_nav_li(admin_conference_targets_path(@conference.short_title))}"} = link_to(admin_conference_targets_path(@conference.short_title)) do - %span.glyphicon.glyphicon-flag + %span.fa.fa-flag Targets - if can? :index, @conference.venue %li{:class=> "#{active_nav_li(admin_conference_venue_info_path(@conference.short_title))} myAccordion"} = link_to(admin_conference_venue_info_path(@conference.short_title)) do - %span.glyphicon.glyphicon-road + %span.fa.fa-road Venue - %span.small.glyphicon.glyphicon-chevron-right + %span.small.fa.fa-chevron-right %ul.nav.nav-stacked.nav-pills.small.collapse.subNav - if can? :update, @conference.rooms.build %li{:class=> active_nav_li(admin_conference_rooms_path(@conference.short_title))} @@ -95,9 +95,9 @@ - if can? :update, @conference.sponsorship_levels.build %li{:class=> "#{active_nav_li(admin_conference_sponsorship_levels_path(@conference.short_title))} myAccordion" } = link_to(admin_conference_sponsorship_levels_path(@conference.short_title)) do - %span.glyphicon.glyphicon-star + %span.fa.fa-star Sponsorship - %span.small.glyphicon.glyphicon-chevron-right + %span.small.fa.fa-chevron-right %ul.nav.nav-stacked.nav-pills.small.collapse.subNav - if can? :update, @conference.sponsors.build %li{:class=> active_nav_li(admin_conference_sponsors_path(@conference.short_title))} @@ -105,19 +105,19 @@ - if can? :update, @conference.supporter_levels.build %li{ class: active_nav_li(admin_conference_supporter_levels_path(@conference.short_title)) } = link_to(admin_conference_supporter_levels_path(@conference.short_title)) do - %span.glyphicon.glyphicon-usd + %span.fa.fa-usd Supporter Levels - if can? :update, @conference.email_settings %li{:class=> active_nav_li(admin_conference_emails_path(@conference.short_title))} = link_to(admin_conference_emails_path(@conference.short_title)) do - %span.glyphicon.glyphicon-envelope + %span.fa.fa-envelope E-Mails - if can? :update, CallForPapers.new(conference_id: @conference.id) %li{:class=> "#{active_nav_li(admin_conference_callforpapers_path(@conference.short_title))} myAccordion"} = link_to(admin_conference_callforpapers_path(@conference.short_title)) do - %span.glyphicon.glyphicon-comment + %span.fa.fa-comment Call for papers - %span.small.glyphicon.glyphicon-chevron-right + %span.small.fa.fa-chevron-right %ul.nav.nav-stacked.nav-pills.small.collapse.subNav - if can? :update, @conference.tracks.build %li{:class=> active_nav_li(admin_conference_tracks_path(@conference.short_title))} @@ -131,7 +131,7 @@ - if can? :update, Question.new(conference_id: @conference.id) %li{:class=> active_nav_li(admin_conference_questions_path(@conference.short_title))} = link_to(admin_conference_questions_path(@conference.short_title)) do - %span.glyphicon.glyphicon-question-sign + %span.fa.fa-question Questions - if can? :manage, @conference %li{:class=> active_nav_li(roles_admin_conference_path(@conference.short_title))} diff --git a/app/views/layouts/_admin_sidebar_index.html.haml b/app/views/layouts/_admin_sidebar_index.html.haml index 219d0a56..352ff877 100644 --- a/app/views/layouts/_admin_sidebar_index.html.haml +++ b/app/views/layouts/_admin_sidebar_index.html.haml @@ -1,29 +1,29 @@ %ul.nav.nav-pills.nav-stacked.mySidebar .btn-group %button{type: 'button', class: 'btn btn-default btn-link dropdown-toggle', 'data-toggle'=>'dropdown'} - %span.glyphicon.glyphicon-home + %span.fa.fa-home All Conferences %span.caret %ul.dropdown-menu{role: 'menu'} %li = link_to(admin_conference_index_path) do - %span.glyphicon.glyphicon-home + %span.fa.fa-home All Conferences - @conferences.each do |conference| - if can? :show, conference %li = link_to(admin_conference_path(conference.short_title)) do - %span.glyphicon.glyphicon-cog + %span.fa.fa-cog Manage = conference.short_title - if (current_user.is_admin) || (current_user.has_role? :organizer, :any) %li = link_to(new_admin_conference_path) do - %span.glyphicon.glyphicon-plus + %span.fa.fa-plus New Conference - if can? :index, User %hr %li = link_to(admin_users_path) do - %span.glyphicon.glyphicon-user + %span.fa.fa-user Users