woople-theme 0.3.8 → 0.3.9
Sign up to get free protection for your applications and to get access to all the features.
- data/app/assets/stylesheets/woople-theme/buttons.css.less +0 -1
- data/app/assets/stylesheets/woople-theme/modal.css.less +7 -16
- data/app/assets/stylesheets/woople-theme/profile.css.less +1 -1
- data/app/assets/stylesheets/woople-theme/theme-retina.css +0 -10
- data/app/helpers/theme_helper.rb +2 -2
- data/app/presenters/woople_theme/video_presenter.rb +16 -0
- data/app/views/woople-theme/_video_modal.html.erb +6 -3
- data/lib/woople-theme/version.rb +1 -1
- metadata +3 -6
- data/app/assets/images/woople-theme/icons/thumbs_down.png +0 -0
- data/app/assets/images/woople-theme/icons/thumbs_down2x.png +0 -0
- data/app/assets/images/woople-theme/icons/thumbs_up.png +0 -0
- data/app/assets/images/woople-theme/icons/thumbs_up2x.png +0 -0
@@ -28,6 +28,13 @@
|
|
28
28
|
.btn {
|
29
29
|
line-height:16px;
|
30
30
|
}
|
31
|
+
|
32
|
+
button {
|
33
|
+
opacity: 0.8;
|
34
|
+
}
|
35
|
+
button.active {
|
36
|
+
color: black;
|
37
|
+
}
|
31
38
|
}
|
32
39
|
|
33
40
|
.modal-body {
|
@@ -38,19 +45,3 @@
|
|
38
45
|
.modal-video();
|
39
46
|
}
|
40
47
|
}
|
41
|
-
|
42
|
-
.icon-thumbs-up {
|
43
|
-
width:15px;
|
44
|
-
height:16px;
|
45
|
-
background:url(/assets/woople-theme/icons/thumbs_up.png) no-repeat;
|
46
|
-
}
|
47
|
-
|
48
|
-
.active .icon-thumbs-up { opacity: 0.5; }
|
49
|
-
|
50
|
-
.icon-thumbs-down {
|
51
|
-
width:15px;
|
52
|
-
height:16px;
|
53
|
-
background:url(/assets/woople-theme/icons/thumbs_down.png) no-repeat;
|
54
|
-
}
|
55
|
-
|
56
|
-
.active .icon-thumbs-down { opacity: 0.5; }
|
@@ -39,13 +39,3 @@
|
|
39
39
|
background-image:url(/assets/woople-theme/icons/sortDESC2x.png);
|
40
40
|
background-size:14px 14px;
|
41
41
|
}
|
42
|
-
|
43
|
-
.icon-thumbs-up {
|
44
|
-
background-image:url(/assets/woople-theme/icons/thumbs_up2x.png);
|
45
|
-
background-size:15px 16px;
|
46
|
-
}
|
47
|
-
|
48
|
-
.icon-thumbs-down {
|
49
|
-
background-image:url(/assets/woople-theme/icons/thumbs_down2x.png);
|
50
|
-
background-size:15px 16px;
|
51
|
-
}
|
data/app/helpers/theme_helper.rb
CHANGED
@@ -10,8 +10,8 @@ module ThemeHelper
|
|
10
10
|
render partial: 'woople-theme/content_item', collection: collection
|
11
11
|
end
|
12
12
|
|
13
|
-
def video_modal(video
|
14
|
-
video = ThemePresentation.wrap(video,
|
13
|
+
def video_modal(video)
|
14
|
+
video = ThemePresentation.wrap(video, WoopleTheme::VideoPresenter)
|
15
15
|
render 'woople-theme/video_modal', video: video
|
16
16
|
end
|
17
17
|
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'explicit_delegator'
|
2
|
+
|
3
|
+
module WoopleTheme
|
4
|
+
class VideoPresenter < ExplicitDelegator
|
5
|
+
enforce_definitions :src, # path to the video
|
6
|
+
:liked? # does the user like this video (default: nil)
|
7
|
+
|
8
|
+
def liked_css
|
9
|
+
liked? == true ? 'active' : nil
|
10
|
+
end
|
11
|
+
|
12
|
+
def disliked_css
|
13
|
+
liked? == false ? 'active' : nil
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -14,9 +14,12 @@
|
|
14
14
|
</div>
|
15
15
|
<div class="modal-footer">
|
16
16
|
<div class="btn-group" data-toggle="buttons-radio">
|
17
|
-
<button class="btn btn-
|
18
|
-
|
17
|
+
<button class="btn btn-like <%= video.liked_css %>">
|
18
|
+
<i class="icon-thumbs-up"></i> <%=t 'woople_theme.video_modal.like' %>
|
19
|
+
</button>
|
20
|
+
<button class="btn btn-dislike <%= video.disliked_css %>">
|
21
|
+
<i class="icon-thumbs-down"></i> <%=t 'woople_theme.video_modal.dislike' %>
|
22
|
+
</button>
|
19
23
|
</div>
|
20
24
|
</div>
|
21
25
|
</div>
|
22
|
-
|
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.3.
|
4
|
+
version: 0.3.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-07-
|
12
|
+
date: 2012-07-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -147,10 +147,6 @@ files:
|
|
147
147
|
- app/assets/images/woople-theme/icons/sortASC2x.png
|
148
148
|
- app/assets/images/woople-theme/icons/sortDESC.png
|
149
149
|
- app/assets/images/woople-theme/icons/sortDESC2x.png
|
150
|
-
- app/assets/images/woople-theme/icons/thumbs_down.png
|
151
|
-
- app/assets/images/woople-theme/icons/thumbs_down2x.png
|
152
|
-
- app/assets/images/woople-theme/icons/thumbs_up.png
|
153
|
-
- app/assets/images/woople-theme/icons/thumbs_up2x.png
|
154
150
|
- app/assets/images/woople-theme/logo.png
|
155
151
|
- app/assets/images/woople-theme/missing-profile.png
|
156
152
|
- app/assets/images/woople-theme/missing.png
|
@@ -208,6 +204,7 @@ files:
|
|
208
204
|
- app/presenters/woople_theme/question_presenter.rb
|
209
205
|
- app/presenters/woople_theme/submitted_answer_presenter.rb
|
210
206
|
- app/presenters/woople_theme/submitted_question_presenter.rb
|
207
|
+
- app/presenters/woople_theme/video_presenter.rb
|
211
208
|
- app/views/layouts/theme.html.erb
|
212
209
|
- app/views/woople-theme/_assessment_form.html.erb
|
213
210
|
- app/views/woople-theme/_assessment_form_answer.html.erb
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|