Sha256: 2a1d885c15c9882640ff423be61265d96f1b0d2b20682c2e4ef25066395f286b

Contents?: true

Size: 1.59 KB

Versions: 4

Compression:

Stored size: 1.59 KB

Contents

<% bow = (Time.now - 6.days).beginning_of_week %>

<div class="calendar" id="sidebar_calendar" data-path="<%= polymorphic_path([@current_subject, Event.new])%>" data-start="<%= bow.to_i %>" data-end="<%= (bow + 28.days).to_i %>">

  <%= render partial: 'events/calendar_month',
             locals: {
               position: :top,
               date: bow.to_date }
  %>

  <table id="days">

    <% 28.times do |i| %>
      <% day = bow + i.days %>
      <%= raw cycle(*(Array.wrap("<tr>") + 6.times.map{""}) + Array.wrap(:name => "tr_start")) %>
      <td id="day_<%= day.day %>_<%= day.month %>_<%= day.year %>">
        <%= link_to day.day, polymorphic_path([profile_or_current_subject, Event.new], :date => day.to_i, :view => "agendaWeek") %>
      </td>
      <%= raw cycle(*(6.times.map{""} + Array.wrap('</tr>') + Array.wrap(:name => "tr_end"))) %>
    <% end %>
  </table>

  <div id="modal-sidebar_calendar" class="modal hide fade" tabindex="-1" role="dialog">
    <div class="modal-header">
      <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
      <h3></h3>
    </div>
    <div class="modal-body">
      <%= render partial: 'layouts/loading' %>
    </div>
    <div class="modal-footer">
      <button class="view-calendar btn "><%= t 'event.modal.view_in_calendar' %></button>
    </div>
  </div>

  <%= javascript_tag do %>
    $(function(){
      SocialStream.Calendar.show();
    });
  <% end %>

  <%= render partial: 'events/calendar_month',
             locals: {
               position: :bottom,
               date: (bow + 28.days).to_date
             }
  %>
</div>

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
social_stream-2.0.0.beta2 events/app/views/sidebar/_calendar.html.erb
social_stream-events-2.0.0.beta2 app/views/sidebar/_calendar.html.erb
social_stream-2.0.0.beta1 events/app/views/sidebar/_calendar.html.erb
social_stream-events-2.0.0.beta1 app/views/sidebar/_calendar.html.erb