diff --git a/app/assets/javascripts/osem.js b/app/assets/javascripts/osem.js index a6e86afb..e3d4a94f 100644 --- a/app/assets/javascripts/osem.js +++ b/app/assets/javascripts/osem.js @@ -70,6 +70,19 @@ $(function() { $(".comment-reply").hide(); $(".user-details-popover").popover(); $("#comments-div").hide(); + + $( ".myAccordion" ).mouseover(function() { + if(!$(this).find("ul").is(':visible')){ + //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"); + + //show this + $(this).find("ul").show(); + $(this).find('span:nth-child(2)').toggleClass("glyphicon-chevron-down glyphicon-chevron-right"); + } + }); }); function word_count(text, divId, maxcount) { diff --git a/app/assets/stylesheets/osem.css b/app/assets/stylesheets/osem.css index 87596c96..5238c4dd 100644 --- a/app/assets/stylesheets/osem.css +++ b/app/assets/stylesheets/osem.css @@ -1,33 +1,53 @@ html { - position: relative; - min-height: 100%; + position: relative; + min-height: 100%; } + body { - /* Margin bottom by footer height */ - margin-bottom: 60px; + /* Margin bottom by footer height */ + margin-bottom: 60px; + /* Margin bottom by navbar height */ + padding-top: 60px; } body > #messages { -padding: 60px 15px 0; -} - -body > #content { -padding-bottom: 60px; + padding: 60px 15px 0; } #footer { - position: absolute; - bottom: 0; - width: 100%; - /* Set the fixed height of the footer here */ - height: 60px; - background-color: #f5f5f5; + position: absolute; + bottom: 0; + width: 100%; + /* Set the fixed height of the footer here */ + height: 60px; + background-color: #f5f5f5; } .container .text-muted { -margin: 20px 0; + margin: 20px 0; } #footer > .container { -padding: 15px; + padding: 15px; +} + +.nav > li.nav-header > a { + cursor: default; + font-size: 12px; + font-weight: bold; + text-transform: uppercase; +} + +.glyphicon { + margin-right: 10px; +} + +.mySidebar hr { + margin: 1px; +} + +@media only screen and (max-width: 768px) { + .mySidebar ul.subNav { + display: block; + } } diff --git a/app/views/admin/callforpapers/show.html.haml b/app/views/admin/callforpapers/show.html.haml index fe168abd..a600dac9 100644 --- a/app/views/admin/callforpapers/show.html.haml +++ b/app/views/admin/callforpapers/show.html.haml @@ -1,7 +1,5 @@ -.row-fluid - .col-md-3 - = render 'admin/conference/sidebar' - .col-md-9 +.row + .col-md-8 = semantic_form_for(@cfp, :url => admin_conference_callforpapers_path(@conference.short_title),:html => {:multipart => true}) do |f| = f.input :start_date, :as => :string, :input_html => { :id => "conference-start-datepicker", :readonly => "readonly" } = f.input :end_date, :as => :string, :input_html => { :id => "conference-end-datepicker", :readonly => "readonly" } diff --git a/app/views/admin/conference/_sidebar.html.haml b/app/views/admin/conference/_sidebar.html.haml deleted file mode 100644 index 769e4532..00000000 --- a/app/views/admin/conference/_sidebar.html.haml +++ /dev/null @@ -1,26 +0,0 @@ -.well.sidebar-nav - %ul.nav.nav-pills.nav-stacked - %li{:class=> active_nav_li(admin_conference_path(@conference.short_title))} - = link_to "Conference", admin_conference_path(@conference.short_title) - %li{:class=> active_nav_li(admin_conference_venue_info_path(@conference.short_title))} - = link_to "Venue", admin_conference_venue_info_path(@conference.short_title) - %li{:class=> active_nav_li(admin_conference_callforpapers_path(@conference.short_title))} - = link_to "Call for Papers", admin_conference_callforpapers_path(@conference.short_title) - %li{:class=> active_nav_li(admin_conference_rooms_path(@conference.short_title))} - = link_to "Rooms", admin_conference_rooms_path(@conference.short_title) - %li{:class=> active_nav_li(admin_conference_tracks_path(@conference.short_title))} - = link_to "Tracks", admin_conference_tracks_path(@conference.short_title) - %li{:class=> active_nav_li(admin_conference_eventtypes_path(@conference.short_title))} - = link_to "Event Types", admin_conference_eventtypes_path(@conference.short_title) - %li{:class=> active_nav_li(admin_conference_difficulty_levels_path(@conference.short_title))} - = link_to "Difficulty Levels", admin_conference_difficulty_levels_path(@conference.short_title) - %li{:class=> active_nav_li(admin_conference_social_events_path(@conference.short_title))} - = link_to "Social Events", admin_conference_social_events_path(@conference.short_title) - %li{:class=> active_nav_li(admin_conference_supporter_levels_path(@conference.short_title))} - = link_to "Supporter Levels", admin_conference_supporter_levels_path(@conference.short_title) - %li{:class=> active_nav_li(admin_conference_emails_path(@conference.short_title))} - = link_to "Emails", admin_conference_emails_path(@conference.short_title) - %li{:class=> active_nav_li(admin_conference_questions_path(@conference.short_title))} - = link_to "Questions", admin_conference_questions_path(@conference.short_title) - %li{:class=> active_nav_li(admin_conference_volunteers_info_path(@conference.short_title))} - = link_to "Volunteers", admin_conference_volunteers_info_path(@conference.short_title) diff --git a/app/views/admin/conference/new.html.haml b/app/views/admin/conference/new.html.haml index f77d9d0b..c0d714ec 100644 --- a/app/views/admin/conference/new.html.haml +++ b/app/views/admin/conference/new.html.haml @@ -1,5 +1,5 @@ .row - .col-md-6.col-md-offset-3 + .col-md-8 = semantic_form_for(@conference, :url => admin_conference_index_path) do |f| = f.inputs 'Basic Information' do = f.input :title, hint: "The name of your conference as it shall appear throughout the site. Example: 'OpenSUSE Conference 2013'", diff --git a/app/views/admin/conference/show.html.haml b/app/views/admin/conference/show.html.haml index b246ac10..0176180c 100644 --- a/app/views/admin/conference/show.html.haml +++ b/app/views/admin/conference/show.html.haml @@ -1,7 +1,5 @@ .row - .col-md-3 - = render :partial => "sidebar" - .col-md-9 + .col-md-8 = semantic_form_for(@conference, :url => admin_conference_path(@conference.short_title),:html => {:multipart => true}) do |f| = f.input :title, :hint => "The full name of the conference, such as 'OpenSUSE Conference 2013'" = f.input :short_title, :hint => "A short title, such as 'osc2013', to be used in URLs" diff --git a/app/views/admin/dietchoices/diets_list.html.haml b/app/views/admin/dietchoices/diets_list.html.haml index bec5fdc2..c4fdd8d9 100644 --- a/app/views/admin/dietchoices/diets_list.html.haml +++ b/app/views/admin/dietchoices/diets_list.html.haml @@ -1,7 +1,5 @@ .row - .span3 - = render 'admin/conference/sidebar', :activated => "Diet" - .span9 + .col-md-8 = semantic_form_for(@conference, :url => admin_conference_dietary_update_path(@conference.short_title)) do |f| = f.input :use_dietary_choices, :label => false = dynamic_association :dietary_choices, "Dietary Choices", f diff --git a/app/views/admin/difficulty_levels/index.html.haml b/app/views/admin/difficulty_levels/index.html.haml index 124c47bd..88d844dc 100644 --- a/app/views/admin/difficulty_levels/index.html.haml +++ b/app/views/admin/difficulty_levels/index.html.haml @@ -1,7 +1,5 @@ .row - .col-md-3 - = render 'admin/conference/sidebar' - .col-md-9 + .col-md-8 = semantic_form_for @conference, :url => admin_conference_difficulty_level_path(@conference.short_title, @conference.difficulty_levels) do |f| = f.input :use_difficulty_levels, :label => false = dynamic_association :difficulty_levels, "Difficulty_Levels", f diff --git a/app/views/admin/emails/index.html.haml b/app/views/admin/emails/index.html.haml index 77c170d4..c33b0596 100644 --- a/app/views/admin/emails/index.html.haml +++ b/app/views/admin/emails/index.html.haml @@ -1,7 +1,5 @@ .row - .col-md-3 - = render 'admin/conference/sidebar' - .col-md-9 + .col-md-8 = link_to "Template Help", "#", :id => "template-help-link" #template-help Valid attributes: diff --git a/app/views/admin/eventtypes/index.html.haml b/app/views/admin/eventtypes/index.html.haml index ecbe663c..ad9256d1 100644 --- a/app/views/admin/eventtypes/index.html.haml +++ b/app/views/admin/eventtypes/index.html.haml @@ -1,7 +1,5 @@ .row - .col-md-3 - = render 'admin/conference/sidebar' - .col-md-9 + .col-md-8 = semantic_form_for(@conference, url: admin_conference_eventtypes_path(@conference.short_title, @conference.event_types)) do |f| = dynamic_association :event_types, "Event Types", f = f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"} diff --git a/app/views/admin/questions/index.html.haml b/app/views/admin/questions/index.html.haml index ba66cd50..decc6b41 100644 --- a/app/views/admin/questions/index.html.haml +++ b/app/views/admin/questions/index.html.haml @@ -1,7 +1,5 @@ .row - .col-md-3 - = render 'admin/conference/sidebar' - .col-md-9 + .col-md-8 .pull-right %b= link_to "Create New Question","#", "data-toggle" => "modal", "data-target" => "#new-question", :class => "btn btn-success" %br diff --git a/app/views/admin/rooms/index.html.haml b/app/views/admin/rooms/index.html.haml index e2021354..dfb23884 100644 --- a/app/views/admin/rooms/index.html.haml +++ b/app/views/admin/rooms/index.html.haml @@ -1,7 +1,5 @@ .row - .col-md-3 - = render 'admin/conference/sidebar' - .col-md-9 + .col-md-8 = semantic_form_for(@conference, :url => admin_conference_room_path(@conference.short_title, @conference.rooms)) do |f| = dynamic_association :rooms, "Rooms", f = f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"} diff --git a/app/views/admin/social_events/index.html.haml b/app/views/admin/social_events/index.html.haml index c6cf1f1a..aa724fb8 100644 --- a/app/views/admin/social_events/index.html.haml +++ b/app/views/admin/social_events/index.html.haml @@ -1,7 +1,5 @@ .row - .col-md-3 - = render 'admin/conference/sidebar' - .col-md-9 + .col-md-8 = semantic_form_for(@conference, :url => admin_conference_social_event_path(@conference.short_title, @conference.social_events)) do |f| = dynamic_association :social_events, "Social Events", f = f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"} diff --git a/app/views/admin/supporter_levels/index.html.haml b/app/views/admin/supporter_levels/index.html.haml index fa809dbc..71a9305a 100644 --- a/app/views/admin/supporter_levels/index.html.haml +++ b/app/views/admin/supporter_levels/index.html.haml @@ -1,7 +1,5 @@ .row - .col-md-3 - = render 'admin/conference/sidebar' - .col-md-9 + .col-md-8 = semantic_form_for(@conference, :url => admin_conference_supporter_level_path(@conference.short_title, @conference.supporter_levels)) do |f| = f.input :use_supporter_levels, :label => false = dynamic_association :supporter_levels, "Supporter Levels", f diff --git a/app/views/admin/tracks/index.html.haml b/app/views/admin/tracks/index.html.haml index 0076776a..27bdedde 100644 --- a/app/views/admin/tracks/index.html.haml +++ b/app/views/admin/tracks/index.html.haml @@ -1,7 +1,5 @@ .row - .col-md-3 - = render 'admin/conference/sidebar' - .col-md-9 + .col-md-8 = semantic_form_for(@conference, :url => admin_conference_track_path(@conference.short_title, @conference.tracks)) do |f| = dynamic_association :tracks, "Tracks", f = f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"} diff --git a/app/views/admin/venue/venue_info.html.haml b/app/views/admin/venue/venue_info.html.haml index 61dd8bbf..af339af2 100644 --- a/app/views/admin/venue/venue_info.html.haml +++ b/app/views/admin/venue/venue_info.html.haml @@ -1,7 +1,5 @@ .row - .col-md-3 - = render 'admin/conference/sidebar' - .col-md-9 + .col-md-8 = semantic_form_for(@venue, :url => admin_conference_venue_update_path(@conference.short_title),:html => {:multipart => true}) do |f| = f.input :name, :input_html => {:rows => 1} = f.input :address, :input_html => {:rows => 1} diff --git a/app/views/admin/volunteers/index.html.haml b/app/views/admin/volunteers/index.html.haml index a02c0989..3f1e5864 100644 --- a/app/views/admin/volunteers/index.html.haml +++ b/app/views/admin/volunteers/index.html.haml @@ -1,7 +1,5 @@ .row - .col-md-3 - = render 'admin/conference/sidebar' - .col-md-9 + .col-md-8 = semantic_form_for(@conference, :url => admin_conference_volunteers_update_path(@conference.short_title)) do |f| = f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"} %br diff --git a/app/views/layouts/_admin.html.haml b/app/views/layouts/_admin.html.haml new file mode 100644 index 00000000..a9add1ac --- /dev/null +++ b/app/views/layouts/_admin.html.haml @@ -0,0 +1,14 @@ +.container-fluid + .row + .col-md-2 + - if @conference and not @conference.short_title.nil? + -# Individual admin sidebar + = render 'layouts/admin_sidebar' + -else + -# Index admin sidebar + = render 'layouts/admin_sidebar_index' + .col-md-10 + #messages + =render 'layouts/messages' + #content + = yield \ No newline at end of file diff --git a/app/views/layouts/_admin_menu.html.haml b/app/views/layouts/_admin_menu.html.haml deleted file mode 100644 index ce7ab03a..00000000 --- a/app/views/layouts/_admin_menu.html.haml +++ /dev/null @@ -1,30 +0,0 @@ -%ul.nav.navbar-nav - %li{:class=> active_nav_li(admin_conference_path(@conference.short_title))} - = link_to(admin_conference_path(@conference.short_title)) do - %span.glyphicon.glyphicon-wrench - Settings - %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 - Registrations - - if @conference.use_supporter_levels? and @conference.supporter_levels.length > 0 - %li{:class=> active_nav_li(admin_conference_supporters_path(@conference.short_title))} - = link_to(admin_conference_supporters_path(@conference.short_title)) do - %span.glyphicon.glyphicon-star - Supporters - %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 - Events - %li{:class=> active_nav_li(admin_conference_stats_path(@conference.short_title))} - = link_to(admin_conference_stats_path(@conference.short_title)) do - %span.glyphicon.glyphicon-tasks - Statistics - %li{:class=> active_nav_li(admin_conference_volunteers_list_path(@conference.short_title))} - = link_to(admin_conference_volunteers_list_path(@conference.short_title)) do - %span.glyphicon.glyphicon-user - Volunteers - %li - = link_to(admin_conference_schedule_path(@conference.short_title), :target => "_blank") do - %span.glyphicon.glyphicon-calendar - Schedule \ No newline at end of file diff --git a/app/views/layouts/_admin_sidebar.html.haml b/app/views/layouts/_admin_sidebar.html.haml new file mode 100644 index 00000000..d3109a49 --- /dev/null +++ b/app/views/layouts/_admin_sidebar.html.haml @@ -0,0 +1,71 @@ +%ul.nav.nav-stacked.mySidebar + .btn-group + %button{type:'button', class:'btn btn-default btn-link dropdown-toggle', 'data-toggle'=>'dropdown'} + %span.glyphicon.glyphicon-home + Conferences + %span.caret + %ul.dropdown-menu{role:'menu'} + %li + = link_to(admin_conference_index_path) do + %span.glyphicon.glyphicon-dashboard + All + - @conferences.each do |conference| + %li + = link_to(admin_conference_path(conference.short_title)) do + %span.glyphicon.glyphicon-cog + Manage + = conference.short_title + %li + = link_to(new_admin_conference_path) do + %span.glyphicon.glyphicon-plus + New Conference + %hr + %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 + Registrations + %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 + Events + %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 + Shedule + %hr + %li.nav-header + %a + %span.glyphicon.glyphicon-wrench + Settings + %li{:class=> active_nav_li(admin_conference_path(@conference.short_title))} + = link_to(admin_conference_path(@conference.short_title)) do + %span.glyphicon.glyphicon-cog + Conference + %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-calendar + Venue + %span.small.glyphicon.glyphicon-chevron-right + %ul.nav.nav-stacked.small.collapse.subNav + %li{:class=> active_nav_li(admin_conference_rooms_path(@conference.short_title))} + = link_to 'Rooms', admin_conference_rooms_path(@conference.short_title) + %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 + E-Mails + %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 + Call for papers + %span.small.glyphicon.glyphicon-chevron-right + %ul.nav.nav-stacked.small.collapse.subNav + %li{:class=> active_nav_li(admin_conference_tracks_path(@conference.short_title))} + = link_to 'Tracks', admin_conference_tracks_path(@conference.short_title) + %li{:class=> active_nav_li(admin_conference_eventtypes_path(@conference.short_title))} + = link_to 'Event types', admin_conference_eventtypes_path(@conference.short_title) + %li{:class=> active_nav_li(admin_conference_difficulty_levels_path(@conference.short_title))} + = link_to 'Difficulty levels', admin_conference_difficulty_levels_path(@conference.short_title) + %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 + Questions diff --git a/app/views/layouts/_admin_sidebar_index.html.haml b/app/views/layouts/_admin_sidebar_index.html.haml new file mode 100644 index 00000000..fec3c319 --- /dev/null +++ b/app/views/layouts/_admin_sidebar_index.html.haml @@ -0,0 +1,30 @@ +%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 + Conferences + %span.caret + %ul.dropdown-menu{role: 'menu'} + %li + = link_to(admin_conference_index_path) do + %span.glyphicon.glyphicon-dashboard + All + - @conferences.each do |conference| + %li + = link_to(admin_conference_path(conference.short_title)) do + %span.glyphicon.glyphicon-cog + Manage + = conference.short_title + %li + = link_to(new_admin_conference_path) do + %span.glyphicon.glyphicon-plus + New Conference + %hr + %li + = link_to(admin_users_path) do + %span.glyphicon.glyphicon-user + Users + %li + = link_to(admin_people_path) do + %span.glyphicon.glyphicon-star-empty + People diff --git a/app/views/layouts/_messages.html.haml b/app/views/layouts/_messages.html.haml index 7fe9cd02..223deb38 100644 --- a/app/views/layouts/_messages.html.haml +++ b/app/views/layouts/_messages.html.haml @@ -1,3 +1,12 @@ +%noscript + :css + #content { + display: none; + } + %h2 + JavaScript is not enabled + %p + OSEM requires JavaScript to be enabled to function. Please turn on JavaScript in your browser's settings and reload the page to continue. - flash.each do |type, message| %div{:class=>"alert alert-dismissable #{bootstrap_class_for(type)}", :id=>"flash"} .button.close{"data-dismiss" => "alert", "aria-hidden"=>"true"} diff --git a/app/views/layouts/_navigation.html.haml b/app/views/layouts/_navigation.html.haml index f11e5851..6210f209 100644 --- a/app/views/layouts/_navigation.html.haml +++ b/app/views/layouts/_navigation.html.haml @@ -14,11 +14,7 @@ - if @conference && !@conference.short_title.nil? %p.navbar-text = @conference.short_title - - if user_signed_in? - - if has_role?(current_user, "admin") || has_role?(current_user, "organizer") - - if controller.class.name.split("::").first=="Admin" - - if @conference and not @conference.short_title.nil? - = render 'layouts/admin_menu' + -if user_signed_in? %ul.nav.navbar-nav.navbar-right %li.dropdown %a.dropdown-toggle{"data-toggle" => "dropdown", :href => "#", id: "current-user-detail"} diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 1baf93ad..0a9063d1 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -17,21 +17,16 @@ = yield(:head) %body = render 'layouts/navigation' - .container#messages - .row - .col-md-12 - = render 'layouts/messages' - %noscript - :css - #content { - display: none; - } - %h2 - JavaScript is not enabled - %p - OSEM requires JavaScript to be enabled to function. Please turn on JavaScript in your browser's settings and reload the page to continue. - .container#content - = yield + -# Admin area + - if controller.class.name.split("::").first=="Admin" + = render 'layouts/admin' + -else + .container#messages + .row + .col-md-12 + = render 'layouts/messages' + .container#content + = yield #footer .container diff --git a/spec/views/admin/callforpapers/show.html.haml_spec.rb b/spec/views/admin/callforpapers/show.html.haml_spec.rb index e2fad108..48824553 100644 --- a/spec/views/admin/callforpapers/show.html.haml_spec.rb +++ b/spec/views/admin/callforpapers/show.html.haml_spec.rb @@ -1,9 +1,6 @@ require 'spec_helper' describe 'admin/callforpapers/show' do - it 'renders conference sidebar' do - assign :cfp, CallForPapers.new - expect(sidebar).to be true - end + it 'renders callforpapers details' do @conference = create(:conference) assign :conference, @conference diff --git a/spec/views/admin/conference/show.html.haml_spec.rb b/spec/views/admin/conference/show.html.haml_spec.rb index 3c2c5d35..e0710e7c 100644 --- a/spec/views/admin/conference/show.html.haml_spec.rb +++ b/spec/views/admin/conference/show.html.haml_spec.rb @@ -1,9 +1,7 @@ require 'spec_helper' describe 'admin/conference/show' do - it 'renders conference sidebar' do - expect(sidebar).to be true - end + it 'renders conference details which are editable' do @conference = create(:conference, title: 'OpenSUSE') assign :conference, @conference diff --git a/spec/views/admin/difficulty_levels/index.html.haml_spec.rb b/spec/views/admin/difficulty_levels/index.html.haml_spec.rb index 77388ba7..07dc6e04 100644 --- a/spec/views/admin/difficulty_levels/index.html.haml_spec.rb +++ b/spec/views/admin/difficulty_levels/index.html.haml_spec.rb @@ -1,9 +1,7 @@ require 'spec_helper' describe 'admin/difficulty_levels/index' do - it 'renders conference sidebar' do - expect(sidebar).to be true - end + it 'renders difficulty levels' do @difficulty_level = create(:difficulty_level) assign :conference, @difficulty_level.conference diff --git a/spec/views/admin/emails/index.html.haml_spec.rb b/spec/views/admin/emails/index.html.haml_spec.rb index c50898d7..de09ac8f 100644 --- a/spec/views/admin/emails/index.html.haml_spec.rb +++ b/spec/views/admin/emails/index.html.haml_spec.rb @@ -1,9 +1,6 @@ require 'spec_helper' describe 'admin/emails/index' do - it 'renders conference sidebar' do - assign :settings, create(:email_settings) - expect(sidebar).to be true - end + it 'renders email templates' do @conference = create(:conference) assign :conference, @conference diff --git a/spec/views/admin/eventtypes/index.html.haml_spec.rb b/spec/views/admin/eventtypes/index.html.haml_spec.rb index c3cdc661..095ebf93 100644 --- a/spec/views/admin/eventtypes/index.html.haml_spec.rb +++ b/spec/views/admin/eventtypes/index.html.haml_spec.rb @@ -1,9 +1,6 @@ require 'spec_helper' describe 'admin/eventtypes/index' do - it 'renders conference sidebar' do - expect(sidebar).to be true - end it 'renders event types' do @event_type = create(:event_type) diff --git a/spec/views/admin/rooms/index.html.haml_spec.rb b/spec/views/admin/rooms/index.html.haml_spec.rb index 6dfffa15..df03032d 100644 --- a/spec/views/admin/rooms/index.html.haml_spec.rb +++ b/spec/views/admin/rooms/index.html.haml_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' describe 'admin/rooms/index' do - it 'renders conference sidebar' do - expect(sidebar).to be true - end + it 'renders rooms list' do @room = create(:room) assign :conference, @room.conference diff --git a/spec/views/admin/social_events/index.html.haml_spec.rb b/spec/views/admin/social_events/index.html.haml_spec.rb index 88f5bd8f..f2b3caaa 100644 --- a/spec/views/admin/social_events/index.html.haml_spec.rb +++ b/spec/views/admin/social_events/index.html.haml_spec.rb @@ -1,9 +1,7 @@ require 'spec_helper' describe 'admin/social_events/index' do - it 'renders conference sidebar' do - expect(sidebar).to be true - end + it 'renders social events' do @social_event = create(:social_event) assign :conference, @social_event.conference diff --git a/spec/views/admin/supporter_levels/index.html.haml_spec.rb b/spec/views/admin/supporter_levels/index.html.haml_spec.rb index 89453a9a..fb7bcbc5 100644 --- a/spec/views/admin/supporter_levels/index.html.haml_spec.rb +++ b/spec/views/admin/supporter_levels/index.html.haml_spec.rb @@ -1,9 +1,7 @@ require 'spec_helper' describe 'admin/supporter_levels/index' do - it 'renders conference sidebar' do - expect(sidebar).to be true - end + it 'renders supporter levels' do @support_level = create(:supporter_level) assign :conference, @support_level.conference diff --git a/spec/views/admin/tracks/index.html.haml_spec.rb b/spec/views/admin/tracks/index.html.haml_spec.rb index 4083b938..ae75a3a1 100644 --- a/spec/views/admin/tracks/index.html.haml_spec.rb +++ b/spec/views/admin/tracks/index.html.haml_spec.rb @@ -1,9 +1,7 @@ require 'spec_helper' describe 'admin/tracks/index' do - it 'renders conference sidebar' do - expect(sidebar).to be true - end + it 'renders tracks' do @track = create(:track) assign :conference, @track.conference diff --git a/spec/views/admin/venue/venue_info.html.haml_spec.rb b/spec/views/admin/venue/venue_info.html.haml_spec.rb index 6d42699e..dd9f1922 100644 --- a/spec/views/admin/venue/venue_info.html.haml_spec.rb +++ b/spec/views/admin/venue/venue_info.html.haml_spec.rb @@ -1,10 +1,7 @@ require 'spec_helper' describe 'admin/venue/venue_info' do - it 'renders conference sidebar' do - assign :venue, stub_model(Venue) - expect(sidebar).to be true - end + it 'renders venue#show' do @conference = create(:conference) @venue = @conference.venue diff --git a/spec/views/admin/volunteers/index.html.haml_spec.rb b/spec/views/admin/volunteers/index.html.haml_spec.rb index bc4414cc..7edef5e5 100644 --- a/spec/views/admin/volunteers/index.html.haml_spec.rb +++ b/spec/views/admin/volunteers/index.html.haml_spec.rb @@ -1,9 +1,6 @@ require 'spec_helper' describe 'admin/volunteers/index' do - it 'renders conference sidebar' do - expect(sidebar).to be true - end it 'renders volunteers days as vdays' do @vday = create(:vday)