symbiont 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +10 -39
- data/HISTORY.md +6 -0
- data/lib/symbiont.rb +8 -4
- data/lib/symbiont/enclosers.rb +4 -4
- data/lib/symbiont/evaluators.rb +22 -29
- data/lib/symbiont/generators.rb +82 -317
- data/lib/symbiont/platform_selenium.rb +18 -0
- data/lib/symbiont/platform_selenium/platform_object.rb +236 -0
- data/lib/symbiont/platform_selenium/web_objects/button.rb +13 -0
- data/lib/symbiont/platform_selenium/web_objects/checkbox.rb +21 -0
- data/lib/symbiont/platform_selenium/web_objects/common.rb +104 -0
- data/lib/symbiont/platform_selenium/web_objects/link.rb +13 -0
- data/lib/symbiont/platform_selenium/web_objects/radio.rb +21 -0
- data/lib/symbiont/platform_selenium/web_objects/select_list.rb +79 -0
- data/lib/symbiont/platform_selenium/web_objects/table.rb +40 -0
- data/lib/symbiont/platform_selenium/web_objects/table_row.rb +36 -0
- data/lib/symbiont/platform_selenium/web_objects/text_field.rb +14 -0
- data/lib/symbiont/platform_watir.rb +13 -4
- data/lib/symbiont/platform_watir/platform_object.rb +74 -262
- data/lib/symbiont/platform_watir/web_objects/checkbox.rb +21 -0
- data/lib/symbiont/platform_watir/web_objects/common.rb +82 -0
- data/lib/symbiont/platform_watir/web_objects/radio.rb +21 -0
- data/lib/symbiont/platform_watir/web_objects/select_list.rb +67 -0
- data/lib/symbiont/platform_watir/web_objects/table.rb +31 -0
- data/lib/symbiont/platform_watir/web_objects/table_row.rb +31 -0
- data/lib/symbiont/platform_watir/web_objects/text_field.rb +13 -0
- data/lib/symbiont/platforms.rb +18 -6
- data/lib/symbiont/version.rb +1 -1
- data/lib/symbiont/web_objects/_common.rb +53 -74
- data/lib/symbiont/web_objects/button.rb +23 -4
- data/lib/symbiont/web_objects/checkbox.rb +24 -10
- data/lib/symbiont/web_objects/div.rb +9 -1
- data/lib/symbiont/web_objects/link.rb +25 -4
- data/lib/symbiont/web_objects/paragraph.rb +11 -0
- data/lib/symbiont/web_objects/radio.rb +27 -1
- data/lib/symbiont/web_objects/select_list.rb +20 -56
- data/lib/symbiont/web_objects/span.rb +9 -1
- data/lib/symbiont/web_objects/table.rb +19 -22
- data/lib/symbiont/web_objects/table_cell.rb +17 -1
- data/lib/symbiont/web_objects/table_row.rb +18 -25
- data/lib/symbiont/web_objects/text_field.rb +27 -11
- data/symbiont.gemspec +3 -8
- metadata +29 -122
- data/app/Gemfile +0 -4
- data/app/app.rb +0 -181
- data/app/config/database.rb +0 -9
- data/app/models/plan.rb +0 -10
- data/app/models/product.rb +0 -10
- data/app/models/study.rb +0 -11
- data/app/models/user.rb +0 -13
- data/app/public/css/style.css +0 -138
- data/app/views/create_plan.erb +0 -21
- data/app/views/create_product.erb +0 -15
- data/app/views/create_study.erb +0 -24
- data/app/views/create_user.erb +0 -60
- data/app/views/db_plans.erb +0 -31
- data/app/views/db_products.erb +0 -29
- data/app/views/db_studies.erb +0 -33
- data/app/views/db_users.erb +0 -23
- data/app/views/entity_list.erb +0 -10
- data/app/views/index.erb +0 -8
- data/app/views/layout.erb +0 -39
- data/app/views/login_page.erb +0 -17
- data/app/views/success_1.erb +0 -2
- data/app/views/success_2.erb +0 -2
- data/app/views/test_database.erb +0 -13
- data/app/views/test_events.erb +0 -51
- data/app/views/test_login.erb +0 -53
- data/app/views/test_login_error.erb +0 -22
- data/app/views/test_login_success.erb +0 -22
- data/app/views/test_page.erb +0 -184
- data/specs/button.feature +0 -44
- data/specs/checkbox.feature +0 -40
- data/specs/data_setter.feature +0 -29
- data/specs/definitions/pages.rb +0 -156
- data/specs/div.feature +0 -11
- data/specs/evaluators.feature +0 -17
- data/specs/events.feature +0 -30
- data/specs/frame.feature +0 -5
- data/specs/link.feature +0 -42
- data/specs/locators.feature +0 -17
- data/specs/radio.feature +0 -38
- data/specs/select_list.feature +0 -50
- data/specs/simple_test.feature +0 -13
- data/specs/span.feature +0 -11
- data/specs/support/env.rb +0 -20
- data/specs/support/hooks.rb +0 -11
- data/specs/support/test_steps/action_steps_buttons.rb +0 -70
- data/specs/support/test_steps/action_steps_checkboxes.rb +0 -75
- data/specs/support/test_steps/action_steps_data_setter.rb +0 -56
- data/specs/support/test_steps/action_steps_divs.rb +0 -18
- data/specs/support/test_steps/action_steps_evaluators.rb +0 -15
- data/specs/support/test_steps/action_steps_events.rb +0 -77
- data/specs/support/test_steps/action_steps_frames.rb +0 -13
- data/specs/support/test_steps/action_steps_links.rb +0 -61
- data/specs/support/test_steps/action_steps_locators.rb +0 -44
- data/specs/support/test_steps/action_steps_navigate.rb +0 -25
- data/specs/support/test_steps/action_steps_radios.rb +0 -75
- data/specs/support/test_steps/action_steps_select_lists.rb +0 -106
- data/specs/support/test_steps/action_steps_spans.rb +0 -18
- data/specs/support/test_steps/action_steps_tables.rb +0 -82
- data/specs/support/test_steps/action_steps_text_fields.rb +0 -107
- data/specs/support/test_steps/action_steps_webobjects.rb +0 -31
- data/specs/support/test_steps/simple_test_steps.rb +0 -8
- data/specs/table.feature +0 -39
- data/specs/text_field.feature +0 -47
- data/specs/web_object.feature +0 -15
data/app/config/database.rb
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
require 'data_mapper'
|
2
|
-
|
3
|
-
require_relative '../models/product'
|
4
|
-
require_relative '../models/study'
|
5
|
-
require_relative '../models/plan'
|
6
|
-
require_relative '../models/user'
|
7
|
-
|
8
|
-
DataMapper::setup(:default, "sqlite3://#{Dir.pwd}/app.db")
|
9
|
-
DataMapper.finalize.auto_upgrade!
|
data/app/models/plan.rb
DELETED
data/app/models/product.rb
DELETED
data/app/models/study.rb
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
class Study
|
2
|
-
include DataMapper::Resource
|
3
|
-
|
4
|
-
property :id, Serial
|
5
|
-
property :study_name, String
|
6
|
-
property :protocol, String
|
7
|
-
property :product, String
|
8
|
-
property :phase, String
|
9
|
-
property :created_at, DateTime, default: DateTime.now
|
10
|
-
property :updated_at, DateTime
|
11
|
-
end
|
data/app/models/user.rb
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
class User
|
2
|
-
include DataMapper::Resource
|
3
|
-
|
4
|
-
property :id, Serial
|
5
|
-
property :loginname, String
|
6
|
-
property :firstname, String
|
7
|
-
property :lastname, String
|
8
|
-
property :level, String
|
9
|
-
property :role, String
|
10
|
-
property :password, String
|
11
|
-
property :created_at, DateTime, default: DateTime.now
|
12
|
-
property :updated_at, DateTime
|
13
|
-
end
|
data/app/public/css/style.css
DELETED
@@ -1,138 +0,0 @@
|
|
1
|
-
header {
|
2
|
-
text-align: center;
|
3
|
-
background: #ccc;
|
4
|
-
border: 1px solid;
|
5
|
-
}
|
6
|
-
|
7
|
-
header h1 {
|
8
|
-
font: 42px normal Georgia, "Times New Roman", Times, serif;
|
9
|
-
}
|
10
|
-
|
11
|
-
header h1 a {
|
12
|
-
color: #0B610B;
|
13
|
-
text-decoration: none;
|
14
|
-
}
|
15
|
-
|
16
|
-
header h2 {
|
17
|
-
color: #38610B;
|
18
|
-
font-style: italic;
|
19
|
-
}
|
20
|
-
|
21
|
-
footer {
|
22
|
-
clear: both;
|
23
|
-
text-align: center;
|
24
|
-
}
|
25
|
-
|
26
|
-
.indent {
|
27
|
-
margin: 10px 0 40px 25px;
|
28
|
-
}
|
29
|
-
|
30
|
-
.group {
|
31
|
-
padding: 10px;
|
32
|
-
margin: 10px 0 40px 25px;
|
33
|
-
border: 1px solid;
|
34
|
-
background-color: #E6E6E6;
|
35
|
-
}
|
36
|
-
|
37
|
-
#navigate {
|
38
|
-
float: right;
|
39
|
-
margin-right: 50px;
|
40
|
-
}
|
41
|
-
|
42
|
-
input:focus {
|
43
|
-
border:5px solid yellow;
|
44
|
-
}
|
45
|
-
|
46
|
-
.notice {
|
47
|
-
color: green;
|
48
|
-
}
|
49
|
-
|
50
|
-
.error {
|
51
|
-
color: red;
|
52
|
-
}
|
53
|
-
|
54
|
-
table.entity {
|
55
|
-
margin: 20px;
|
56
|
-
color: #666;
|
57
|
-
font-size: 12px;
|
58
|
-
font-family: Arial, Helvetica, sans-serif;
|
59
|
-
background: #eaebec;
|
60
|
-
border: #ccc 1px solid;
|
61
|
-
border-radius: 3px;
|
62
|
-
box-shadow: 0 1px 2px #d1d1d1;
|
63
|
-
text-shadow: 1px 1px 0px #fff;
|
64
|
-
-moz-border-radius: 3px;
|
65
|
-
-moz-box-shadow: 0 1px 2px #d1d1d1;
|
66
|
-
-webkit-border-radius: 3px;
|
67
|
-
-webkit-box-shadow: 0 1px 2px #d1d1d1;
|
68
|
-
}
|
69
|
-
|
70
|
-
table.entity caption {
|
71
|
-
font-size: 16px;
|
72
|
-
}
|
73
|
-
|
74
|
-
table.entity th {
|
75
|
-
padding: 21px 25px 22px 25px;
|
76
|
-
border-bottom: 1px solid #e0e0e0;
|
77
|
-
border-top: 1px solid #fafafa;
|
78
|
-
background: #ededed;
|
79
|
-
background: -webkit-gradient(linear, left top, left bottom, from(#ededed), to(#ebebeb));
|
80
|
-
background: -moz-linear-gradient(top, #ededed, #ebebeb);
|
81
|
-
}
|
82
|
-
|
83
|
-
table.entity th:first-child {
|
84
|
-
padding-left: 20px;
|
85
|
-
text-align: left;
|
86
|
-
}
|
87
|
-
|
88
|
-
table.entity tr {
|
89
|
-
padding-left: 20px;
|
90
|
-
text-align: center;
|
91
|
-
}
|
92
|
-
|
93
|
-
table.entity tr:first-child th:first-child {
|
94
|
-
-moz-border-radius-topleft: 3px;
|
95
|
-
-webkit-border-top-left-radius: 3px;
|
96
|
-
border-top-left-radius: 3px;
|
97
|
-
}
|
98
|
-
|
99
|
-
table.entity tr:first-child th:last-child {
|
100
|
-
-moz-border-radius-topright: 3px;
|
101
|
-
-webkit-border-top-right-radius: 3px;
|
102
|
-
border-top-right-radius: 3px;
|
103
|
-
}
|
104
|
-
|
105
|
-
table.entity tr:last-child td { border-bottom: 0 }
|
106
|
-
|
107
|
-
table.entity tr:last-child td:first-child {
|
108
|
-
-moz-border-radius-bottomleft: 3px;
|
109
|
-
-webkit-border-bottom-left-radius: 3px;
|
110
|
-
border-bottom-left-radius: 3px;
|
111
|
-
}
|
112
|
-
|
113
|
-
table.entity tr:last-child td:last-child {
|
114
|
-
-moz-border-radius-bottomright: 3px;
|
115
|
-
-webkit-border-bottom-right-radius: 3px;
|
116
|
-
border-bottom-right-radius: 3px;
|
117
|
-
}
|
118
|
-
|
119
|
-
table.entity tr:hover td {
|
120
|
-
background: #f2f2f2;
|
121
|
-
background: -webkit-gradient(linear, left top, left bottom, from(#f2f2f2), to(#f0f0f0));
|
122
|
-
background: -moz-linear-gradient(top, #f2f2f2, #f0f0f0);
|
123
|
-
}
|
124
|
-
|
125
|
-
table.entity tr td {
|
126
|
-
padding: 18px;
|
127
|
-
border-bottom: 1px solid #e0e0e0; border-left: 1px solid #e0e0e0; border-top: 1px solid #ffffff;
|
128
|
-
background: #fafafa;
|
129
|
-
background: -webkit-gradient(linear, left top, left bottom, from(#fbfbfb), to(#fafafa));
|
130
|
-
background: -moz-linear-gradient(top, #fbfbfb, #fafafa);
|
131
|
-
}
|
132
|
-
|
133
|
-
table.entity tr td:first-child {
|
134
|
-
padding-left: 20px;
|
135
|
-
border-left: 0;
|
136
|
-
text-align: left;
|
137
|
-
}
|
138
|
-
|
data/app/views/create_plan.erb
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
<section id="create_plan">
|
2
|
-
<p><span id="navigate"><a href="entity_list">Back to List</a> | <a href="test_database">Logout</a></span></p>
|
3
|
-
<form id="planFormID" class="planFormClass" name="planFormName" method="post" action="/create_plan">
|
4
|
-
<p><label id="lbl_planName" class="Fld" for="planName">Plan Name:</label><br />
|
5
|
-
<input id="planName" name="planName" class="Fld" size="40" type="text"/></p>
|
6
|
-
|
7
|
-
<p><label id="lbl_planStudy" class="Fld" for="planStudy">Study:</label><br />
|
8
|
-
<select id="planStudy" name="planStudy">
|
9
|
-
<option value="blank"></option>
|
10
|
-
<% @studies = Study.all %>
|
11
|
-
<% @studies.each do |study| %>
|
12
|
-
<option value="<%= study.study_name %>"><%= study.study_name %></option>
|
13
|
-
<% end %>
|
14
|
-
</select>
|
15
|
-
|
16
|
-
<p><label id="lbl_planDescription" class="Fld" for="planDescription">Description:</label><br />
|
17
|
-
<input id="planDescription" name="planDescription" class="Fld" size="40" type="text"/></p>
|
18
|
-
|
19
|
-
<p><input id="btnSubmit" name="btnSubmit" class="btn" type="submit" value="Create Plan"></p>
|
20
|
-
</form>
|
21
|
-
</section>
|
@@ -1,15 +0,0 @@
|
|
1
|
-
<section id="create_product">
|
2
|
-
<span id="navigate"><a href="entity_list">Back to List</a> | <a href="test_database">Logout</a></span></p>
|
3
|
-
<form id="productFormID" class="productFormClass" name="productFormName" method="post" action="/create_product">
|
4
|
-
<p><label id="lbl_productId" class="Fld" for="productId">Product ID:</label><br />
|
5
|
-
<input id="productId" name="productId" class="Fld" size="40" type="text"/></p>
|
6
|
-
|
7
|
-
<p><label id="lbl_productName" class="Fld" for="productName">Name:</label><br />
|
8
|
-
<input id="productName" name="productName" class="Fld" size="40" type="text"/></p>
|
9
|
-
|
10
|
-
<p><label id="lbl_productDescription" class="Fld" for="productDescription">Description:</label><br />
|
11
|
-
<input id="productDescription" name="productDescription" class="Fld" size="40" type="text"/></p>
|
12
|
-
|
13
|
-
<p><input id="btnSubmit" name="btnSubmit" class="btn" type="submit" value="Create Product"></p>
|
14
|
-
</form>
|
15
|
-
</section>
|
data/app/views/create_study.erb
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
<section id="create_study">
|
2
|
-
<span id="navigate"><a href="entity_list">Back to List</a> | <a href="test_database">Logout</a></span></p>
|
3
|
-
<form id="studyFormID" clas="studyFormClass" name="studyFormName" method="post" action="/create_study">
|
4
|
-
<p><label id="lbl_studyName" class="Fld" for="studyName">Study Name:</label><br />
|
5
|
-
<input id="studyName" name="studyName" class="Fld" size="40" type="text"/></p>
|
6
|
-
|
7
|
-
<p><label id="lbl_studyProtocol" class="Fld" for="studyProtocol">Protocol:</label><br />
|
8
|
-
<input id="studyProtocol" name="studyProtocol" class="Fld" size="40" type="text"/></p>
|
9
|
-
|
10
|
-
<p><label id="lbl_studyProduct" class="Fld" for="studyProduct">Product:</label><br />
|
11
|
-
<select id="studyProduct" name="studyProduct">
|
12
|
-
<option value="blank"></option>
|
13
|
-
<% @products = Product.all %>
|
14
|
-
<% @products.each do |product| %>
|
15
|
-
<option value="<%= product.name %>"><%= product.name %></option>
|
16
|
-
<% end %>
|
17
|
-
</select>
|
18
|
-
|
19
|
-
<p><label id="lbl_studyPhase" class="Fld" for="studyPhase">Phase:</label><br />
|
20
|
-
<input id="studyPhase" name="studyPhase" class="Fld" size="40" type="text"/></p>
|
21
|
-
|
22
|
-
<p><input id="btnSubmit" name="btnSubmit" class="btn" type="submit" value="Create Study"></p>
|
23
|
-
</form>
|
24
|
-
</section>
|
data/app/views/create_user.erb
DELETED
@@ -1,60 +0,0 @@
|
|
1
|
-
<script>
|
2
|
-
function showPasswordFields() {
|
3
|
-
document.getElementById('password_area').style.display = '';
|
4
|
-
document.getElementById('SetPasswordLink').style.display = 'none';
|
5
|
-
}
|
6
|
-
|
7
|
-
function showCapabilities() {
|
8
|
-
document.getElementById('capabilities_area').style.display = '';
|
9
|
-
document.getElementById('RevealCapabilities').style.display = 'none';
|
10
|
-
}
|
11
|
-
</script>
|
12
|
-
|
13
|
-
<section id="create_user">
|
14
|
-
<span id="navigate"><a href="entity_list">Back to List</a> | <a href="test_database">Logout</a></span></p>
|
15
|
-
<form id="userFormID" class="userFormClass" name="userFormName" method="post" action="/create_user">
|
16
|
-
<p><label id="lbl_loginName" class="Fld" for="loginName">Login Name:</label><br />
|
17
|
-
<input id="loginName" name="loginName" class="Fld" size="40" type="text"/></p>
|
18
|
-
|
19
|
-
<p><label id="lbl_firstName" class="Fld" for="firstName">First Name:</label><br />
|
20
|
-
<input id="firstName" name="firstName" class="Fld" size="40" type="text"/></p>
|
21
|
-
|
22
|
-
<p><label id="lbl_lastName" class="Fld" for="lastName">Last Name:</label><br />
|
23
|
-
<input id="lastName" name="lastName" class="Fld" size="40" type="text"/></p>
|
24
|
-
|
25
|
-
<p><label id="lbl_level" class="Fld" for="level">Maximum Level:</label><br />
|
26
|
-
<select name="level" id="level" class="sel_list_class">
|
27
|
-
<option value="option1">Expert</option>
|
28
|
-
<option value="option2">Advanced</option>
|
29
|
-
<option value="option3">Basic</option>
|
30
|
-
</select>
|
31
|
-
|
32
|
-
<p id="SetPasswordLink"><a href="#" onclick="showPasswordFields();">Set Password</a></p>
|
33
|
-
|
34
|
-
<div id="password_area" style="display:none;">
|
35
|
-
<p><label id="lbl_password" class="Fld" for="password">Password:</label><br />
|
36
|
-
<input id="password" name="password" class="Fld" size="40" type="password"/></p>
|
37
|
-
<p><label id="lbl_confirmPassword" class="Fld" for="confirmPassword">Confirm Password:</label><br />
|
38
|
-
<input id="confirmPassword" name="confirmPassword" class="Fld" size="40" type="password"/></p>
|
39
|
-
</div>
|
40
|
-
|
41
|
-
<p id="RevealCapabilities"><a href="#" onclick="showCapabilities();">Save Current Information</a></p>
|
42
|
-
|
43
|
-
<div id="capabilities_area" style="display:none;">
|
44
|
-
<p><label id="lbl_role" class="Fld" for="role">Role:</label><br />
|
45
|
-
<select name="role" id="role" class="sel_list_class">
|
46
|
-
<option value="option1">Administrator</option>
|
47
|
-
<option value="option2">Clinical Administrator</option>
|
48
|
-
<option value="option3">Project Sponsor</option>
|
49
|
-
</select>
|
50
|
-
|
51
|
-
<p><strong>Additional Capabilities:</strong></p>
|
52
|
-
<input id="can_edit" name="can_edit" class="cb_class" type="checkbox" value="1"/> Can Edit Reports<br />
|
53
|
-
<input id="can_export" name="can_export" class="cb_class" type="checkbox" value="2"/> Can Export Report Data<br />
|
54
|
-
<input id="can_access_api" name="can_access_api" class="cb_class" type="checkbox" value="3"/> Can Access Web Services<br />
|
55
|
-
<input id="can_administrate" name="can_administrate" class="cb_class" type="checkbox" value="4"/> Can Administrate
|
56
|
-
</div>
|
57
|
-
|
58
|
-
<p><input id="btnSubmit" name="btnSubmit" class="btn" type="submit" value="Create User"></p>
|
59
|
-
</form>
|
60
|
-
</section>
|
data/app/views/db_plans.erb
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
<section id="plans">
|
2
|
-
|
3
|
-
<p><a href="create_plan">Add New Plan</a> <span id="navigate"><a href="entity_list">Back to List</a> | <a href="test_database">Logout</a></span></p>
|
4
|
-
|
5
|
-
<hr/>
|
6
|
-
|
7
|
-
<% if @plans.count > 0 %>
|
8
|
-
<table class="entity">
|
9
|
-
<caption>
|
10
|
-
<strong>Current Plans</strong>
|
11
|
-
</caption>
|
12
|
-
<thead>
|
13
|
-
<th id="planName">Plan Name</th>
|
14
|
-
<th id="planStudy">Associated Study</th>
|
15
|
-
<th id="planDescription">Plan Description</th>
|
16
|
-
</thead>
|
17
|
-
<tbody>
|
18
|
-
<% @plans.each do |plan| %>
|
19
|
-
<tr>
|
20
|
-
<td headers="planName"><%= plan.plan_name %></td>
|
21
|
-
<td headers="planStudy"><%= plan.study %></td>
|
22
|
-
<td headers="planDescription"><%= plan.plan_description %></td>
|
23
|
-
</tr>
|
24
|
-
<% end %>
|
25
|
-
</tbody>
|
26
|
-
</table>
|
27
|
-
<% else %>
|
28
|
-
<p>No plans in database.</p>
|
29
|
-
<% end %>
|
30
|
-
|
31
|
-
</section>
|
data/app/views/db_products.erb
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
<section id="products">
|
2
|
-
<p><a href="create_product">Add New Product</a> <span id="navigate"><a href="entity_list">Back to List</a> | <a href="test_database">Logout</a></span></p>
|
3
|
-
|
4
|
-
<hr/>
|
5
|
-
|
6
|
-
<% if @products.length > 0 %>
|
7
|
-
<table class="entity">
|
8
|
-
<caption>
|
9
|
-
<strong>Current Products</strong>
|
10
|
-
</caption>
|
11
|
-
<thead>
|
12
|
-
<th id="productID">Product ID</th>
|
13
|
-
<th id="productName">Product Name</th>
|
14
|
-
<th id="productDescription">Product Description</th>
|
15
|
-
</thead>
|
16
|
-
<tbody>
|
17
|
-
<% @products.each do |product| %>
|
18
|
-
<tr>
|
19
|
-
<td headers="productID"><%= product.product_id %></td>
|
20
|
-
<td headers="productName"><%= product.name %></td>
|
21
|
-
<td headers="productDescription"><%= product.description %></td>
|
22
|
-
</tr>
|
23
|
-
<% end %>
|
24
|
-
</tbody>
|
25
|
-
</table>
|
26
|
-
<% else %>
|
27
|
-
<p>No products in database.</p>
|
28
|
-
<% end %>
|
29
|
-
</section>
|
data/app/views/db_studies.erb
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
<section id="studies">
|
2
|
-
|
3
|
-
<p><a href="create_study">Add New Study</a> <span id="navigate"><a href="entity_list">Back to List</a> | <a href="test_database">Logout</a></span></p>
|
4
|
-
|
5
|
-
<hr/>
|
6
|
-
|
7
|
-
<% if @studies.length > 0 %>
|
8
|
-
<table class="entity">
|
9
|
-
<caption>
|
10
|
-
<strong>Current Studies</strong>
|
11
|
-
</caption>
|
12
|
-
<thead>
|
13
|
-
<th id="studyName">Study Name</th>
|
14
|
-
<th id="studyProduct">Associated Product</th>
|
15
|
-
<th id="studyPhase">Study Phase</th>
|
16
|
-
<th id="studyProtocol">Study Protocol</th>
|
17
|
-
</thead>
|
18
|
-
<tbody>
|
19
|
-
<% @studies.each do |study| %>
|
20
|
-
<tr>
|
21
|
-
<td headers="studyName"><%= study.study_name %></td>
|
22
|
-
<td headers="studyProduct"><%= study.product %></td>
|
23
|
-
<td headers="studyPhase"><%= study.phase %></td>
|
24
|
-
<td headers="studyProtocol"><%= study.protocol %></td>
|
25
|
-
</tr>
|
26
|
-
<% end %>
|
27
|
-
</tbody>
|
28
|
-
</table>
|
29
|
-
<% else %>
|
30
|
-
<p>No studies in database.</p>
|
31
|
-
<% end %>
|
32
|
-
|
33
|
-
</section>
|
data/app/views/db_users.erb
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
<section id="users">
|
2
|
-
<p><a href="create_user">Add New User</a> <span id="navigate"><a href="entity_list">Back to List</a> | <a href="test_database">Logout</a></span></p>
|
3
|
-
|
4
|
-
<hr />
|
5
|
-
|
6
|
-
<% if @users.count > 0 %>
|
7
|
-
<table class="entity">
|
8
|
-
<thead>
|
9
|
-
<th>Current Users</th>
|
10
|
-
</thead>
|
11
|
-
<tbody>
|
12
|
-
<% @users.each do |user| %>
|
13
|
-
<tr>
|
14
|
-
<td><%= user.firstname + " " + user.lastname %></td>
|
15
|
-
<td><%= user.loginname %></td>
|
16
|
-
</tr>
|
17
|
-
<% end %>
|
18
|
-
</tbody>
|
19
|
-
</table>
|
20
|
-
<% else %>
|
21
|
-
<p>No users in database.</p>
|
22
|
-
<% end %>
|
23
|
-
</section>
|