From 2a78df9bd4059344b2133830eebe28fccaff8c81 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Fri, 29 Jun 2012 23:21:43 +0200 Subject: o Initial import of a application/vnd.collection+json demo application. --- views/department.jade | 11 +++++++++++ views/departments.jade | 8 ++++++++ views/employee.jade | 21 +++++++++++++++++++++ views/index.jade | 5 +++++ views/layout.jade | 7 +++++++ 5 files changed, 52 insertions(+) create mode 100644 views/department.jade create mode 100644 views/departments.jade create mode 100644 views/employee.jade create mode 100644 views/index.jade create mode 100644 views/layout.jade (limited to 'views') diff --git a/views/department.jade b/views/department.jade new file mode 100644 index 0000000..7005ea6 --- /dev/null +++ b/views/department.jade @@ -0,0 +1,11 @@ +extends layout + +block content + h1= title + + h2 Showing #{employees.length} employees + + each employee in employees + table + tr + td: a(href='/employee/#{employee.emp_no}') #{employee.first_name} #{employee.last_name} diff --git a/views/departments.jade b/views/departments.jade new file mode 100644 index 0000000..711e0ec --- /dev/null +++ b/views/departments.jade @@ -0,0 +1,8 @@ +extends layout + +block content + h1= title + each department in departments + table + tr + td: a(href='/department/#{department.dept_no}') #{department.dept_name} diff --git a/views/employee.jade b/views/employee.jade new file mode 100644 index 0000000..6cd2c10 --- /dev/null +++ b/views/employee.jade @@ -0,0 +1,21 @@ +extends layout + +block content + h1= title + + table + tr + td First Name + td #{employee.first_name} + tr + td Last Name + td #{employee.last_name} + tr + td Birth Date + td #{employee.birth_date} + tr + td Gender + td #{employee.gender} + tr + td Hire Date + td #{employee.hire_date} diff --git a/views/index.jade b/views/index.jade new file mode 100644 index 0000000..ef7b09f --- /dev/null +++ b/views/index.jade @@ -0,0 +1,5 @@ +extends layout + +block content + h1= title + p Welcome to #{title} \ No newline at end of file diff --git a/views/layout.jade b/views/layout.jade new file mode 100644 index 0000000..1b7b305 --- /dev/null +++ b/views/layout.jade @@ -0,0 +1,7 @@ +doctype 5 +html + head + title= title + link(rel='stylesheet', href='/stylesheets/style.css') + body + block content \ No newline at end of file -- cgit v1.2.3