Use gradients for slots with an event

This commit is contained in:
Henne Vogelsang 2013-06-19 17:04:32 +02:00 committed by Henne Vogelsang
parent 7c5c327a7d
commit 0fcd9d2a4a
2 changed files with 28 additions and 7 deletions

View file

@ -151,4 +151,21 @@ div.dataTables_scrollBody tbody tr:first-child td {
div.dataTables_scrollFoot table { div.dataTables_scrollFoot table {
border-top: none; border-top: none;
}
.event {
background-image: linear-gradient(bottom, rgb(247,250,242) 24%, rgb(194,232,190) 97%, rgb(194,232,190) 100%);
background-image: -o-linear-gradient(bottom, rgb(247,250,242) 24%, rgb(194,232,190) 97%, rgb(194,232,190) 100%);
background-image: -moz-linear-gradient(bottom, rgb(247,250,242) 24%, rgb(194,232,190) 97%, rgb(194,232,190) 100%);
background-image: -webkit-linear-gradient(bottom, rgb(247,250,242) 24%, rgb(194,232,190) 97%, rgb(194,232,190) 100%);
background-image: -ms-linear-gradient(bottom, rgb(247,250,242) 24%, rgb(194,232,190) 97%, rgb(194,232,190) 100%);
background-image: -webkit-gradient(
linear,
left bottom,
left top,
color-stop(0.24, rgb(247,250,242)),
color-stop(0.97, rgb(194,232,190)),
color-stop(1, rgb(194,232,190))
);
} }

View file

@ -39,27 +39,31 @@
<% if !event.empty? %> <% if !event.empty? %>
<!-- There is an event, calculate the span and show it --> <!-- There is an event, calculate the span and show it -->
<% span[room.id] = event[0].event_type.length / 15 %> <% span[room.id] = event[0].event_type.length / 15 %>
<td rowspan ="<%= span[room.id] %>" > <td style="width: <%= 95 / @rooms.length %>%" rowspan ="<%= span[room.id] %>" class="event" >
<p>
<%= image_tag event[0].submitter.gravatar_url, :class => "img-circle pull-right", :alt => event[0].submitter.public_name, :title => event[0].submitter.public_name%><br> <%= image_tag event[0].submitter.gravatar_url, :class => "img-circle pull-right", :alt => event[0].submitter.public_name, :title => event[0].submitter.public_name%><br>
</p>
<h5> <h5>
<i class="icon-comment"></i>
<%= event[0].title %><br> <%= event[0].title %><br>
<span class="muted"><%= event[0].subtitle %></span><br> <% unless event[0].subtitle.empty? %>
<span class="text-error"><%= event[0].subtitle %></span><br>
<% end %>
<i class="icon-user"></i>
<%= event[0].submitter.public_name %>
<% if event[0].track%> <% if event[0].track%>
<span class="text-warning">in track</span> <br><i class="icon-road"></i>
<span style="background-color:<%= event[0].track.color if event[0].track %>"><%= event[0].track.name %></span> <span style="background-color:<%= event[0].track.color if event[0].track %>"><%= event[0].track.name %></span>
<% end -%> <% end -%>
</h5> </h5>
<% if span[room.id] > 2 %> <% if span[room.id] > 2 %>
<%= truncate(event[0].abstract, :length => 80) %> <% length = span[room.id] * 40 %>
<%= truncate(event[0].abstract, :length => length) %>
<% end %> <% end %>
</td> </td>
<% span[room.id] = span[room.id] + 1 %> <% span[room.id] = span[room.id] + 1 %>
<% end %> <% end %>
<% if span[room.id] == 1 %> <% if span[room.id] == 1 %>
<!-- span equals 1 show an empty td --> <!-- span equals 1 show an empty td -->
<td class="empty <%= "room" + "#{room.id}" %>"> <td style="width: <%= 95 / @rooms.length %>%">
</td> </td>
<% end %> <% end %>
<% if span[room.id] > 1 %> <% if span[room.id] > 1 %>