diff --git a/app/assets/stylesheets/osem-schedule.css.scss b/app/assets/stylesheets/osem-schedule.css.scss
index b63616cc..fe4875e6 100644
--- a/app/assets/stylesheets/osem-schedule.css.scss
+++ b/app/assets/stylesheets/osem-schedule.css.scss
@@ -59,3 +59,9 @@ background-image: -webkit-gradient(
.schedule-subtitle {
color: rgb(185, 74, 72);
}
+
+a.unstyled-link {
+ text-decoration: none;
+ color: #333333;
+ outline: 0;
+}
diff --git a/app/views/conference/_schedule.html.erb b/app/views/conference/_schedule.html.erb
index baf466b5..1d036378 100644
--- a/app/views/conference/_schedule.html.erb
+++ b/app/views/conference/_schedule.html.erb
@@ -43,37 +43,7 @@
<% if !event.empty? %>
<% span[room.id] = event[0].event_type.length / 15 %>
-
- <%- if speaker = event[0].speakers.first %>
- <%= image_tag speaker.gravatar_url, :class => "img-circle pull-right",
- :alt => speaker.name,
- :title => speaker.name,
- :style => "padding:8px;" %>
- <%- end %>
-
-
- <%= event[0].title %>
- <% unless event[0].subtitle.blank? %>
-
- <%= event[0].subtitle %>
-
- <% end %>
-
-
-
-
- <%= "#{speaker.name}" %>
-
- <% if event[0].track%>
-
-
- <%= event[0].track.name %>
-
- <% end -%>
- |
+ <%= render partial: 'schedule_item', locals: {event: event, room: room, span: span} %>
<% span[room.id] = span[room.id] + 1 %>
<% elsif span[room.id] > 1 %>
@@ -94,25 +64,6 @@
<%= javascript_tag do %>
- jQuery( function($) {
- $('tbody tr td[data-href]').addClass('clickable').mouseup(function(e) {
- var url = $(this).attr('data-href');
- if (e.which === 1 && e.ctrlKey){
- var win = window.open(url, '_blank');
- win.focus();
- }
- else if(e.which === 1)
- {
- window.location = url;
- }
- else if(e.which === 2)
- {
- var win = window.open(url, '_blank');
- win.focus();
- }
- });
-});
-
$(function() {
// add a hash to the URL when the user clicks on a tab
$('a[data-toggle="tab"]').on('click', function(e) {
diff --git a/app/views/conference/_schedule_item.html.haml b/app/views/conference/_schedule_item.html.haml
new file mode 100644
index 00000000..01db4cac
--- /dev/null
+++ b/app/views/conference/_schedule_item.html.haml
@@ -0,0 +1,24 @@
+%td.event{ style: "width: #{95 / @rooms.length}%; cursor:pointer", |
+ rowspan: span[room.id], |
+ role: "button" } |
+ %a.unstyled-link{href: url_for(conference_proposal_path(@conference.short_title, event[0].id))}
+ - if speaker = event[0].speakers.first
+ = image_tag speaker.gravatar_url, :class => "img-circle pull-right", |
+ :alt => speaker.name, |
+ :title => speaker.name, |
+ :style => "padding:8px;" |
+ %h5
+ %span.fa.fa-comment
+ = event[0].title
+ - unless event[0].subtitle.blank?
+ %span.schedule-subtitle
+ = event[0].subtitle
+ %span.schedule-speaker
+ %span.fa.fa-user
+ = speaker.name
+ - if event[0].track
+ %span.schedule-track
+ %span.fa.fa-road
+ %span.label{ style: "background-color: #{event[0].track.color}" }
+ = event[0].track.name
+