- layout = controller.parent_layout(of_layout: 'course') || controller.current_layout
= render within_layout: layout do
  = render_breadcrumbs
  div.row.course-layout data-course-id=current_course.id
    div.col-lg-2.col-md-3.col-sm-4
      div.row
        div.hidden-xs.text-center#course-sidebar-logo
          = link_to course_path(current_course) do
            = display_course_logo(current_course)
        - if current_course_user.present? && can?(:participate, current_course)
          div.col-xs-12.user
            = display_user_image(current_user)
            = link_to_user(current_course_user || current_user)
            - if !current_course_user.staff?
              = display_course_user_badge(current_course_user)
      nav.navbar-default role='navigation'
        - if can?(:participate, current_course)
          div.sidebar.collapse.navbar-collapse#course-navigation-sidebar
            = sidebar_items(controller.sidebar_items(type: :normal))

        - unless (admin_sidebar_items = controller.sidebar_items(type: :admin)).empty?
          h5 = t('.administration')
          = sidebar_items(admin_sidebar_items)

    div.col-lg-10.col-md-9.col-sm-8 class=page_class
      = yield

- layout = controller.parent_layout(of_layout: 'course') || controller.current_layout
= render within_layout: layout do
  = render_breadcrumbs
  div.row.course-layout data-course-id=current_course.id
    div.col-lg-2.col-md-3.col-sm-4
      div.row
        div.hidden-xs.text-center#course-sidebar-logo
          = link_to course_path(current_course) do
            = display_course_logo(current_course)
        - if current_course_user.present? && can?(:participate, current_course)
          div.col-xs-12.user
            = display_user_image(current_user)
            = link_to_user(current_course_user || current_user)
            - if !current_course_user.staff?
              = display_course_user_badge(current_course_user)
      nav.navbar-default role='navigation'
        - if can?(:participate, current_course)
          div.sidebar.collapse.navbar-collapse#course-navigation-sidebar
            = sidebar_items(controller.sidebar_items(type: :normal))

            - unless (admin_sidebar_items = controller.sidebar_items(type: :admin)).empty?
              h5 = t('.administration')
              = sidebar_items(admin_sidebar_items)

    div.col-lg-10.col-md-9.col-sm-8 class=page_class
      = yield

Fix nesting of admin sidebar items
Fix nesting of admin sidebar items

Coursemology/coursemology2,cysjonathan/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2,cysjonathan/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2,cysjonathan/coursemology2