diff --git a/_vault/design_aspects/ecms.js b/_vault/design_aspects/ecms.js
index 52e8eb9..b65f8c9 100644
--- a/_vault/design_aspects/ecms.js
+++ b/_vault/design_aspects/ecms.js
@@ -31,7 +31,7 @@ var Schema1 = new Schema({
}
});
-mongoose.model('User', Schema1);
+mongoose.model('ECMS', Schema1);
/*
An equipment has a model.
diff --git a/config/config.server.js b/config/config.server.js
index d5857e4..a9e31fd 100644
--- a/config/config.server.js
+++ b/config/config.server.js
@@ -56,6 +56,7 @@ module.exports = function(app){
// override with the X-HTTP-Method-Override header in the request. simulate DELETE/PUT
app.use(methodOverride('X-HTTP-Method-Override'));
+ app.use(methodOverride('_method'));
if (app.get('env') === 'development') require('./env/development')(app);
@@ -66,7 +67,8 @@ module.exports = function(app){
// set the static files location /public/img will be /img for users
app.use(express.static(path.resolve('public'))); // app.use(express.static('uploads')); http://expressjs.com/en/starter/static-files.html
// app.use(express.static(path.resolve('modules/client/core')));
-
+ app.use(express.static(path.resolve('modules/core/client/views')));
+ app.use(express.static(path.resolve('modules/angular1/client/views')));
// render views
require('./config.view')(app);
diff --git a/modules/angular1/client/views/angular1-ui.html b/modules/angular1/client/views/angular1-ui.html
new file mode 100644
index 0000000..f27bca4
--- /dev/null
+++ b/modules/angular1/client/views/angular1-ui.html
@@ -0,0 +1,57 @@
+
+
+
+
+ UI-Router
+
+
+
+
+
+
+
+
Best viewed in pop-out mode to see location changes. Click blue button on the right.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/modules/angular1/client/views/includes/state1.html b/modules/angular1/client/views/includes/state1.html
new file mode 100644
index 0000000..924563b
--- /dev/null
+++ b/modules/angular1/client/views/includes/state1.html
@@ -0,0 +1,3 @@
+
State 1
+
+
\ No newline at end of file
diff --git a/modules/angular1/client/views/includes/state1.list.pug b/modules/angular1/client/views/includes/state1.list.pug
new file mode 100644
index 0000000..5d9f017
--- /dev/null
+++ b/modules/angular1/client/views/includes/state1.list.pug
@@ -0,0 +1,3 @@
+h3 List of State 1 Items
+ul
+ li(ng-repeat='item in items') {{item}}
\ No newline at end of file
diff --git a/modules/angular1/client/views/includes/state1.pug b/modules/angular1/client/views/includes/state1.pug
new file mode 100644
index 0000000..16840e8
--- /dev/null
+++ b/modules/angular1/client/views/includes/state1.pug
@@ -0,0 +1,4 @@
+h1 State 1
+hr
+ a(ui-sref='state1.list') Show List
+ div(ui-view)
\ No newline at end of file
diff --git a/modules/angular1/client/views/includes/state2.html b/modules/angular1/client/views/includes/state2.html
new file mode 100644
index 0000000..73d5877
--- /dev/null
+++ b/modules/angular1/client/views/includes/state2.html
@@ -0,0 +1,3 @@
+
State 2
+
+
\ No newline at end of file
diff --git a/modules/angular1/client/views/includes/state2.list.pug b/modules/angular1/client/views/includes/state2.list.pug
new file mode 100644
index 0000000..388aa99
--- /dev/null
+++ b/modules/angular1/client/views/includes/state2.list.pug
@@ -0,0 +1,3 @@
+h3 List of State 2 Items
+ul
+ li(ng-repeat='item in items') {{item}}
\ No newline at end of file
diff --git a/modules/angular1/client/views/includes/state2.pug b/modules/angular1/client/views/includes/state2.pug
new file mode 100644
index 0000000..b8e5b29
--- /dev/null
+++ b/modules/angular1/client/views/includes/state2.pug
@@ -0,0 +1,4 @@
+h1 State 2
+hr
+ a(ui-sref='state2.list') Show List
+ div(ui-view)
\ No newline at end of file
diff --git a/modules/calibrates/client/views/calibrate.pug b/modules/calibrates/client/views/calibrate.pug
index a63aab0..2c66a8d 100644
--- a/modules/calibrates/client/views/calibrate.pug
+++ b/modules/calibrates/client/views/calibrate.pug
@@ -10,6 +10,7 @@ block content
table.table.table-striped
thead.thead-inverse
tr
+ th Actions
th Asset Number
th Model
th Location
@@ -19,6 +20,13 @@ block content
tbody
each calibrate in calibrates
tr
+ td
+ form(action='/calibrates/asset_number/' + calibrate.asset_number+'?_method=',method='post',enctype='application/x-www-form-urlencoded')
+ // temporarily obstrusive method
+ button(type='submit', onclick='this.form.action=this.form.action+"DELETE";').
+ Delete
+ button(type='submit', onclick='this.form.action=this.form.action+"GET";').
+ View
td= calibrate.asset_number
td= calibrate.model
td= calibrate.ECMS_Location.desc
@@ -27,4 +35,4 @@ block content
- if (calibrate.ECMS_Attributes[0].file) {
td= calibrate.ECMS_Attributes[0].file
- }
- - }
\ No newline at end of file
+ - }
\ No newline at end of file
diff --git a/modules/calibrates/client/views/list.pug b/modules/calibrates/client/views/list.pug
new file mode 100644
index 0000000..0a71d5e
--- /dev/null
+++ b/modules/calibrates/client/views/list.pug
@@ -0,0 +1,22 @@
+div
+ h3='Listing from ECMS main table'
+ - if (mains.length) {
+ table.table
+ tr
+ th id
+ th asset_number
+ th file
+ th last_cal
+ th next_cal
+ th schedule
+ each main in mains
+ tr
+ td= main.id
+ td= main.asset_number
+ td= main.file
+ td #{main.last_cal.toDateString()}
+ - if (main.next_cal) {
+ td #{main.next_cal.toDateString()}
+ - }
+ td= main.schedule
+ - }
\ No newline at end of file
diff --git a/modules/calibrates/client/views/main.pug b/modules/calibrates/client/views/main.pug
index 4e66179..882e03e 100644
--- a/modules/calibrates/client/views/main.pug
+++ b/modules/calibrates/client/views/main.pug
@@ -4,24 +4,4 @@ block page
- var menu = 'calibrates'
block content
div
- h3='Listing from ECMS main table'
- - if (mains.length) {
- table.table
- tr
- th id
- th asset_number
- th file
- th last_cal
- th next_cal
- th schedule
- each main in mains
- tr
- td= main.id
- td= main.asset_number
- td= main.file
- td #{main.last_cal.toDateString()}
- - if (main.next_cal) {
- td #{main.next_cal.toDateString()}
- - }
- td= main.schedule
- - }
\ No newline at end of file
+ #content
\ No newline at end of file
diff --git a/modules/core/client/views/includes/ui-menu.html b/modules/core/client/views/includes/ui-menu.html
new file mode 100644
index 0000000..39b385e
--- /dev/null
+++ b/modules/core/client/views/includes/ui-menu.html
@@ -0,0 +1,18 @@
+