%div{:style => defined?(hidden) && 'none',:class => event.status}[event]
  %div[event.eventable]
    %header{:class => event.subtitle ? "subtitle" : nil}
      %h1.icon= image_tag(event.icon_url, :size => "48x48", :alt => event.title, :title => event.title)
      %time{:datetime => event.event_date.strftime("%Y-%m-%dT%H:%M:%S%z")}
        %h1.date= pretty_date event.event_date
        .time= pretty_time event.event_date
      %h1= event.title
      - if event.subtitle
        %h2
          .subtitle_word= event.subtitle.first
          .subtitle_date= pretty_date event.subtitle.last,false
    .body= raw event.body
    .buttons
      = link_to image_tag("actions/event_open.png"), open_extended_event_url(event), :remote => true, :class => "extend_button", :observer => "false"
      = image_tag "actions/event_opened.png", :class => "close_extend_button", :style => "display:none", :observer => "false"
    .attachments
      .inner
        = render :partial => "events/mini", :collection => event.children.unique_eventable.order("event_date"), :as => :event
    .extended{:style => "display:none"}
      .inner

%div{:style => defined?(hidden) && 'none',:class => event.status}[event]
  %div[event.eventable]
    %header{:class => event.subtitle ? "subtitle" : nil}
      %h1.icon= image_tag(event.icon_url, :size => "48x48", :alt => event.title, :title => event.title)
      %time{:datetime => event.event_date.strftime("%Y-%m-%dT%H:%M:%S%z")}
        %h1.date= pretty_date event.event_date
        .time= pretty_time event.event_date
      %h1= event.title
      - if event.subtitle
        %h2
          .subtitle_word= event.subtitle.first
          .subtitle_date= pretty_date event.subtitle.last,false
    .body= raw event.body
    .buttons
      = link_to image_tag("actions/event_open.png"), open_extended_event_url(event,:person_id => @topic.uln), :remote => true, :class => "extend_button", :observer => "false"
      = image_tag "actions/event_opened.png", :class => "close_extend_button", :style => "display:none", :observer => "false"
    .attachments
      .inner
        = render :partial => "events/mini", :collection => event.children.unique_eventable.order("event_date"), :as => :event
    .extended{:style => "display:none"}
      .inner

Fix let those who are allowed open others' event extensions
Fix let those who are allowed open others' event extensions
