<% content_for :right_side do %>
  <% return_to_url = return_to_calendar(:event => @event) %>
  <a class="base_calendar_url" href="<%= calendar_url_for() %>" style="display: none;">&nbsp;</a>
  <div id="sidebar_content" class="rs-margin-all">
    <ul class="page-action-list">
      <li><a class="return_url calendar_url" href="<%= return_to_url %>"><i class="icon-arrow-left" aria-hidden='true'></i> <%= t 'links.back_to_calendar', "Back to Calendar" %></a></li>
      <% if can_do(@event, @current_user, :update) %>
        <li><a href="#" class="edit_calendar_event_link"><i class="icon-edit" aria-hidden='true'></i> <%= t 'links.edit', "Edit Calendar Event"%></a></li>
        <% unless @event.new_record? %>
          <li><a href="<%= context_url(@context, :context_calendar_event_url, @event.id) %>" class="delete_event_link"><i class="icon-trash" aria-hidden='true'></i>  <%= t 'links.delete', "Delete the Event" %></a></li>
        <% end %>
      <% end %>
    </ul>
  </div>
  <%= render :partial => 'shared/wiki_sidebar' %>
<% end %>

<%= render :partial => 'full_calendar_event', :object => @event %>
<% content_for :right_side do %>
  <% return_to_url = return_to_calendar(:context => @context, :event => @event) %>
  <a class="base_calendar_url" href="<%= calendar_url_for() %>" style="display: none;">&nbsp;</a>
  <div id="sidebar_content" class="rs-margin-all">
    <ul class="page-action-list">
      <li><a class="return_url calendar_url" href="<%= return_to_url %>"><i class="icon-arrow-left" aria-hidden='true'></i> <%= t 'links.back_to_calendar', "Back to Calendar" %></a></li>
      <% if can_do(@event, @current_user, :update) %>
        <li>
          <% link_to context_url(@context, :edit_context_calendar_event_url, @event.id) do %>
            <i class="icon-edit" aria-hidden='true'></i> <%= t 'links.edit', "Edit Calendar Event" %>
          <% end %>
        </li>
        <% unless @event.new_record? %>
          <li><a href="<%= context_url(@context, :context_calendar_event_url, @event.id) %>" class="delete_event_link"><i class="icon-trash" aria-hidden='true'></i>  <%= t 'links.delete', "Delete the Event" %></a></li>
        <% end %>
      <% end %>
    </ul>
  </div>
  <%= render :partial => 'shared/wiki_sidebar' %>
<% end %>

<%= render :partial => 'full_calendar_event', :object => @event %>
Make "Edit Calendar Event" link go to /edit path.
Make "Edit Calendar Event" link go to /edit path.

Fixes #CNVS-3222

Testing Notes:
===========
* The "show" page version of a Calendar Event
   (popup title to read-only view), for users that can edit
   the event, the link on the right "Edit Calendar Event"
   was handled by a javascript handler to change to edit
   mode on the same page. Verify that the link now directs
   to the existing "/edit" path.

Change-Id: I36feb1f7fe9f58653bd845baa3f40501cafd0d8f
Reviewed-on: https://gerrit.instructure.com/17011
Tested-by: Jenkins <d95b56ce41a2e1ac4cecdd398defd7414407cc08@instructure.com>
Reviewed-by: Jon Willesen <eb5ce5e6a76c243326fecfa94534101600f87bd9@instructure.com>
QA-Review: Marc LeGendre <d33c80bc45d65303e33ca83108a9952b745af9ef@instructure.com>
