From d8d4a98be0a022cea96f16e73988917df6896c20 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sat, 30 Jun 2012 01:15:10 +0200 Subject: o Adding views for all departments, department, employees in department and employee in both HTML and Collection+JSON variants. --- views/department.jade | 7 ++----- views/employees_in_department.jade | 13 +++++++++++++ 2 files changed, 15 insertions(+), 5 deletions(-) create mode 100644 views/employees_in_department.jade (limited to 'views') diff --git a/views/department.jade b/views/department.jade index 7005ea6..e2a5bde 100644 --- a/views/department.jade +++ b/views/department.jade @@ -3,9 +3,6 @@ extends layout block content h1= title - h2 Showing #{employees.length} employees + p: a(href=urlgenerator.departments()) All departments - each employee in employees - table - tr - td: a(href='/employee/#{employee.emp_no}') #{employee.first_name} #{employee.last_name} + p: a(href=urlgenerator.employees_in_department(dept_no)) Employees diff --git a/views/employees_in_department.jade b/views/employees_in_department.jade new file mode 100644 index 0000000..f835a29 --- /dev/null +++ b/views/employees_in_department.jade @@ -0,0 +1,13 @@ +extends layout + +block content + h1= title + + p: a(href=urlgenerator.department(dept_no)) Department #{dept_no} + + p This department has #{employees.length} employees. + + each employee in employees + table + tr + td: a(href=urlgenerator.employee(employee.emp_no)) #{employee.first_name} #{employee.last_name} -- cgit v1.2.3