aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2012-06-30 01:15:10 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2012-06-30 01:15:10 +0200
commitd8d4a98be0a022cea96f16e73988917df6896c20 (patch)
treed56e77e9f28283b78853374d589360ee3dbc817a /views
parent7c4e5ec5a650c4bf5730b323eee2c51f1cb94fc9 (diff)
downloadexample-collection-json-db-d8d4a98be0a022cea96f16e73988917df6896c20.tar.gz
example-collection-json-db-d8d4a98be0a022cea96f16e73988917df6896c20.tar.bz2
example-collection-json-db-d8d4a98be0a022cea96f16e73988917df6896c20.tar.xz
example-collection-json-db-d8d4a98be0a022cea96f16e73988917df6896c20.zip
o Adding views for all departments, department, employees in department and employee in both HTML and Collection+JSON variants.
Diffstat (limited to 'views')
-rw-r--r--views/department.jade7
-rw-r--r--views/employees_in_department.jade13
2 files changed, 15 insertions, 5 deletions
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}