<% content_for :head do %>
    <meta property="og:title" content="<%= @event.name %>" />
    <meta property="og:site_name" content="Sched.do" />
    <meta property="og:type" content="event" />
    <meta property="og:url" content="<%= event_url(@event) %>" />
    <meta property="og:image" content="<%= image_url("logo.png") %>" />
<% end %>

<div class="show-event">
  <div class="event-header">
    <h1 class="event-name">
      <%= @event.name %>
    </h1>
    <% if current_user.able_to_edit?(@event) %>
      <%= link_to 'Edit', edit_event_path(@event), class: "edit-button" %>
    <% end %>
  </div>

  <%= render partial: 'grid' %>

  <% if current_user.able_to_edit?(@event) %>
    <div class="event-url">
      <p>You can also share this URL directly with your invitees to have them vote:</p>
     <form>
       <input id="event-url" readonly="readonly" class="read-only"  type="url" value="<%= event_url(@event) %>" />
       <div id="copy-url-container">
         <input id="copy-url" type="button" value="Copy event URL" data-title="You can also share this URL directly with your guests" type="url" value="<%= event_url(@event) %>"/>
       </div>
     </form>
    </div>

  <% end %>
</div>

<% content_for :head do %>
    <meta property="og:title" content="<%= @event.name %>" />
    <meta property="og:site_name" content="Sched.do" />
    <meta property="og:type" content="event" />
    <meta property="og:url" content="<%= event_url(@event) %>" />
    <meta property="og:image" content="<%= image_url("logo.png") %>" />
<% end %>

<div class="show-event">
  <div class="event-header">
    <h1 class="event-name">
      <%= @event.name %>
    </h1>
    <% if current_user.able_to_edit?(@event) %>
      <%= link_to 'Edit', edit_event_path(@event), class: "edit-button" %>
    <% end %>
  </div>

  <%= render partial: 'grid' %>

  <div class="event-url">
    <p>You can also share this URL directly with your invitees to have them vote:</p>
    <form>
      <input id="event-url" readonly="readonly" class="read-only"  type="url" value="<%= event_url(@event) %>" />
      <div id="copy-url-container">
        <input id="copy-url" type="button" value="Copy event URL" data-title="You can also share this URL directly with your guests" type="url" value="<%= event_url(@event) %>"/>
      </div>
    </form>
  </div>
</div>

Allow all users to see copy-url tool
Allow all users to see copy-url tool
