Move view for proposals on schedule board into a partial
This commit is contained in:
parent
1731625153
commit
93135a6085
2 changed files with 53 additions and 49 deletions
52
app/views/conference/_schedule_item.html.erb
Normal file
52
app/views/conference/_schedule_item.html.erb
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
<td style="width: <%= 95 / @rooms.length %>%; cursor:pointer"
|
||||
rowspan ="<%= span[room.id] %>"
|
||||
class="event" role="button"
|
||||
data-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;" %>
|
||||
<%- end %>
|
||||
<h5>
|
||||
<span class="fa fa-comment"></span>
|
||||
<%= event[0].title %>
|
||||
<% unless event[0].subtitle.blank? %>
|
||||
<span class="schedule-subtitle">
|
||||
<%= event[0].subtitle %>
|
||||
<span>
|
||||
<% end %>
|
||||
</h5>
|
||||
<span class="schedule-speaker">
|
||||
<span class="fa fa-user"></span>
|
||||
<%= "#{speaker.name}" %>
|
||||
</span>
|
||||
<% if event[0].track%>
|
||||
<span class="schedule-track">
|
||||
<span class="fa fa-road"></span>
|
||||
<span class="label" style="background-color:<%= event[0].track.color if event[0].track %>"><%= event[0].track.name %></span>
|
||||
</span>
|
||||
<% end -%>
|
||||
</td>
|
||||
|
||||
<%= 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();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
<% end %>
|
||||
Loading…
Add table
Add a link
Reference in a new issue