= link_to person_timetables_url(@topic, :date => @next_timetable_event.try(:start)), :style => "color:inherit" do
  %h3
    Next lesson
    = image_tag("timetable.png")
  .span4
    - if @next_timetable_event
      %h4= @next_timetable_event.title
      %h5= pretty_date @next_timetable_event.start, :day => true
      .small_text
        Room:
        = @next_timetable_event.rooms.join ", "
        .small_text= @next_timetable_event.teachers.join ", "
    - else 
      .alert
        - unless Rails.env == "development"
          = @topic.kind_of?(Person) ? "You have" : "This course has"
          no current timetable events.
        - else
          %i.icon-ban-circle
          Timetables do not currently work in testing mode. 

= link_to person_timetables_url(@topic, :date => @next_timetable_event.timetable_start)), :style => "color:inherit" do
  %h3
    Next lesson
    = image_tag("timetable.png")
  .span4
    - if @next_timetable_event
      %h4= @next_timetable_event.title
      %h5= pretty_date @next_timetable_event.timetable_start, :day => true
      .small_text
        Room:
        = @next_timetable_event.rooms.join ", "
        .small_text= @next_timetable_event.teachers.join ", "
    - else 
      .alert
        - unless Rails.env == "development"
          = @topic.kind_of?(Person) ? "You have" : "This course has"
          no current timetable events.
        - else
          %i.icon-ban-circle
          Timetables do not currently work in testing mode. 

Fix next timetable event block
Fix next timetable event block
