          event-activities-explore-page
          event-activity-page
          event-activity-edit-page
+         event-schedule-page
          event-attendees-page
          event-attendee-page
          organizations-page

                     (str " to " (unparse datetime-formatter end)))))]
           [:div.meta
            [:strong "Venue:"]
            " "
            (:Venue event)]
           [:div.description
            (:Description event)]
           [:div.extra
            [:a.ui.right.floated.button {:href (event-activities-route)}
             "Your activities"
             [:i.right.chevron.icon]]]]])]]]
    [:div.ui.dimmer {:class (when (empty? @events) "active")}

                                  @attendees-db
                                  event-id)))]
    (when (seq event)
      [:div.sixteen.wide.column
       [:div.ui.segment
        [:div.ui.vertical.segment
         [:h2.ui.dividing.header
          (:Name event)]
         [:div.ui.right.floated.small.labeled.icon.button
          [:i.edit.icon]
          "Edit"]
         [:div
          [:b "Date: "]
          (when (and (:StartDate event)
                     (:EndDate event))
            (let [start (from-string (:StartDate event))
                  end   (from-string (:EndDate   event))]
              (str (unparse datetime-formatter start)
                   (when (after? end start)
                     (str " to "
                          (unparse datetime-formatter end))))))]
         [:div
          [:b "Venue: "] (:Venue event)]
         [:p (:Description event)]]
        [:div.ui.vertical.segment
         [:h2.ui.header
          "Activities"]
         [:table.ui.table
          [:thead
           [:tr
            [:th "Start"]
            [:th "End"]
            [:th "Activity"]
            [:th "Location"]]]
          [:tbody
           (for [activity activities]
             ^{:key (:ActivityId activity)}
             [:tr
              [:td {:noWrap true}
               (when activity
                 (unparse datetime-formatter
                          (from-string (:StartTime activity))))]
              [:td {:noWrap true}
               (when activity
                 (unparse datetime-formatter
                          (from-string (:EndTime activity))))]
              [:td (:Name activity)]
              [:td (:Location activity)]])]
          [:tfoot
           [:tr
            [:th {:colSpan "4"}
             [:a.ui.right.floated.small.labeled.icon.button
              {:href (event-activity-add-route event)}
              [:i.edit.icon]
              "Edit"]]]]]]
        [:div.ui.vertical.segment
         [:h2.ui.header
          "Attendees"
          [:a.ui.right.floated.small.button
           {:href (event-attendees-route event)}
           "View"]]
         [:table.ui.table
          [:thead
           [:tr
            [:th "Name"]
            [:th]]]
          [:tbody
           (for [attendee attendees]
             ^{:key (:AttendeeId attendee)}
             [:tr
              [:td (str (:FirstName attendee) " " (:LastName attendee))]
              [:td [:a.ui.right.floated.small.labeled.button
                    {:href (event-attendee-route {:EventId (:EventId event)
                                                  :AttendeeId (:AttendeeId attendee)})
                     :class (when (:CheckinTime attendee) :green)}
                    (if (:CheckinTime attendee)
                      "Checked in"
                      "Check in")]]])]
          [:tfoot
           [:tr
            [:th {:colSpan "4"}
             [:div.ui.right.floated.small.labeled.icon.button
              [:i.edit.icon]
              "Edit"]]]]]]]])))

(defn event-attendee-page [event-id attendee-id]
  (let [check-in-or-out
