events.ejs 1.55 KB
<!DOCTYPE html>
<html>
  <head>
    <link rel='stylesheet' href='/stylesheets/style.css' />
  </head>
  <body>
    <h1><%= id %></h1>
    <div id="events" style="width:200px;float:left">
        <% calendars.forEach(function(val){ %>
          <form action="/events/remove" method="POST">
          <p>summary : <%= val.summary %></p>
          <p>created : <%= val.created %></p>
          <p>start : <%= val.start.dateTime %></p>
          <p>end : <%= val.end.dateTime %></p>
          <input type="hidden" name="eId" value=<%= val.id %>>
          <input type="submit" value="Delete">
          </form>
        <% }) %>
    </div>
    <div id="menu" style="width:100px;float:right">
      <div id="add" style="width:100px;height:50px">
        <h2>Add Event!</h2>
        <form name="add" action="/events/add" method="POST">
          <input type="hidden" name="id" value=<%= id %> >
          Summary:<br>
          <input type="text" name="summary" placeholder="Summary of event">
          Location:<br>
          <input type="text" name="location" placeholder="Location ot event">
          Desciption:<br>
          <input type="text" name="description" placeholder="Description">
          Start Day:<br>
          <input type="date" name="startDay">
          Start Time:<br>
          <input type="time" name="startTime">
          End Day:<br>
          <input type="date" name="endDay">
          End Time:<br>
          <input type="time" name="endTime">
          <input type="submit" name="submit" value="Add">
         </form>
      </div>
    </div>
  </body>
</html>