woople-theme 0.5.8 → 0.5.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/app/assets/stylesheets/woople-theme/base.css.less +2 -2
- data/app/assets/stylesheets/woople-theme/dashboard/base.css.less +38 -0
- data/app/assets/stylesheets/woople-theme/outline.css.less +1 -92
- data/app/assets/stylesheets/woople-theme/variables.css.less +94 -0
- data/app/helpers/dashboard_helper.rb +18 -5
- data/app/presenters/content_item_presenter.rb +26 -3
- data/app/presenters/woople_theme/dashboard/elective_exception_presenter.rb +13 -0
- data/app/presenters/woople_theme/dashboard/elective_history_presenter.rb +52 -0
- data/app/presenters/woople_theme/dashboard/electives_section_presenter.rb +16 -0
- data/app/presenters/woople_theme/dashboard/essential_completed_presenter.rb +40 -0
- data/app/presenters/woople_theme/dashboard/essential_exception_presenter.rb +21 -0
- data/app/presenters/woople_theme/dashboard/essentials_section_presenter.rb +5 -7
- data/app/presenters/woople_theme/dashboard/exception_presenter.rb +28 -0
- data/app/views/dashboard/_electives_section.html.erb +30 -0
- data/app/views/dashboard/_essentials_section.html.erb +19 -10
- data/app/views/dashboard/_exception.html.erb +7 -0
- data/app/views/woople-theme/_content_item.html.erb +28 -9
- data/app/views/woople-theme/_outline_assessment.html.erb +1 -1
- data/config/locales/en.yml +14 -4
- data/lib/woople-theme/version.rb +1 -1
- metadata +8 -6
- data/app/presenters/woople_theme/dashboard/completed_content_item_presenter.rb +0 -7
- data/app/presenters/woople_theme/dashboard/completed_essential_presenter.rb +0 -16
- data/app/views/dashboard/_completed_essential.html.erb +0 -12
- data/app/views/dashboard/_total_courses.html.erb +0 -3
|
@@ -19,6 +19,44 @@ section.certification-content {
|
|
|
19
19
|
}
|
|
20
20
|
.nav {
|
|
21
21
|
margin-bottom: 0;
|
|
22
|
+
|
|
23
|
+
a {
|
|
24
|
+
outline: none
|
|
25
|
+
}
|
|
22
26
|
}
|
|
23
27
|
|
|
28
|
+
.styled-table();
|
|
29
|
+
|
|
30
|
+
table {
|
|
31
|
+
tr > td:first-child, tr > th:first-child {
|
|
32
|
+
color: @secondaryTextColour;
|
|
33
|
+
width: 20%;
|
|
34
|
+
padding-top:@tableCellPadding * 1.6;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
tr {
|
|
38
|
+
border-bottom:solid 1px @insetContentBorder;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
h2 {
|
|
42
|
+
.content-title();
|
|
43
|
+
|
|
44
|
+
margin-bottom: 0;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@media (max-width: 767px) {
|
|
49
|
+
table {
|
|
50
|
+
tr > td:first-child, tr > th:first-child {
|
|
51
|
+
padding-left:@phoneMargin;
|
|
52
|
+
text-indent:@phoneMargin * 1.5;
|
|
53
|
+
width: 35%;
|
|
54
|
+
|
|
55
|
+
> *:first-child {
|
|
56
|
+
text-indent:0;
|
|
57
|
+
margin-left:@phoneMargin;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
24
62
|
}
|
|
@@ -78,102 +78,11 @@
|
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
|
|
82
|
-
.action {
|
|
83
|
-
display:none;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.disabled td {
|
|
88
|
-
.opacity(50);
|
|
89
|
-
|
|
90
|
-
a:hover {
|
|
91
|
-
text-decoration:none;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.action {
|
|
95
|
-
display:none;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
tr.disabled {
|
|
101
|
-
&:hover {
|
|
102
|
-
td {
|
|
103
|
-
background:none;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
td {
|
|
108
|
-
background-color:transparent;
|
|
109
|
-
text-shadow:none;
|
|
110
|
-
color:@primaryTextColour;
|
|
111
|
-
|
|
112
|
-
a {
|
|
113
|
-
color:@primaryTextColour;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.action {
|
|
117
|
-
display:none;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
table {
|
|
123
|
-
margin-bottom:0;
|
|
124
|
-
|
|
125
|
-
th {
|
|
126
|
-
color: @secondaryTextColour;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
th, td {
|
|
130
|
-
padding:@tableCellPadding;
|
|
131
|
-
border-top:none;
|
|
132
|
-
a {
|
|
133
|
-
color:@primaryTextColour;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
.count {
|
|
138
|
-
width:75px;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
th {
|
|
142
|
-
border-top:none;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
tr > td:first-child, tr > th:first-child {
|
|
146
|
-
padding-left:@contentPadding;
|
|
147
|
-
width:@gridGutterWidth + @imageWidth - (@tableCellPadding * 2);
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.action {
|
|
151
|
-
display:block;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
tr:hover {
|
|
155
|
-
td {
|
|
156
|
-
background-color:@highlightBackground;
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
}
|
|
81
|
+
.styled-table();
|
|
160
82
|
}
|
|
161
83
|
|
|
162
84
|
@media (max-width: 767px) {
|
|
163
85
|
.outline {
|
|
164
|
-
table {
|
|
165
|
-
tr > td:first-child, tr > th:first-child {
|
|
166
|
-
padding-left:@phoneMargin;
|
|
167
|
-
text-indent:@phoneMargin * 1.5;
|
|
168
|
-
|
|
169
|
-
> *:first-child {
|
|
170
|
-
text-indent:0;
|
|
171
|
-
margin-left:@phoneMargin;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
}
|
|
177
86
|
|
|
178
87
|
h2 {
|
|
179
88
|
.outline-title(@phoneLeftColumnOffset);
|
|
@@ -109,3 +109,97 @@
|
|
|
109
109
|
-moz-border-radius: 0 0 @radius @radius;
|
|
110
110
|
border-radius: 0 0 @radius @radius;
|
|
111
111
|
}
|
|
112
|
+
|
|
113
|
+
.styled-table() {
|
|
114
|
+
table {
|
|
115
|
+
margin-bottom:0;
|
|
116
|
+
|
|
117
|
+
th {
|
|
118
|
+
color: @secondaryTextColour;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
th, td {
|
|
122
|
+
padding:@tableCellPadding;
|
|
123
|
+
border-top:none;
|
|
124
|
+
a {
|
|
125
|
+
color:@primaryTextColour;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.count {
|
|
130
|
+
width:75px;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
th {
|
|
134
|
+
border-top:none;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
tr > td:first-child, tr > th:first-child {
|
|
138
|
+
padding-left:@contentPadding;
|
|
139
|
+
width:@gridGutterWidth + @imageWidth - (@tableCellPadding * 2);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.action {
|
|
143
|
+
display:block;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
tr:hover {
|
|
147
|
+
td {
|
|
148
|
+
background-color:@highlightBackground;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
tr.completed {
|
|
152
|
+
.action {
|
|
153
|
+
display:none;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.disabled td {
|
|
158
|
+
.opacity(50);
|
|
159
|
+
|
|
160
|
+
a:hover {
|
|
161
|
+
text-decoration:none;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.action {
|
|
165
|
+
display:none;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
tr.disabled {
|
|
171
|
+
&:hover {
|
|
172
|
+
td {
|
|
173
|
+
background:none;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
td {
|
|
178
|
+
background-color:transparent;
|
|
179
|
+
text-shadow:none;
|
|
180
|
+
color:@primaryTextColour;
|
|
181
|
+
|
|
182
|
+
a {
|
|
183
|
+
color:@primaryTextColour;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.action {
|
|
187
|
+
display:none;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
@media (max-width: 767px) {
|
|
193
|
+
tr > td:first-child, tr > th:first-child {
|
|
194
|
+
padding-left:@phoneMargin;
|
|
195
|
+
text-indent:@phoneMargin * 1.5;
|
|
196
|
+
|
|
197
|
+
> *:first-child {
|
|
198
|
+
text-indent:0;
|
|
199
|
+
margin-left:@phoneMargin;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
}
|
|
@@ -9,18 +9,31 @@ module DashboardHelper
|
|
|
9
9
|
object: ThemePresentation.wrap(presenter, WoopleTheme::Dashboard::EssentialsSectionPresenter)
|
|
10
10
|
end
|
|
11
11
|
|
|
12
|
+
def essentials_completed(items)
|
|
13
|
+
render_collection_partial(items, WoopleTheme::Dashboard::EssentialCompletedPresenter, 'woople-theme/content_item')
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def essentials_exceptions(items)
|
|
17
|
+
render_collection_partial(items, WoopleTheme::Dashboard::EssentialExceptionPresenter, 'dashboard/exception')
|
|
18
|
+
end
|
|
19
|
+
|
|
12
20
|
def electives_section(presenter)
|
|
13
21
|
render partial: 'dashboard/electives_section',
|
|
14
22
|
object: ThemePresentation.wrap(presenter, WoopleTheme::Dashboard::ElectivesSectionPresenter)
|
|
15
23
|
end
|
|
16
24
|
|
|
17
|
-
def
|
|
18
|
-
|
|
19
|
-
render partial: 'dashboard/completed_essential', collection: collection
|
|
25
|
+
def electives_history(items)
|
|
26
|
+
render_collection_partial(items, WoopleTheme::Dashboard::ElectiveHistoryPresenter, 'woople-theme/content_item')
|
|
20
27
|
end
|
|
21
28
|
|
|
22
|
-
def
|
|
23
|
-
|
|
29
|
+
def electives_exceptions(items)
|
|
30
|
+
render_collection_partial(items, WoopleTheme::Dashboard::ElectiveExceptionPresenter, 'dashboard/exception')
|
|
24
31
|
end
|
|
25
32
|
|
|
33
|
+
private
|
|
34
|
+
|
|
35
|
+
def render_collection_partial(items, presenter, partial)
|
|
36
|
+
collection = ThemePresentation.wrap_collection(items, presenter)
|
|
37
|
+
render partial: partial, collection: collection
|
|
38
|
+
end
|
|
26
39
|
end
|
|
@@ -1,13 +1,36 @@
|
|
|
1
1
|
require 'delegate'
|
|
2
2
|
require_relative 'content_image'
|
|
3
3
|
|
|
4
|
-
class ContentItemPresenter <
|
|
4
|
+
class ContentItemPresenter < ExplicitDelegator
|
|
5
5
|
include ContentImage
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
enforce_definitions :image, :name, :url
|
|
8
|
+
|
|
9
|
+
def render_time_remaining(&block)
|
|
10
|
+
yield(source.time_remaining, source.time_total)
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def render_popularity(&block)
|
|
14
|
+
yield(source.popularity)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def render_certification_metadata(&block)
|
|
8
18
|
yield(source.certification_metadata) if source.certification_metadata.present?
|
|
9
19
|
end
|
|
10
20
|
|
|
21
|
+
def render_progress_bar(&block)
|
|
22
|
+
yield(source.percent_complete) if source.percent_complete.present?
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def render_completed_on(&block)
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def render_elective_points(&block)
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def render_essential_duration(&block)
|
|
32
|
+
end
|
|
33
|
+
|
|
11
34
|
def completed_class
|
|
12
35
|
'completed' if source.completed?
|
|
13
36
|
end
|
|
@@ -15,4 +38,4 @@ class ContentItemPresenter < SimpleDelegator
|
|
|
15
38
|
def source
|
|
16
39
|
__getobj__
|
|
17
40
|
end
|
|
18
|
-
end
|
|
41
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
require 'woople_theme_i18n'
|
|
2
|
+
|
|
3
|
+
module WoopleTheme
|
|
4
|
+
module Dashboard
|
|
5
|
+
class ElectiveExceptionPresenter < ExceptionPresenter
|
|
6
|
+
|
|
7
|
+
def subtitle
|
|
8
|
+
I18n.t('woople_theme.dashboards.member.points', count: source.description, points: source.description)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
require 'woople_theme_i18n'
|
|
2
|
+
|
|
3
|
+
module WoopleTheme
|
|
4
|
+
module Dashboard
|
|
5
|
+
class ElectiveHistoryPresenter < ContentItemPresenter
|
|
6
|
+
include ContentImage
|
|
7
|
+
|
|
8
|
+
enforce_definitions :completed_on,
|
|
9
|
+
:current_points,
|
|
10
|
+
:total_points
|
|
11
|
+
|
|
12
|
+
def render_time_remaining(&block)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def render_popularity(&block)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def render_certification_metadata(&block)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def render_progress_bar(&block)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def render_elective_points(&block)
|
|
25
|
+
yield(points_metadata)
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def render_completed_on(&block)
|
|
29
|
+
yield(formatted_date)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
private
|
|
33
|
+
|
|
34
|
+
def formatted_date
|
|
35
|
+
WoopleThemeI18n.l(completed_on.to_date)
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def points_metadata
|
|
39
|
+
if in_progress?
|
|
40
|
+
I18n.t('woople_theme.dashboards.member.points', count: total_points, points: "#{current_points}/#{total_points}")
|
|
41
|
+
else
|
|
42
|
+
I18n.t('woople_theme.dashboards.member.points', count: total_points, points: total_points)
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def in_progress?
|
|
47
|
+
current_points < total_points
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
@@ -2,6 +2,22 @@ require 'action_view'
|
|
|
2
2
|
module WoopleTheme
|
|
3
3
|
module Dashboard
|
|
4
4
|
class ElectivesSectionPresenter < SectionPresenter
|
|
5
|
+
enforce_definitions :electives_history,
|
|
6
|
+
:electives_exceptions
|
|
7
|
+
|
|
8
|
+
def render_history
|
|
9
|
+
yield if render?(section.electives_history)
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def render_exceptions
|
|
13
|
+
yield if render?(section.electives_exceptions)
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
private
|
|
17
|
+
|
|
18
|
+
def render?(tab)
|
|
19
|
+
tab.count > 0
|
|
20
|
+
end
|
|
5
21
|
end
|
|
6
22
|
end
|
|
7
23
|
end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
require 'duration'
|
|
2
|
+
require 'woople_theme_i18n'
|
|
3
|
+
|
|
4
|
+
module WoopleTheme
|
|
5
|
+
module Dashboard
|
|
6
|
+
class EssentialCompletedPresenter < ContentItemPresenter
|
|
7
|
+
|
|
8
|
+
def render_time_remaining(&block)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def render_popularity(&block)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def render_certification_metadata(&block)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def render_progress_bar(&block)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def render_completed_on(&block)
|
|
21
|
+
yield(formatted_date)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def render_essential_duration(&block)
|
|
25
|
+
yield(formatted_duration)
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
private
|
|
29
|
+
|
|
30
|
+
def formatted_date
|
|
31
|
+
WoopleThemeI18n.l(completed_on.to_date)
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def formatted_duration
|
|
35
|
+
Duration.format_time(time_total)
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
require 'action_view/helpers/url_helper'
|
|
2
|
+
require 'woople_theme_i18n'
|
|
3
|
+
|
|
4
|
+
module WoopleTheme
|
|
5
|
+
module Dashboard
|
|
6
|
+
class EssentialExceptionPresenter < ExceptionPresenter
|
|
7
|
+
include ActionView::Helpers::UrlHelper
|
|
8
|
+
|
|
9
|
+
enforce_definitions :url
|
|
10
|
+
|
|
11
|
+
def title
|
|
12
|
+
link_to(source.name, source.url)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def subtitle
|
|
16
|
+
I18n.t('woople_theme.dashboards.member.exceptions.reason', reason: source.description)
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
require 'action_view'
|
|
2
|
+
|
|
2
3
|
module WoopleTheme
|
|
3
4
|
module Dashboard
|
|
4
5
|
class EssentialsSectionPresenter < SectionPresenter
|
|
5
6
|
enforce_definitions :essentials_remaining,
|
|
6
|
-
:essentials_completed
|
|
7
|
+
:essentials_completed,
|
|
8
|
+
:essentials_exceptions
|
|
7
9
|
|
|
8
10
|
def render_remaining
|
|
9
11
|
yield if render?(section.essentials_remaining)
|
|
@@ -13,12 +15,8 @@ module WoopleTheme
|
|
|
13
15
|
yield if render?(section.essentials_completed)
|
|
14
16
|
end
|
|
15
17
|
|
|
16
|
-
def
|
|
17
|
-
section.
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
def total_completed_minutes
|
|
21
|
-
Duration.format_time(section.essentials_completed.map(&:time_total).inject(0, :+))
|
|
18
|
+
def render_exceptions
|
|
19
|
+
yield if render?(section.essentials_exceptions)
|
|
22
20
|
end
|
|
23
21
|
|
|
24
22
|
private
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
require 'woople_theme_i18n'
|
|
2
|
+
|
|
3
|
+
module WoopleTheme
|
|
4
|
+
module Dashboard
|
|
5
|
+
class ExceptionPresenter < ExplicitDelegator
|
|
6
|
+
enforce_definitions :name, :description, :completed_on
|
|
7
|
+
|
|
8
|
+
def title
|
|
9
|
+
source.name
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def subtitle
|
|
13
|
+
raise "not implemented"
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def date
|
|
17
|
+
WoopleThemeI18n.l(source.completed_on.to_date)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
private
|
|
21
|
+
|
|
22
|
+
def source
|
|
23
|
+
__getobj__
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
<% electives_section.render do %>
|
|
2
2
|
<section id="electives-section" class="certification-content">
|
|
3
3
|
<h2><%= t 'woople_theme.dashboards.member.electives_section.title' %></h2>
|
|
4
|
+
<ul class="nav nav-tabs" id="electives_tab_nav">
|
|
5
|
+
<% electives_section.render_history do %>
|
|
6
|
+
<li><a href="#electives_history" data-toggle="tab"><%= t 'woople_theme.dashboards.member.electives_section.history_tab_name' %></a></li>
|
|
7
|
+
<% end %>
|
|
8
|
+
<% electives_section.render_exceptions do %>
|
|
9
|
+
<li><a href="#electives_exceptions" data-toggle="tab"><%= t 'woople_theme.dashboards.member.exceptions.title' %></a></li>
|
|
10
|
+
<% end %>
|
|
11
|
+
</ul>
|
|
12
|
+
<div class="tab-content">
|
|
13
|
+
<% electives_section.render_history do %>
|
|
14
|
+
<div class="tab-pane" id="electives_history">
|
|
15
|
+
<%= electives_history(electives_section.electives_history) %>
|
|
16
|
+
</div>
|
|
17
|
+
<% end %>
|
|
18
|
+
<% electives_section.render_exceptions do %>
|
|
19
|
+
<div class="tab-pane" id="electives_exceptions">
|
|
20
|
+
<table class="table">
|
|
21
|
+
<thead>
|
|
22
|
+
<tr>
|
|
23
|
+
<th><%= t 'woople_theme.date_title' %></th>
|
|
24
|
+
<th><%= t 'woople_theme.dashboards.member.electives_section.reason_points' %></th>
|
|
25
|
+
</tr>
|
|
26
|
+
</thead>
|
|
27
|
+
<tbody>
|
|
28
|
+
<%= electives_exceptions(electives_section.electives_exceptions) %>
|
|
29
|
+
</tbody>
|
|
30
|
+
</table>
|
|
31
|
+
</div>
|
|
32
|
+
<% end %>
|
|
33
|
+
</div>
|
|
4
34
|
</section>
|
|
5
35
|
<% end %>
|
|
@@ -8,6 +8,9 @@
|
|
|
8
8
|
<% essentials_section.render_completed do %>
|
|
9
9
|
<li><a href="#essentials_completed" data-toggle="tab"><%= t 'woople_theme.dashboards.member.essentials_section.completed_tab_name' %></a></li>
|
|
10
10
|
<% end %>
|
|
11
|
+
<% essentials_section.render_exceptions do %>
|
|
12
|
+
<li><a href="#essentials_exceptions" data-toggle="tab"><%= t 'woople_theme.dashboards.member.exceptions.title' %></a></li>
|
|
13
|
+
<% end %>
|
|
11
14
|
</ul>
|
|
12
15
|
<div class="tab-content">
|
|
13
16
|
<% essentials_section.render_remaining do %>
|
|
@@ -17,16 +20,22 @@
|
|
|
17
20
|
<% end %>
|
|
18
21
|
<% essentials_section.render_completed do %>
|
|
19
22
|
<div class="tab-pane" id="essentials_completed">
|
|
20
|
-
<%=
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
<
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
<%= essentials_completed(essentials_section.essentials_completed) %>
|
|
24
|
+
</div>
|
|
25
|
+
<% end %>
|
|
26
|
+
<% essentials_section.render_exceptions do %>
|
|
27
|
+
<div class="tab-pane" id="essentials_exceptions">
|
|
28
|
+
<table class="table">
|
|
29
|
+
<thead>
|
|
30
|
+
<tr>
|
|
31
|
+
<th><%= t 'woople_theme.date_title' %></th>
|
|
32
|
+
<th><%= t 'woople_theme.dashboards.member.essentials_section.course_reason' %></th>
|
|
33
|
+
</tr>
|
|
34
|
+
</thead>
|
|
35
|
+
<tbody>
|
|
36
|
+
<%= essentials_exceptions(essentials_section.essentials_exceptions) %>
|
|
37
|
+
</tbody>
|
|
38
|
+
</table>
|
|
30
39
|
</div>
|
|
31
40
|
<% end %>
|
|
32
41
|
</div>
|
|
@@ -7,22 +7,41 @@
|
|
|
7
7
|
</a>
|
|
8
8
|
</div>
|
|
9
9
|
<div class="content-item-content span7">
|
|
10
|
-
<h2
|
|
10
|
+
<h2><%= link_to(content_item.name, content_item.url) %></h2>
|
|
11
11
|
|
|
12
12
|
<div class="content-item-metadata row">
|
|
13
|
+
<% content_item.render_time_remaining do |time_remaining, time_total| %>
|
|
13
14
|
<div class="span2">
|
|
14
|
-
<em class="timeRemaining"><%=
|
|
15
|
+
<em class="timeRemaining"><%= time_remaining %></em> / <%= time_total %>
|
|
15
16
|
</div>
|
|
17
|
+
<% end %>
|
|
18
|
+
<% content_item.render_popularity do |popularity| %>
|
|
16
19
|
<div class="span2">
|
|
17
|
-
<i class="icon-star"></i> <span class="popularity"><%=
|
|
20
|
+
<i class="icon-star"></i> <span class="popularity"><%= popularity %></span>
|
|
21
|
+
</div>
|
|
22
|
+
<% end %>
|
|
23
|
+
<% content_item.render_certification_metadata do |data| %>
|
|
24
|
+
<div class="span2">
|
|
25
|
+
<span class="badge certificationValue"><%= data %></span>
|
|
26
|
+
</div>
|
|
27
|
+
<% end %>
|
|
28
|
+
<% content_item.render_completed_on do |date| %>
|
|
29
|
+
<div class="span2"><%= date %></div>
|
|
30
|
+
<% end %>
|
|
31
|
+
<% content_item.render_elective_points do |points| %>
|
|
32
|
+
<div class="span2">
|
|
33
|
+
<span class="badge"><%= points %></span>
|
|
34
|
+
</div>
|
|
35
|
+
<% end %>
|
|
36
|
+
<% content_item.render_essential_duration do |duration| %>
|
|
37
|
+
<div class="span2">
|
|
38
|
+
<span class="badge"><%= duration %></span>
|
|
18
39
|
</div>
|
|
19
|
-
|
|
20
|
-
<% content_item.certification_metadata do |data| %>
|
|
21
|
-
<div class="span2">
|
|
22
|
-
<span class="badge certificationValue"><%= data %></span>
|
|
23
|
-
</div>
|
|
24
40
|
<% end %>
|
|
25
41
|
</div>
|
|
26
42
|
</div>
|
|
27
|
-
|
|
43
|
+
|
|
44
|
+
<% content_item.render_progress_bar do |percent_complete| %>
|
|
45
|
+
<div class="content-item-progress-bar" style="width:<%= percent_complete %>%"></div>
|
|
46
|
+
<% end %>
|
|
28
47
|
</div>
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
<table class="table">
|
|
42
42
|
<thead>
|
|
43
43
|
<tr>
|
|
44
|
-
<th style="width:50%"><%= t 'woople_theme.
|
|
44
|
+
<th style="width:50%"><%= t 'woople_theme.date_title' %></th>
|
|
45
45
|
<th><%= t 'woople_theme.assessment.score_title' %></th>
|
|
46
46
|
<th class="count"><%= t 'woople_theme.assessment.result_title' %></th>
|
|
47
47
|
</tr>
|
data/config/locales/en.yml
CHANGED
|
@@ -29,7 +29,6 @@ en:
|
|
|
29
29
|
required_relearning: Required Relearning
|
|
30
30
|
name: Assessment
|
|
31
31
|
assessment_history: Assessment History
|
|
32
|
-
date_title: Date
|
|
33
32
|
score_title: Score
|
|
34
33
|
result_title: Result
|
|
35
34
|
pass: Pass
|
|
@@ -59,18 +58,29 @@ en:
|
|
|
59
58
|
impersonating: impersonating
|
|
60
59
|
cancel: Cancel
|
|
61
60
|
return_to_course: Return to Course
|
|
61
|
+
date_title: Date
|
|
62
62
|
|
|
63
63
|
dashboards:
|
|
64
|
+
titles:
|
|
65
|
+
reason: Reason
|
|
66
|
+
name: Name
|
|
67
|
+
time: Time
|
|
64
68
|
member:
|
|
69
|
+
exceptions:
|
|
70
|
+
title: Exceptions
|
|
71
|
+
reason: 'Reason: %{reason}'
|
|
72
|
+
points:
|
|
73
|
+
one: '%{points} point'
|
|
74
|
+
other: '%{points} points'
|
|
65
75
|
essentials_section:
|
|
66
76
|
title: Essentials
|
|
67
77
|
remaining_tab_name: Remaining
|
|
68
78
|
completed_tab_name: Completed
|
|
69
|
-
|
|
70
|
-
one: 1 course
|
|
71
|
-
other: '%{count} courses'
|
|
79
|
+
course_reason: Course/Reason
|
|
72
80
|
electives_section:
|
|
73
81
|
title: Electives
|
|
82
|
+
history_tab_name: History
|
|
83
|
+
reason_points: Reason/Points
|
|
74
84
|
|
|
75
85
|
date:
|
|
76
86
|
formats:
|
data/lib/woople-theme/version.rb
CHANGED
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.5.
|
|
4
|
+
version: 0.5.9
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2012-09-
|
|
12
|
+
date: 2012-09-12 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rails
|
|
@@ -209,21 +209,23 @@ files:
|
|
|
209
209
|
- app/presenters/submitted_assessment_form_presenter.rb
|
|
210
210
|
- app/presenters/theme_presentation.rb
|
|
211
211
|
- app/presenters/woople_theme/answer_presenter.rb
|
|
212
|
-
- app/presenters/woople_theme/dashboard/
|
|
213
|
-
- app/presenters/woople_theme/dashboard/
|
|
212
|
+
- app/presenters/woople_theme/dashboard/elective_exception_presenter.rb
|
|
213
|
+
- app/presenters/woople_theme/dashboard/elective_history_presenter.rb
|
|
214
214
|
- app/presenters/woople_theme/dashboard/electives_section_presenter.rb
|
|
215
|
+
- app/presenters/woople_theme/dashboard/essential_completed_presenter.rb
|
|
216
|
+
- app/presenters/woople_theme/dashboard/essential_exception_presenter.rb
|
|
215
217
|
- app/presenters/woople_theme/dashboard/essentials_section_presenter.rb
|
|
218
|
+
- app/presenters/woople_theme/dashboard/exception_presenter.rb
|
|
216
219
|
- app/presenters/woople_theme/dashboard/section_presenter.rb
|
|
217
220
|
- app/presenters/woople_theme/dashboard/status_alert_presenter.rb
|
|
218
221
|
- app/presenters/woople_theme/question_presenter.rb
|
|
219
222
|
- app/presenters/woople_theme/submitted_answer_presenter.rb
|
|
220
223
|
- app/presenters/woople_theme/submitted_question_presenter.rb
|
|
221
224
|
- app/presenters/woople_theme/video_presenter.rb
|
|
222
|
-
- app/views/dashboard/_completed_essential.html.erb
|
|
223
225
|
- app/views/dashboard/_electives_section.html.erb
|
|
224
226
|
- app/views/dashboard/_essentials_section.html.erb
|
|
227
|
+
- app/views/dashboard/_exception.html.erb
|
|
225
228
|
- app/views/dashboard/_status_alert.html.erb
|
|
226
|
-
- app/views/dashboard/_total_courses.html.erb
|
|
227
229
|
- app/views/layouts/theme.html.erb
|
|
228
230
|
- app/views/woople-theme/_assessment_form.html.erb
|
|
229
231
|
- app/views/woople-theme/_assessment_form_answer.html.erb
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
require 'duration'
|
|
2
|
-
module WoopleTheme
|
|
3
|
-
module Dashboard
|
|
4
|
-
class CompletedEssentialPresenter < CompletedContentItemPresenter
|
|
5
|
-
|
|
6
|
-
def date
|
|
7
|
-
completed_on.strftime('%b %d')
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
def formatted_time_total
|
|
11
|
-
Duration.format_time(time_total)
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
end
|
|
15
|
-
end
|
|
16
|
-
end
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<div class="content-item completed-item row">
|
|
2
|
-
<div class="content-item-date span1">
|
|
3
|
-
<a href="<%= completed_essential.url %>"><%= completed_essential.date %></a>
|
|
4
|
-
</div>
|
|
5
|
-
<div class="content-item-content span5">
|
|
6
|
-
<h2><a href="<%= completed_essential.url %>"><%= completed_essential.name %></a></h2>
|
|
7
|
-
</div>
|
|
8
|
-
<div class="content-item-duration span2">
|
|
9
|
-
<%= completed_essential.formatted_time_total %>
|
|
10
|
-
</div>
|
|
11
|
-
</div>
|
|
12
|
-
|