/ Account Sessions Dialog
%div{'layout' => 'screen', 'layout-id' => 'account/sessions', id: 'account-sessions', class: 'screen secondary'}
  .content-head
    .content-icon
      = image_tag "content/icon_account.png", :width => 27, :height => 20
    %h1 my account
    = render "screen_navigation"

  / sessions scrolling area
  .content-body
    .content-body-scroller.account-content-scroller#account-sessions-content-scroller
      .content-wrapper.account-sessions
        .sessions-header
          .left.sessions-caption
            %h2 scheduled sessions:
          .right
            %a.button-grey{href: "javascript:history.go(-1)"} BACK
          .clearall

        #account-scheduled-sessions
          %table.generaltable
            %thead
            %tbody
        .clearall
      .content-wrapper
        .ics-feed-caption Following is a URL for your personal JamKazam .ics calendar, which tracks all sessions and events to which you have RSVP'd:
        =render "calendar"

  / end content scrolling area

%script{type: 'text/template', id: 'template-account-session'}
  %tbody
    = "{% _.each(data.sessions, function(session) { %}"
    %tr
      %td
        %div{'data-id' => "{{session.id}}"}
          .session-left Date/Time:
          .session-right
            {{session.pretty_scheduled_start_with_timezone}}
          .clearall
          .session-left Session:
          .session-right
            {{session.name}}
          .clearall
          .session-left Notifications:
          .session-right
            {{session.notification_msg}}
          .clearall
          .session-left
          .session-right
            %a.button-orange.session-detail-button{href: '#', 'session-id' => "{{session.id}}"} DETAILS
            %a.button-orange.session-page-button{href: '#', 'session-id' => "{{session.id}}", rel: 'external'} SESSION PAGE
            = "{% if (data.current_user == session.user_id) { %}"
            %a.button-orange.session-cancel-button{href: '#', 'session-id' => "{{session.id}}"} CANCEL SESSION
            = "{% } %}"
          %hr.clearall
    = "{% }); %}"