woople-theme 0.2.41 → 0.2.42

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,63 @@
1
+ @import "woople-theme/variables.css.less";
2
+ @import "woople-theme/colours.css.less";
3
+
4
+ @assessment-fieldset-padding: 32px;
5
+ @question-number-offset: 18px;
6
+ @answer-label-font-size: 14px;
7
+
8
+ #assessment {
9
+ margin: 0;
10
+
11
+ .fieldset {
12
+ padding: @assessment-fieldset-padding;
13
+ }
14
+
15
+ .even {
16
+ background-color: white;
17
+ }
18
+
19
+ legend {
20
+ margin: 0 0 8px 0;
21
+ border: none;
22
+ padding-left: @question-number-offset;
23
+ font-size: 18px;
24
+ line-height: normal;
25
+ color: @primaryTextColour;
26
+
27
+ span {
28
+ margin-left: -@question-number-offset;
29
+ color: @primary;
30
+ }
31
+ }
32
+
33
+ label {
34
+ margin: 0;
35
+ padding-top: 8px;
36
+ font-size: @answer-label-font-size;
37
+ line-height: normal;
38
+ color: @secondaryTextColour;
39
+
40
+ input {
41
+ margin-top: 2px;
42
+ margin-bottom: 0;
43
+ width: @answer-label-font-size;
44
+ height: @answer-label-font-size;
45
+ }
46
+ }
47
+
48
+ .span8 {
49
+ padding-top: 12px;
50
+ }
51
+
52
+ .span4 {
53
+ text-align: right;
54
+ }
55
+
56
+ p {
57
+ margin-bottom: 0;
58
+ padding: @assessment-fieldset-padding / 2;
59
+ text-align: center;
60
+ font-size: @sosumi-font-size;
61
+ color: @secondaryTextColour;
62
+ }
63
+ }
@@ -16,7 +16,7 @@
16
16
 
17
17
  .content {
18
18
  background: @contentBackground;
19
- .box-shadow();
19
+ .box-shadow(@default-shadow);
20
20
  }
21
21
  }
22
22
 
@@ -17,6 +17,7 @@
17
17
  *= require woople-theme/legacy
18
18
  *= require woople-theme/basic-content
19
19
  *= require woople-theme/video-js.min
20
+ *= require woople-theme/assessment
20
21
 
21
22
  * PAGE SPECIFIC STYLES
22
23
  *= require woople-theme/course
@@ -5,7 +5,7 @@
5
5
  background: @primary;
6
6
  padding-right:10px;
7
7
 
8
- .box-shadow();
8
+ .box-shadow(@default-shadow);
9
9
 
10
10
  -webkit-transition: right, -webkit-transform 0.25s;
11
11
  -moz-transition: right, -moz-transform 0.25s;
@@ -11,7 +11,7 @@
11
11
  .border-radius(0);
12
12
  background-color:@contentBackground;
13
13
  border:none;
14
- .box-shadow();
14
+ .box-shadow(@default-shadow);
15
15
 
16
16
  h3 {
17
17
  .content-title();
@@ -66,7 +66,7 @@
66
66
  background:white;
67
67
  border-bottom:solid 1px transparent;
68
68
 
69
- .box-shadow();
69
+ .box-shadow(@default-shadow);
70
70
 
71
71
  -webkit-transform: rotateY(0deg);
72
72
  -webkit-transform-style: preserve-3d;
@@ -98,7 +98,7 @@
98
98
  width:100%;
99
99
  /*height:100%;*/
100
100
 
101
- .box-shadow();
101
+ .box-shadow(@default-shadow);
102
102
 
103
103
  -webkit-transform: rotateY(-180deg);
104
104
  -webkit-transform-style: preserve-3d;
@@ -60,7 +60,7 @@
60
60
  }
61
61
 
62
62
  p {
63
- font-size:12px;
63
+ font-size: @sosumi-font-size;
64
64
  line-height:18px;
65
65
  }
66
66
 
@@ -32,7 +32,7 @@
32
32
  .dropdown-menu {
33
33
  background: @contentBackground;
34
34
  .border-radius(0);
35
- .box-shadow();
35
+ .box-shadow(@default-shadow);
36
36
  top:33px;
37
37
  border:none;
38
38
  left:auto;
@@ -11,6 +11,10 @@
11
11
  @logoSize: 24px;
12
12
  @logoWithPadding: @logoSize * 3;
13
13
 
14
+ @default-shadow: 0 1px 3px rgba(0,0,0,.25);
15
+
16
+ @sosumi-font-size: 12px;
17
+
14
18
  /*course*/
15
19
  @imageWidth: 50px;
16
20
  @tableCellPadding: 10px;
@@ -50,4 +50,8 @@ module ThemeHelper
50
50
  output << content_tag(:a, I18n.t('woople_theme.search_results_more'), href: path, class: 'loading_indicator') unless path.nil?
51
51
  output.html_safe
52
52
  end
53
+
54
+ def assessment_form assessment_form
55
+ render partial: 'woople-theme/assessment_form', object: ThemePresentation.wrap(assessment_form, AssessmentFormPresenter)
56
+ end
53
57
  end
@@ -0,0 +1,5 @@
1
+ class AssessmentFormPresenter < SimpleDelegator
2
+ def render_copyright
3
+ yield if copyright.present?
4
+ end
5
+ end
@@ -26,7 +26,11 @@ class ThemePresentation
26
26
 
27
27
  def self.normalize(data)
28
28
  if data.is_a? Hash
29
- OpenStruct.new(data)
29
+ hash = {}
30
+ data.each { |key, value| hash[key] = normalize value }
31
+ OpenStruct.new hash
32
+ elsif data.is_a? Array
33
+ data.collect { |datum| normalize datum }
30
34
  else
31
35
  data
32
36
  end
@@ -0,0 +1,15 @@
1
+ <%= page_header image: nil, title: 'Assessment', description: assessment_form.description %>
2
+
3
+ <form id="assessment">
4
+ <%= render partial: 'woople-theme/assessment_form_question', collection: assessment_form.questions %>
5
+
6
+ <div class="fieldset <%= cycle 'odd', 'even' %>">
7
+ <div class="row-fluid">
8
+ <div class="span8"><span class="badge badge-warning"><%= t 'woople_theme.assessment_form.questions_unanswered', count: assessment_form.questions.count %></span></div>
9
+ <div class="span4"><input type="submit" value="Submit Assessment" class="btn btn-primary btn-large" disabled="disabled" /></div>
10
+ </div>
11
+ </div>
12
+ <% assessment_form.render_copyright do %>
13
+ <p class="<%= cycle 'odd', 'even' %>"><%= assessment_form.copyright %></p>
14
+ <% end %>
15
+ </form>
@@ -0,0 +1,2 @@
1
+ <% input_id = "question_#{question_number}_answer_#{assessment_form_answer_counter + 1}" %>
2
+ <label class="radio" for="<%= input_id %>"><input type="radio" id="<%= input_id %>" name="question_<%= question_number %>" /><%= assessment_form_answer %></label>
@@ -0,0 +1,7 @@
1
+ <% question_number = assessment_form_question_counter + 1 %>
2
+ <div class="fieldset <%= cycle 'odd', 'even' %>">
3
+ <legend><span><%= question_number %></span> <%= assessment_form_question.name %></legend>
4
+ <div>
5
+ <%= render partial: 'woople-theme/assessment_form_answer', collection: assessment_form_question.answers, locals: { question_number: question_number } %>
6
+ </div>
7
+ </div>
@@ -35,6 +35,10 @@ en:
35
35
  result_title: Result
36
36
  pass: Pass
37
37
  fail: Fail
38
+ assessment_form:
39
+ questions_unanswered:
40
+ one: 1 question unanswered
41
+ other: '%{count} questions unanswered'
38
42
  search_results_more: See All >
39
43
  date:
40
44
  formats:
@@ -1,3 +1,3 @@
1
1
  module WoopleTheme
2
- VERSION = "0.2.41"
2
+ VERSION = "0.2.42"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: woople-theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.41
4
+ version: 0.2.42
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-08 00:00:00.000000000 Z
12
+ date: 2012-06-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &70131051028540 !ruby/object:Gem::Requirement
16
+ requirement: &70093707099080 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,21 +21,32 @@ dependencies:
21
21
  version: 3.2.5
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70131051028540
24
+ version_requirements: *70093707099080
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: less-rails-bootstrap
27
- requirement: &70131051027940 !ruby/object:Gem::Requirement
27
+ requirement: &70093707098220 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - =
31
31
  - !ruby/object:Gem::Version
32
- version: 2.0.8
32
+ version: 2.0.13
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70131051027940
35
+ version_requirements: *70093707098220
36
+ - !ruby/object:Gem::Dependency
37
+ name: therubyracer
38
+ requirement: &70093707097200 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
44
+ type: :runtime
45
+ prerelease: false
46
+ version_requirements: *70093707097200
36
47
  - !ruby/object:Gem::Dependency
37
48
  name: bundler
38
- requirement: &70131051043900 !ruby/object:Gem::Requirement
49
+ requirement: &70093707096580 !ruby/object:Gem::Requirement
39
50
  none: false
40
51
  requirements:
41
52
  - - ! '>='
@@ -43,10 +54,10 @@ dependencies:
43
54
  version: '0'
44
55
  type: :development
45
56
  prerelease: false
46
- version_requirements: *70131051043900
57
+ version_requirements: *70093707096580
47
58
  - !ruby/object:Gem::Dependency
48
59
  name: sqlite3
49
- requirement: &70131051043440 !ruby/object:Gem::Requirement
60
+ requirement: &70093707096120 !ruby/object:Gem::Requirement
50
61
  none: false
51
62
  requirements:
52
63
  - - ! '>='
@@ -54,10 +65,10 @@ dependencies:
54
65
  version: '0'
55
66
  type: :development
56
67
  prerelease: false
57
- version_requirements: *70131051043440
68
+ version_requirements: *70093707096120
58
69
  - !ruby/object:Gem::Dependency
59
70
  name: rspec-rails
60
- requirement: &70131051042920 !ruby/object:Gem::Requirement
71
+ requirement: &70093707095420 !ruby/object:Gem::Requirement
61
72
  none: false
62
73
  requirements:
63
74
  - - ~>
@@ -65,10 +76,10 @@ dependencies:
65
76
  version: 2.9.0
66
77
  type: :development
67
78
  prerelease: false
68
- version_requirements: *70131051042920
79
+ version_requirements: *70093707095420
69
80
  - !ruby/object:Gem::Dependency
70
81
  name: capybara
71
- requirement: &70131051042480 !ruby/object:Gem::Requirement
82
+ requirement: &70093707094720 !ruby/object:Gem::Requirement
72
83
  none: false
73
84
  requirements:
74
85
  - - ! '>='
@@ -76,7 +87,7 @@ dependencies:
76
87
  version: '0'
77
88
  type: :development
78
89
  prerelease: false
79
- version_requirements: *70131051042480
90
+ version_requirements: *70093707094720
80
91
  description: All Front-End all the Time
81
92
  email:
82
93
  - developers@bigbangtechnology.com
@@ -115,6 +126,7 @@ files:
115
126
  - app/assets/images/woople-theme/video-js.png
116
127
  - app/assets/javascripts/assessment_flipper.js
117
128
  - app/assets/javascripts/woople-theme/theme.js
129
+ - app/assets/stylesheets/woople-theme/assessment.css.less
118
130
  - app/assets/stylesheets/woople-theme/base.css.less
119
131
  - app/assets/stylesheets/woople-theme/basic-content.css.less
120
132
  - app/assets/stylesheets/woople-theme/buttons.css.less
@@ -141,6 +153,7 @@ files:
141
153
  - app/assets/stylesheets/woople-theme/variables.css.less
142
154
  - app/helpers/javascript_helper.rb
143
155
  - app/helpers/theme_helper.rb
156
+ - app/presenters/assessment_form_presenter.rb
144
157
  - app/presenters/content_image.rb
145
158
  - app/presenters/content_item_presenter.rb
146
159
  - app/presenters/menu_link_presenter.rb
@@ -154,6 +167,9 @@ files:
154
167
  - app/presenters/profile_presenter.rb
155
168
  - app/presenters/theme_presentation.rb
156
169
  - app/views/layouts/theme.html.erb
170
+ - app/views/woople-theme/_assessment_form.html.erb
171
+ - app/views/woople-theme/_assessment_form_answer.html.erb
172
+ - app/views/woople-theme/_assessment_form_question.html.erb
157
173
  - app/views/woople-theme/_content_item.html.erb
158
174
  - app/views/woople-theme/_content_item_header.html.erb
159
175
  - app/views/woople-theme/_menu.html.erb
@@ -203,7 +219,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
203
219
  version: '0'
204
220
  requirements: []
205
221
  rubyforge_project:
206
- rubygems_version: 1.8.10
222
+ rubygems_version: 1.8.15
207
223
  signing_key:
208
224
  specification_version: 3
209
225
  summary: Our Front-End CSS Framework/Theme