<%layout('layouts/boilerplate')%>
<div>
    <h1 class="pb-4">Explore <%=options%>
    </h1>

    <nav aria-label="breadcrumb">
      <ol class="breadcrumb">
        <li class="breadcrumb-item"><a href="/">Home</a></li>
        <li class="breadcrumb-item"><a href="/faculty/<%=faculty%>">
            <%=faculty%>
          </a></li>
        <li class="breadcrumb-item"><a href="/faculty/<%=faculty%>/semester/<%=id%>">Semester <%=id%></a></li>
        <li class="breadcrumb-item"><a href="/faculty/<%=faculty%>/semester/<%=id%>/<%=course_code%>">
            <%=course_code%>
          </a></li>
        <li class="breadcrumb-item"><a href="#">
            <%=options.toUpperCase()%>
          </a></li>
        <li class="breadcrumb-item active" aria-current="page">Explore <%=options.toUpperCase()%>
        </li>
      </ol>
    </nav>

    <table class="table table-bordered table-striped">
      <thead>
        <tr>
          <th scope="col" class="d-none d-sm-table-cell">No</th>
          <th scope="col">Year</th>
          <th scope="col">View Paper</th>

        </tr>
      </thead>
      <tbody>
        <% oldQuestions.forEach((oldQuestion,index)=> {%>
          <tr>
            <th scope="row" class="d-none d-sm-table-cell">
              <%=(index+1)%>
            </th>
            <td>
              <%-oldQuestion.year%>
            </td>
            <td>
                <a href="<%=oldQuestion.paperURL%>" class="btn btn-info" target="_blank">Click Me</a>
            </td>
          </tr>
          <% }) %>
      </tbody>
    </table>
  </div>