survey_generator 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/lib/generators/survey/USAGE +10 -10
- data/lib/generators/survey/metamodels/survey_metamodel.rb +6 -5
- data/lib/generators/survey/survey_generator.rb +15 -15
- data/lib/generators/survey/templates/app/app.tpl +4 -6
- data/lib/generators/survey/templates/app/assets/assets.tpl +4 -0
- data/lib/generators/survey/templates/app/assets/stylesheets/stylesheet.tpl +188 -183
- data/lib/generators/survey/templates/app/controllers/application_controller.tpl +15 -0
- data/lib/generators/survey/templates/app/controllers/controllers.tpl +7 -0
- data/lib/generators/survey/templates/app/controllers/sessions_controller.tpl +26 -0
- data/lib/generators/survey/templates/app/controllers/static_pages_controller.tpl +20 -0
- data/lib/generators/survey/templates/app/controllers/survey_controller.tpl +0 -19
- data/lib/generators/survey/templates/app/controllers/users_controller.tpl +82 -0
- data/lib/generators/survey/templates/app/helpers/helpers.tpl +5 -0
- data/lib/generators/survey/templates/app/helpers/sessions_helper.tpl +46 -0
- data/lib/generators/survey/templates/app/helpers/users_helper.tpl +14 -0
- data/lib/generators/survey/templates/app/models/models.tpl +6 -0
- data/lib/generators/survey/templates/app/models/question.tpl +10 -0
- data/lib/generators/survey/templates/app/models/survey.tpl +10 -0
- data/lib/generators/survey/templates/app/models/test.tpl +15 -0
- data/lib/generators/survey/templates/app/models/user.tpl +28 -0
- data/lib/generators/survey/templates/app/views/layouts/footer.tpl +2 -2
- data/lib/generators/survey/templates/app/views/layouts/header.tpl +21 -13
- data/lib/generators/survey/templates/app/views/sessions/new.tpl +28 -0
- data/lib/generators/survey/templates/app/views/shared/error_messages.tpl +1 -1
- data/lib/generators/survey/templates/app/views/static_pages/home.tpl +1 -1
- data/lib/generators/survey/templates/app/views/survey/form.tpl +40 -0
- data/lib/generators/survey/templates/app/views/survey/index.tpl +40 -0
- data/lib/generators/survey/templates/app/views/survey/table.tpl +20 -0
- data/lib/generators/survey/templates/app/views/survey/textfield.tpl +21 -0
- data/lib/generators/survey/templates/app/views/users/edit.tpl +19 -0
- data/lib/generators/survey/templates/app/views/users/fields.tpl +24 -0
- data/lib/generators/survey/templates/app/views/users/index.tpl +17 -0
- data/lib/generators/survey/templates/app/views/users/new.tpl +15 -0
- data/lib/generators/survey/templates/app/views/users/show.tpl +15 -0
- data/lib/generators/survey/templates/app/views/users/user.tpl +11 -0
- data/lib/generators/survey/templates/app/views/views.tpl +11 -2
- data/lib/generators/survey/templates/config/routes.tpl +7 -0
- data/lib/generators/survey/templates/db/db.tpl +0 -1
- data/lib/generators/survey/templates/db/migrate/create_questions.tpl +5 -2
- data/lib/generators/survey/templates/db/migrate/create_surveys.tpl +4 -1
- data/lib/generators/survey/templates/db/migrate/create_users.tpl +1 -1
- data/lib/tasks/sample_data.rake +20 -0
- metadata +31 -11
- data/lib/generators/survey/templates/app/models/survey_model.tpl +0 -45
- data/lib/generators/survey/templates/app/views/survey/survey_form_view.tpl +0 -37
- data/lib/generators/survey/templates/app/views/survey/survey_index_view.tpl +0 -38
- data/lib/generators/survey/templates/db/migrate/create_pages.tpl +0 -18
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
NmRiNGVjZDM2OTdiMWFkZjg4M2E5MTYyODBmYWVkYmZiYjAwZDE5Nw==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
M2NjMGFhOWZlMmU2ZjAwMTcyZWQzZGRmMzFiMjEyNDcxM2ZlN2NhNw==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
MWNiOTVhMTY5NmFlODhjMzAzMzY2MDVjNzBmMzBlMTFmYzA0MTk3OWQ3YWJi
|
10
|
+
M2E3Mzg0OWJjYzQzYjA3NWMyMzBmNzc0YzYzNzA2OTVjNjdhNmU3MDY4OTAy
|
11
|
+
ZWE5YjEwNWZmZTQwNjQ3MWZiYjg2ZTc5MzQ1NGQ1ZDAwYTU4NWI=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
MDk0Mjc2NDdmMTM5ZDRhMWZhY2FiMzk1MzUwMjY0MjAwNWQxZDZlMjk1ZjZl
|
14
|
+
ZTczNWI4YjlmMzlmYWI5NTVjYTkwMGRlMDYzMDJhMzljZjA3N2ZhYWM2NzIz
|
15
|
+
YTk3NGFkNDA4ODVhMTE3ZThhZWNlODVlZDM0OWZjNDQ0NjE5Y2Q=
|
data/lib/generators/survey/USAGE
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
Description:
|
2
|
-
This generator will generate classes for a rails application to display a survey.
|
3
|
-
|
4
|
-
Example:
|
5
|
-
rails generate survey
|
6
|
-
|
7
|
-
This will create:
|
8
|
-
app/controllers/[NAME]_controller.rb
|
9
|
-
app/models/[NAME].rb
|
10
|
-
app/views/[NAME]/_form.html.erb
|
1
|
+
Description:
|
2
|
+
This generator will generate classes for a rails application to display a survey.
|
3
|
+
|
4
|
+
Example:
|
5
|
+
rails generate survey
|
6
|
+
|
7
|
+
This will create:
|
8
|
+
app/controllers/[NAME]_controller.rb
|
9
|
+
app/models/[NAME].rb
|
10
|
+
app/views/[NAME]/_form.html.erb
|
11
11
|
app/views/[NAME]/index.html.erb
|
@@ -3,6 +3,7 @@ require 'rgen/metamodel_builder'
|
|
3
3
|
module SurveyMetamodel extend RGen::MetamodelBuilder::ModuleExtension
|
4
4
|
class AnswerOption < RGen::MetamodelBuilder::MMBase
|
5
5
|
has_attr 'name', String
|
6
|
+
has_attr 'title', String
|
6
7
|
has_attr 'foreground', String #Color
|
7
8
|
has_attr 'background', String #Color
|
8
9
|
#has_attr 'stylingOptions', Array
|
@@ -46,9 +47,11 @@ module SurveyMetamodel extend RGen::MetamodelBuilder::ModuleExtension
|
|
46
47
|
end
|
47
48
|
|
48
49
|
class Row < RGen::MetamodelBuilder::MMBase
|
50
|
+
has_attr 'name', String
|
49
51
|
end
|
50
52
|
|
51
53
|
class Column < RGen::MetamodelBuilder::MMBase
|
54
|
+
has_attr 'name', String
|
52
55
|
end
|
53
56
|
|
54
57
|
class Table < Answer
|
@@ -68,16 +71,14 @@ module SurveyMetamodel extend RGen::MetamodelBuilder::ModuleExtension
|
|
68
71
|
contains_many 'answers', Answer, 'question'
|
69
72
|
end
|
70
73
|
|
71
|
-
class
|
72
|
-
has_attr '
|
73
|
-
has_attr 'number', Integer
|
74
|
-
contains_many 'questions', Question, 'page'
|
74
|
+
class PageBreak < Question
|
75
|
+
has_attr 'nextPageNumber', Integer
|
75
76
|
end
|
76
77
|
|
77
78
|
class Survey < RGen::MetamodelBuilder::MMBase
|
78
79
|
has_attr 'name', String
|
79
80
|
has_attr 'title', String
|
80
81
|
has_attr 'author', String
|
81
|
-
contains_many '
|
82
|
+
contains_many 'questions', Question, 'page'
|
82
83
|
end
|
83
84
|
end
|
@@ -1,16 +1,16 @@
|
|
1
|
-
$:.unshift File.dirname(__FILE__)
|
2
|
-
|
3
|
-
require 'metamodels/survey_metamodel'
|
4
|
-
require 'rgen/template_language'
|
5
|
-
require 'rgen/array_extensions'
|
6
|
-
|
7
|
-
class SurveyGenerator < Rails::Generators::Base
|
8
|
-
source_root File.expand_path('/templates', __FILE__)
|
9
|
-
|
10
|
-
def generate_survey
|
11
|
-
require Rails.root.to_s + '/gen/models/survey_model'
|
12
|
-
tc = RGen::TemplateLanguage::DirectoryTemplateContainer.new(SurveyMetamodel, Rails.root.to_s)
|
13
|
-
tc.load(File.dirname(__FILE__) + '/templates')
|
14
|
-
tc.expand('main::root', for: MODEL.first)
|
15
|
-
end
|
1
|
+
$:.unshift File.dirname(__FILE__)
|
2
|
+
|
3
|
+
require 'metamodels/survey_metamodel'
|
4
|
+
require 'rgen/template_language'
|
5
|
+
require 'rgen/array_extensions'
|
6
|
+
|
7
|
+
class SurveyGenerator < Rails::Generators::Base
|
8
|
+
source_root File.expand_path('/templates', __FILE__)
|
9
|
+
|
10
|
+
def generate_survey
|
11
|
+
require Rails.root.to_s + '/gen/models/survey_model'
|
12
|
+
tc = RGen::TemplateLanguage::DirectoryTemplateContainer.new(SurveyMetamodel, Rails.root.to_s)
|
13
|
+
tc.load(File.dirname(__FILE__) + '/templates')
|
14
|
+
tc.expand('main::root', for: MODEL.first)
|
15
|
+
end
|
16
16
|
end
|
@@ -1,9 +1,7 @@
|
|
1
1
|
<% define 'root' do %>
|
2
|
-
<% expand 'models/
|
3
|
-
<% expand 'controllers/
|
4
|
-
<% expand 'helpers/
|
2
|
+
<% expand 'models/models::root' %>
|
3
|
+
<% expand 'controllers/controllers::root' %>
|
4
|
+
<% expand 'helpers/helpers::root' %>
|
5
5
|
<% expand 'views/views::root' %>
|
6
|
-
|
7
|
-
<% expand 'assets/stylesheets/stylesheet::stylesheet' %>
|
8
|
-
<% expand 'assets/javascripts/application::application' %>
|
6
|
+
<% expand 'assets/assets::root' %>
|
9
7
|
<% end %>
|
@@ -14,9 +14,9 @@
|
|
14
14
|
|
15
15
|
<%nl%>
|
16
16
|
@mixin box_sizing {<%iinc%>
|
17
|
-
|
18
|
-
|
19
|
-
|
17
|
+
-moz-box-sizing: border-box;
|
18
|
+
-webkit-box-sizing: border-box;
|
19
|
+
box-sizing: border-box;
|
20
20
|
<%idec%>}
|
21
21
|
|
22
22
|
<%nl%>
|
@@ -24,42 +24,42 @@
|
|
24
24
|
|
25
25
|
<%nl%>
|
26
26
|
html {<%iinc%>
|
27
|
-
|
27
|
+
overflow-y: scroll;
|
28
28
|
<%idec%>}
|
29
29
|
|
30
30
|
<%nl%>
|
31
31
|
body {<%iinc%>
|
32
|
-
|
32
|
+
padding-top: 60px;
|
33
33
|
<%idec%>}
|
34
34
|
|
35
35
|
<%nl%>
|
36
36
|
section {<%iinc%>
|
37
|
-
|
37
|
+
overflow: auto;
|
38
38
|
<%idec%>}
|
39
39
|
|
40
40
|
<%nl%>
|
41
41
|
textarea {<%iinc%>
|
42
|
-
|
42
|
+
resize: vertical;
|
43
43
|
<%idec%>}
|
44
44
|
|
45
45
|
<%nl%>
|
46
46
|
.center {<%iinc%>
|
47
|
-
|
47
|
+
text-align: center;
|
48
48
|
<%idec%>}
|
49
49
|
|
50
50
|
<%nl%>
|
51
51
|
.center h1 {<%iinc%>
|
52
|
-
|
52
|
+
margin-bottom: 10px;
|
53
53
|
<%idec%>}
|
54
54
|
|
55
55
|
<%nl%>
|
56
56
|
/* (original CSS) */
|
57
57
|
/*
|
58
58
|
.center {<%iinc%>
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
59
|
+
text-align: center;
|
60
|
+
h1 {<%iinc%>
|
61
|
+
margin-bottom: 10px;
|
62
|
+
<%idec%>}
|
63
63
|
<%idec%>}
|
64
64
|
*/
|
65
65
|
|
@@ -68,25 +68,25 @@
|
|
68
68
|
|
69
69
|
<%nl%>
|
70
70
|
h1, h2, h3, h4, h5, h6 {<%iinc%>
|
71
|
-
|
71
|
+
line-height: 1;
|
72
72
|
<%idec%>}
|
73
73
|
|
74
74
|
<%nl%>
|
75
75
|
h1 {<%iinc%>
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
76
|
+
font-size: 3em;
|
77
|
+
letter-spacing: -2px;
|
78
|
+
margin-bottom: 30px;
|
79
|
+
text-align: center;
|
80
80
|
<%idec%>}
|
81
81
|
|
82
82
|
<%nl%>
|
83
83
|
h2 {<%iinc%>
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
84
|
+
font-size: 1.7em;
|
85
|
+
letter-spacing: -1px;
|
86
|
+
margin-bottom: 30px;
|
87
|
+
text-align: center;
|
88
|
+
font-weight: normal;
|
89
|
+
color: $lightgray;
|
90
90
|
<%idec%>}
|
91
91
|
|
92
92
|
<%nl%>
|
@@ -94,40 +94,40 @@
|
|
94
94
|
|
95
95
|
<%nl%>
|
96
96
|
#logo {<%iinc%>
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
97
|
+
float: left;
|
98
|
+
margin-right: 10px;
|
99
|
+
font-size: 1,7em;
|
100
|
+
color: #fff;
|
101
|
+
text-transform: uppercase;
|
102
|
+
letter-spacing: -1px;
|
103
|
+
padding-top: 9px;
|
104
|
+
font-weight: bold;
|
105
|
+
line-height: 1;
|
106
106
|
<%idec%>}
|
107
107
|
|
108
108
|
<%nl%>
|
109
109
|
#logo:hover {<%iinc%>
|
110
|
-
|
111
|
-
|
110
|
+
color: #fff;
|
111
|
+
text-decoration: none;
|
112
112
|
<%idec%>}
|
113
113
|
|
114
114
|
<%nl%>
|
115
115
|
/* (original CSS) */
|
116
116
|
/*
|
117
117
|
#logo {<%iinc%>
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
118
|
+
float: left;
|
119
|
+
margin-right: 10px;
|
120
|
+
font-size: 1.7em;
|
121
|
+
color: #fff;
|
122
|
+
text-transform: uppercase;
|
123
|
+
letter-spacing: -1px;
|
124
|
+
padding-top: 9px;
|
125
|
+
font-weight: bold;
|
126
|
+
line-height: 1;
|
127
|
+
&:hover {<%iinc%>
|
128
|
+
color: #fff;
|
129
|
+
text-decoration: none;
|
130
|
+
<%idec%>}
|
131
131
|
<%idec%>}
|
132
132
|
*/
|
133
133
|
|
@@ -136,70 +136,70 @@
|
|
136
136
|
|
137
137
|
<%nl%>
|
138
138
|
footer {<%iinc%>
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
139
|
+
margin-top: 48px;
|
140
|
+
padding-top: 5px;
|
141
|
+
border-top: 1px solid $grayMediumLight;
|
142
|
+
color: $lightgray;
|
143
143
|
<%idec%>}
|
144
144
|
|
145
145
|
<%nl%>
|
146
146
|
footer a {<%iinc%>
|
147
|
-
|
147
|
+
color: $gray;
|
148
148
|
<%idec%>}
|
149
149
|
|
150
150
|
<%nl%>
|
151
151
|
footer a:hover {<%iinc%>
|
152
|
-
|
152
|
+
color: $grayDarker;
|
153
153
|
<%idec%>}
|
154
154
|
|
155
155
|
<%nl%>
|
156
156
|
footer small {<%iinc%>
|
157
|
-
|
157
|
+
float: left;
|
158
158
|
<%idec%>}
|
159
159
|
|
160
160
|
<%nl%>
|
161
161
|
footer ul {<%iinc%>
|
162
|
-
|
163
|
-
|
162
|
+
float: right;
|
163
|
+
list-style: none;
|
164
164
|
<%idec%>}
|
165
165
|
|
166
166
|
<%nl%>
|
167
167
|
footer ul li {<%iinc%>
|
168
|
-
|
169
|
-
|
168
|
+
float: left;
|
169
|
+
margin-left: 10px;
|
170
170
|
<%idec%>}
|
171
171
|
|
172
172
|
<%nl%>
|
173
173
|
/* (original CSS) */
|
174
174
|
/*
|
175
175
|
footer {<%iinc%>
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
<%nl%>
|
188
|
-
small {<%iinc%>
|
189
|
-
float: left;
|
190
|
-
<%idec%>}
|
191
|
-
|
192
|
-
<%nl%>
|
193
|
-
ul {<%iinc%>
|
194
|
-
float: right;
|
195
|
-
list-style: none;
|
196
|
-
|
176
|
+
margin-top: 48px;
|
177
|
+
padding-top: 5px;
|
178
|
+
border-top: 1px solid #eaeaea;
|
179
|
+
color: #999;
|
180
|
+
a {<%iinc%>
|
181
|
+
color: #555;
|
182
|
+
&:hover {<%iinc%>
|
183
|
+
color: #222;
|
184
|
+
<%idec%>}
|
185
|
+
<%idec%>}
|
186
|
+
|
197
187
|
<%nl%>
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
188
|
+
small {<%iinc%>
|
189
|
+
float: left;
|
190
|
+
<%idec%>}
|
191
|
+
|
192
|
+
<%nl%>
|
193
|
+
ul {<%iinc%>
|
194
|
+
float: right;
|
195
|
+
list-style: none;
|
196
|
+
|
197
|
+
<%nl%>
|
198
|
+
li {<%iinc%>
|
199
|
+
float: left;
|
200
|
+
margin-left: 10px;
|
201
|
+
<%idec%>}
|
202
|
+
<%idec%>}
|
203
203
|
<%idec%>}
|
204
204
|
*/
|
205
205
|
|
@@ -208,11 +208,11 @@
|
|
208
208
|
|
209
209
|
<%nl%>
|
210
210
|
.debug_dump {<%iinc%>
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
211
|
+
clear: both;
|
212
|
+
float: left;
|
213
|
+
width: 100%;
|
214
|
+
margin-top: 45px;
|
215
|
+
@include box-sizing;
|
216
216
|
<%idec%>}
|
217
217
|
|
218
218
|
<%nl%>
|
@@ -220,63 +220,63 @@
|
|
220
220
|
|
221
221
|
<%nl%>
|
222
222
|
aside {<%iinc%>
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
223
|
+
section {<%iinc%>
|
224
|
+
padding: 10px 0;
|
225
|
+
border-top: 1px solid $grayLighter;
|
226
|
+
&:first-child {<%iinc%>
|
227
|
+
border: 0;
|
228
|
+
padding-top: 0;
|
229
|
+
<%idec%>}
|
230
|
+
span {<%iinc%>
|
231
|
+
display: block;
|
232
|
+
margin-bottom: 3px;
|
233
|
+
line-height: 1;
|
234
|
+
<%idec%>}
|
235
|
+
h1 {<%iinc%>
|
236
|
+
font-size: 1.4em;
|
237
|
+
text-align: left;
|
238
|
+
letter-spacing: -1px;
|
239
|
+
margin-bottom: 3px;
|
240
|
+
margin-top: 0px;
|
241
|
+
<%idec%>}
|
242
|
+
<%idec%>}
|
243
243
|
<%idec%>}
|
244
244
|
|
245
245
|
<%nl%>
|
246
246
|
.gravatar {<%iinc%>
|
247
|
-
|
248
|
-
|
247
|
+
float: left;
|
248
|
+
margin-right: 10px;
|
249
249
|
<%idec%>}
|
250
250
|
|
251
251
|
<%nl%>
|
252
252
|
.stats {<%iinc%>
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
253
|
+
overflow: auto;
|
254
|
+
a {<%iinc%>
|
255
|
+
float: left;
|
256
|
+
padding: 0 10px;
|
257
|
+
border-left: 1px solid $grayLighter;
|
258
|
+
color: gray;
|
259
|
+
&:first-child {<%iinc%>
|
260
|
+
padding-left: 0;
|
261
|
+
border: 0;
|
262
|
+
<%idec%>}
|
263
|
+
&:hover {<%iinc%>
|
264
|
+
text-decoration: none;
|
265
|
+
color: $blue;
|
266
|
+
<%idec%>}
|
267
|
+
<%idec%>}
|
268
|
+
strong {<%iinc%>
|
269
|
+
display: block;
|
270
|
+
<%idec%>}
|
271
271
|
<%idec%>}
|
272
272
|
|
273
273
|
<%nl%>
|
274
274
|
.user_avatars {<%iinc%>
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
275
|
+
overflow: auto;
|
276
|
+
margin-top: 10px;
|
277
|
+
.gravatar {<%iinc%>
|
278
|
+
margin: 1px 1px;
|
279
|
+
<%idec%>}
|
280
280
|
<%idec%>}
|
281
281
|
|
282
282
|
<%nl%>
|
@@ -284,31 +284,31 @@
|
|
284
284
|
|
285
285
|
<%nl%>
|
286
286
|
input, textarea, select, .uneditable-input {<%iinc%>
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
287
|
+
border: 1px solid #bbb;
|
288
|
+
width: 100%;
|
289
|
+
padding: 10px;
|
290
|
+
margin-bottom: 15px;
|
291
|
+
@include box_sizing;
|
292
292
|
<%idec%>}
|
293
293
|
|
294
294
|
<%nl%>
|
295
295
|
input {<%iinc%>
|
296
|
-
|
296
|
+
height: auto !important;
|
297
297
|
<%idec%>}
|
298
298
|
|
299
299
|
<%nl%>
|
300
300
|
#error_explanation {<%iinc%>
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
301
|
+
color: #f00;
|
302
|
+
ul {<%iinc%>
|
303
|
+
list-style: none;
|
304
|
+
margin: 0 0 18px 0;
|
305
|
+
<%idec%>}
|
306
306
|
<%idec%>}
|
307
307
|
|
308
308
|
<%nl%>
|
309
309
|
.field_with_errors {<%iinc%>
|
310
|
-
|
311
|
-
|
310
|
+
@extend .control-group;
|
311
|
+
@extend .error;
|
312
312
|
<%idec%>}
|
313
313
|
|
314
314
|
<%nl%>
|
@@ -316,16 +316,16 @@
|
|
316
316
|
|
317
317
|
<%nl%>
|
318
318
|
.users {<%iinc%>
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
319
|
+
list-style: none;
|
320
|
+
margin: 0;
|
321
|
+
li {<%iinc%>
|
322
|
+
overflow: auto;
|
323
|
+
padding: 10px 0;
|
324
|
+
border-top: 1px solid $grayLighter;
|
325
|
+
&:last-child {<%iinc%>
|
326
|
+
border-bottom: 1px solid $grayLighter;
|
327
|
+
<%idec%>}
|
328
|
+
<%idec%>}
|
329
329
|
<%idec%>}
|
330
330
|
|
331
331
|
<%nl%>
|
@@ -333,59 +333,64 @@
|
|
333
333
|
|
334
334
|
<%nl%>
|
335
335
|
.microposts {<%iinc%>
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
336
|
+
list-style: none;
|
337
|
+
margin: 10px 0 0 0;
|
338
|
+
li {<%iinc%>
|
339
|
+
padding: 10px 0;
|
340
|
+
border-top: 1px solid #e8e8e8;
|
341
|
+
<%idec%>}
|
342
342
|
<%idec%>}
|
343
343
|
|
344
344
|
<%nl%>
|
345
345
|
.content {<%iinc%>
|
346
|
-
|
346
|
+
display: block;
|
347
347
|
<%idec%>}
|
348
348
|
|
349
349
|
<%nl%>
|
350
350
|
.timestamp {<%iinc%>
|
351
|
-
|
351
|
+
color: $grayLight;
|
352
352
|
<%idec%>}
|
353
353
|
|
354
354
|
<%nl%>
|
355
355
|
.gravatar {<%iinc%>
|
356
|
-
|
357
|
-
|
356
|
+
float: left;
|
357
|
+
margin-right: 10px;
|
358
358
|
<%idec%>}
|
359
359
|
|
360
360
|
<%nl%>
|
361
361
|
aside {<%iinc%>
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
362
|
+
textarea {<%iinc%>
|
363
|
+
height: 100px;
|
364
|
+
margin-bottom: 5px;
|
365
|
+
<%idec%>}
|
366
|
+
<%idec%>}
|
367
|
+
|
368
|
+
<%nl%>
|
369
|
+
/* survey */
|
370
|
+
|
371
|
+
<%nl%>
|
372
|
+
.author {<%iinc%>
|
373
|
+
color: $lightgray;
|
374
|
+
text-align: center;
|
366
375
|
<%idec%>}
|
367
376
|
|
368
377
|
<%nl%>
|
369
378
|
/* custom */
|
370
379
|
|
371
|
-
<% expand '
|
380
|
+
<% expand 'question', foreach: questions %>
|
372
381
|
<% end %>
|
373
382
|
<% end %>
|
374
383
|
|
375
|
-
<% define '
|
376
|
-
<% expand '
|
377
|
-
<% end %>
|
378
|
-
|
379
|
-
<% define 'survey_question', for: Question do %>
|
380
|
-
<% expand 'survey_answer', foreach: answers %>
|
384
|
+
<% define 'question', for: Question do %>
|
385
|
+
<% expand 'answer', foreach: answers %>
|
381
386
|
<% end %>
|
382
387
|
|
383
|
-
<% define '
|
384
|
-
<% expand '
|
388
|
+
<% define 'answer', for: Answer do %>
|
389
|
+
<% expand 'answer_option', foreach: options %>
|
385
390
|
<% end %>
|
386
391
|
|
387
|
-
<% define '
|
388
|
-
<% if name != nil &&
|
392
|
+
<% define 'answer_option', for: AnswerOption do %>
|
393
|
+
<% if name != nil && name != "" %>
|
389
394
|
<%nl%>
|
390
395
|
.<%= name %> {<%iinc%>
|
391
396
|
<% if foreground != nil %>color: <%= foreground %>;<% end %>
|