<div class="container-fluid">
<div class="row-fluid">
<div class="span12">
<%= render 'calendars/tabs' %>
</div>
</div>
 <div class="row-fluid">
 <div class="row-fluid"><p id="notice"><%= notice %></p>

<h1>
  <%= '<i class="icon-globe"></i>'.html_safe unless !@calendar.public%>
  <%=  @calendar.name %>
</h1>  <%= link_to "Link to iCalendar", calendar_path(@calendar, { format: 'ics'})  unless cannot? :showics, @calendar%>
</div>

 <div class="row-fluid">
<ul class="list-group">
<% @calendar.calentries.each do |entry| %>
<li class="list-group-item">
<%= link_to entry.summary.to_s+ " - " + I18n.l(entry.start1), entry %>
</li>
<% end %>
</ul>
</div>
 <div class="row-fluid">
<%= calendar @calendar.calentries do |entry| %>
  <div><%= link_to entry.name.to_s, polymorphic_path(entry.try(:object)) unless entry.object.nil? %></div>
<% end %>
</div>
 <div class="row-fluid">
<div class="btn-group">
<%= link_to 'New Entry', new_calentry_path, {:class=>"btn"} unless cannot? :new, Calendar%>
<%= link_to 'Edit', edit_calendar_path(@calendar), {:class=>"btn"} unless cannot? :edit, Calendar %>
<%= link_to 'Back', calendars_path, {:class=>"btn"} %>
</div>
</div>
</div>
