extends layout
include lib/pager

block content
  h1= title

  p
    a(href=urlgenerator.start()) Employee DB
    |  >> 
    a(href=urlgenerator.departments()) Department List
    |  >> 
    a(href=urlgenerator.department(dept_no)) Department ##{dept_no}
    |  >> 
    a(href=urlgenerator.employeesInDepartment(dept_no)) Employees in Department ##{dept_no}

  table
    each employee in employees
      tr
        td: a(href=urlgenerator.employee(employee.emp_no)) #{employee.first_name} #{employee.last_name}

  - var f = function(offset) { return urlgenerator.employeesInDepartment(dept_no, offset) }
  mixin pager(pager, f, query)