From edab06b2531ace5bf902db64fd83cb80aafd0037 Mon Sep 17 00:00:00 2001 From: Chrisbr Date: Wed, 14 May 2014 10:38:36 +0200 Subject: [PATCH] Fix dropdown on event index page --- app/views/admin/events/index.html.haml | 20 ++++++++++---------- spec/features/proposal_spec.rb | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/app/views/admin/events/index.html.haml b/app/views/admin/events/index.html.haml index 35fa81b7..871bc031 100644 --- a/app/views/admin/events/index.html.haml +++ b/app/views/admin/events/index.html.haml @@ -71,25 +71,25 @@ - l = link_to "Change", edit_admin_conference_event_speaker_path(@conference.short_title, event), :remote => true = "(#{l})".html_safe %td - .dropdown - = link_to "#", :class => "dropdown-toggle", :id => "type-dropdown" do + .btn-group + %button{:type=>"button", :class=>"btn btn-link dropdown-toggle", "data-toggle"=>"dropdown"} - if event.event_type.nil? Event Type - else = event.event_type.title - + %span.caret %ul.dropdown-menu - @event_types.each do |type| %li= link_to type.title, admin_conference_event_path(@conference.short_title, event, :event_type_id => type.id) , :method => :put, :event_type_id => type.id %td - .dropdown - = link_to "#", :class => "dropdown-toggle", :id => "track-dropdown" do + .btn-group + %button{:type=>"button", :class=>"btn btn-link dropdown-toggle", "data-toggle"=>"dropdown"} - if event.track.nil? Track - else = event.track.name - + %span.caret %ul.dropdown-menu - @tracks.each do |track| %li= link_to track.name, admin_conference_event_path(@conference.short_title, event, :track_id => track.id) , @@ -100,11 +100,11 @@ - if event.state == "withdrawn" Withdrawn - else - .dropdown - = link_to "#", :class => "dropdown-toggle" do + .btn-group + %button{:type=>"button", :class=>"btn btn-link dropdown-toggle", "data-toggle"=>"dropdown"} = event.state.humanize - - %ul.dropdown-menu + %span.caret + %ul.dropdown-menu{:role=>"menu"} - if event.transition_possible? :accept %li= link_to 'Accept event', update_state_admin_conference_event_path(@conference.short_title, event, transition: :accept), diff --git a/spec/features/proposal_spec.rb b/spec/features/proposal_spec.rb index 4f8a62f6..950dd2c4 100644 --- a/spec/features/proposal_spec.rb +++ b/spec/features/proposal_spec.rb @@ -66,7 +66,7 @@ feature Event do visit admin_conference_events_path(conference.short_title) expect(page.has_content?('Example Proposal')).to be true - click_link 'New' + click_button 'New' click_link "accept_event_#{event.id}" expect(page.has_content?('Unconfirmed')).to be true