mumuki-laboratory 9.0.2 → 9.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/mumuki_laboratory/application/faqs.js +14 -4
- data/app/assets/javascripts/mumuki_laboratory/application/user.js +16 -5
- data/app/assets/stylesheets/mumuki_laboratory/application/modules/_faqs.scss +27 -5
- data/app/assets/stylesheets/mumuki_laboratory/application/modules/_user_menu.scss +30 -2
- data/app/helpers/user_menu_helper.rb +20 -6
- data/app/views/faqs/index.html.erb +5 -1
- data/app/views/layouts/_user_menu.html.erb +11 -19
- data/app/views/users/certificates.html.erb +10 -10
- data/lib/mumuki/laboratory/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 07b2e50b039758471cfb6e6ce92b5c72de56a3d6edbcc1ddbcdfd12422b51f34
|
4
|
+
data.tar.gz: 69b54d57063273a7f3dee32e42126eff821332dbe8acec8f8337f91f1b929b90
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4acb2a84b7b526ceebc4be7daf104e9a9d614c5659ab853da9614b16b1d3caffdc42c2cfce3fcdb22ee69e364d1339405291644dcf8b8f213e3756daf29d11de
|
7
|
+
data.tar.gz: 83e3a2120935b9b87c004d11fbd599ffe3a92093ab2decc2f787a905a4d0c50edb964390275f06452883213d42c03c35832281ad5963340d8f41f5b691b1e23c
|
@@ -32,9 +32,8 @@ mumuki.faqs = class {
|
|
32
32
|
}
|
33
33
|
|
34
34
|
_createNavbarItem($faqsNavbar, faqGroup) {
|
35
|
-
const $
|
36
|
-
.html(`${faqGroup.
|
37
|
-
const $navItem = $('<li></li>').html($newLink);
|
35
|
+
const $navItem = $(`<li><a href="#${faqGroup.id}">`)
|
36
|
+
.html(`${faqGroup.querySelector('h2').textContent}`);
|
38
37
|
$faqsNavbar.append($navItem);
|
39
38
|
return $navItem;
|
40
39
|
}
|
@@ -51,8 +50,19 @@ mumuki.faqs = class {
|
|
51
50
|
_createFaqsGroups() {
|
52
51
|
const elemsGroups = this._buildFaqsGroups();
|
53
52
|
elemsGroups.forEach((group, index) => {
|
54
|
-
$(group).wrapAll(`<div class='mu-faqs-group' id='mu-faqs-group-${index}'>`)
|
53
|
+
$(group).wrapAll(`<div class='mu-faqs-group' id='mu-faqs-group-${index}'>`);
|
55
54
|
});
|
55
|
+
this._createFaqsIcons();
|
56
|
+
}
|
57
|
+
|
58
|
+
_createFaqsIcons() {
|
59
|
+
const $faqIcon = $('<i class="mu-faqs-group-icon fa fa-plus">');
|
60
|
+
$faqIcon.click(function(e){
|
61
|
+
const $elem = $(this);
|
62
|
+
$elem.toggleClass('fa-plus fa-minus');
|
63
|
+
$elem.closest('.mu-faqs-group').toggleClass('active');
|
64
|
+
})
|
65
|
+
$('.mu-faqs-group').prepend($faqIcon);
|
56
66
|
}
|
57
67
|
|
58
68
|
_buildFaqsGroups() {
|
@@ -1,9 +1,20 @@
|
|
1
1
|
mumuki.load(() => {
|
2
|
-
|
3
|
-
|
4
|
-
|
2
|
+
const $userMenuHeader = $('.mu-user-menu-header');
|
3
|
+
let onUserProfile = document.querySelector('.mu-profile-info') !== null;
|
4
|
+
|
5
|
+
$userMenuHeader.click(() => {
|
6
|
+
$('.mu-user-menu-items').toggleClass('hidden-sm-screen');
|
7
|
+
$('#mu-user-menu-header-icon').toggleClass('fa-chevron-up fa-chevron-down');
|
8
|
+
});
|
9
|
+
|
10
|
+
if (onUserProfile) {
|
11
|
+
$userMenuHeader.click();
|
5
12
|
}
|
6
|
-
|
7
|
-
|
13
|
+
|
14
|
+
$('.mu-user-menu-item .active').click((e) => {
|
15
|
+
if (onUserProfile) {
|
16
|
+
e.preventDefault();
|
17
|
+
$userMenuHeader.click();
|
18
|
+
}
|
8
19
|
});
|
9
20
|
});
|
@@ -1,11 +1,14 @@
|
|
1
1
|
.mu-faqs-container {
|
2
2
|
position: relative;
|
3
3
|
display: table;
|
4
|
+
width: 100%;
|
4
5
|
|
5
6
|
.mu-faqs-content {
|
6
7
|
padding-top: 50px;
|
7
8
|
|
8
|
-
|
9
|
+
width: 100%;
|
10
|
+
|
11
|
+
@media (min-width: 768px) {
|
9
12
|
width: 75%;
|
10
13
|
float: right;
|
11
14
|
}
|
@@ -14,14 +17,37 @@
|
|
14
17
|
padding: 32px;
|
15
18
|
box-shadow: 0 0.375em 2.8125em 0 #d2d5d9;
|
16
19
|
margin-bottom: 32px;
|
20
|
+
|
21
|
+
@media (max-width: 767px) {
|
22
|
+
&:not(.active) {
|
23
|
+
h3, p {
|
24
|
+
display: none
|
25
|
+
}
|
26
|
+
h2 {
|
27
|
+
margin-bottom: 0px;
|
28
|
+
}
|
29
|
+
}
|
30
|
+
}
|
31
|
+
|
17
32
|
h2 {
|
18
33
|
margin-top: 0;
|
19
34
|
margin-bottom: 20px;
|
20
35
|
}
|
36
|
+
|
21
37
|
h3 {
|
22
38
|
color: #1A94A3; // should be $brand-secondary
|
23
39
|
margin-top: 40px;
|
24
40
|
}
|
41
|
+
|
42
|
+
.mu-faqs-group-icon {
|
43
|
+
float: right;
|
44
|
+
margin-top: 10px;
|
45
|
+
cursor: pointer;
|
46
|
+
display: none;
|
47
|
+
@media (max-width: 767px) {
|
48
|
+
display: unset;
|
49
|
+
}
|
50
|
+
}
|
25
51
|
}
|
26
52
|
}
|
27
53
|
|
@@ -31,10 +57,6 @@
|
|
31
57
|
width: 25%;
|
32
58
|
padding-top: 50px;
|
33
59
|
|
34
|
-
@media (min-width: $container-sm) {
|
35
|
-
display: hidden;
|
36
|
-
}
|
37
|
-
|
38
60
|
ul {
|
39
61
|
border-left: 1px solid $mu-color-disabled;
|
40
62
|
list-style: none;
|
@@ -1,12 +1,41 @@
|
|
1
1
|
.mu-user-menu {
|
2
2
|
display: flex;
|
3
|
+
margin-top: 25px;
|
4
|
+
}
|
5
|
+
|
6
|
+
.mu-user-menu-content {
|
7
|
+
flex-grow: 1;
|
3
8
|
}
|
4
9
|
|
5
10
|
.mu-user-menu-header {
|
6
11
|
font-size: 15px;
|
7
12
|
color: $mu-color-disabled;
|
8
13
|
text-transform: uppercase;
|
9
|
-
|
14
|
+
padding-left: 2px;
|
15
|
+
cursor: pointer;
|
16
|
+
|
17
|
+
@media only screen and (min-width: $screen-md-min) {
|
18
|
+
padding-left: 15px;
|
19
|
+
cursor: auto;
|
20
|
+
|
21
|
+
i {
|
22
|
+
display: none;
|
23
|
+
}
|
24
|
+
|
25
|
+
span {
|
26
|
+
padding-left: 0px;
|
27
|
+
}
|
28
|
+
}
|
29
|
+
}
|
30
|
+
|
31
|
+
.mu-user-menu-items {
|
32
|
+
margin-top: 30px;
|
33
|
+
|
34
|
+
&.hidden-sm-screen {
|
35
|
+
@media only screen and (max-width: $screen-sm-max) {
|
36
|
+
display: none;
|
37
|
+
}
|
38
|
+
}
|
10
39
|
}
|
11
40
|
|
12
41
|
.mu-user-menu-item {
|
@@ -30,6 +59,5 @@
|
|
30
59
|
border-top: 2px solid $mu-color-separator;
|
31
60
|
|
32
61
|
margin: 25px 0;
|
33
|
-
width: 100%
|
34
62
|
}
|
35
63
|
}
|
@@ -1,22 +1,36 @@
|
|
1
1
|
module UserMenuHelper
|
2
|
+
def user_menu_header
|
3
|
+
content_tag :div, user_menu_header_icon, class: 'mu-user-menu-header'
|
4
|
+
end
|
5
|
+
|
6
|
+
def user_menu_divider
|
7
|
+
content_tag :div, '', class: 'mu-user-menu-divider horizontal'
|
8
|
+
end
|
9
|
+
|
2
10
|
def profile_user_menu_link
|
3
|
-
|
11
|
+
user_menu_item t(:my_profile), user_path, 'show'
|
4
12
|
end
|
5
13
|
|
6
14
|
def messages_user_menu_link
|
7
|
-
|
15
|
+
user_menu_item t(:messages), messages_user_path, 'messages'
|
8
16
|
end
|
9
17
|
|
10
18
|
def discussions_user_menu_link
|
11
|
-
|
19
|
+
user_menu_item t(:discussions), discussions_user_path, 'discussions' if current_user&.can_discuss_here?
|
12
20
|
end
|
13
21
|
|
14
22
|
def certificates_user_menu_link
|
15
|
-
|
23
|
+
user_menu_item t(:certificates), certificates_user_path, 'certificates'
|
16
24
|
end
|
17
25
|
|
18
|
-
|
26
|
+
private
|
27
|
+
|
28
|
+
def user_menu_item(label, path, active_on)
|
19
29
|
link_klass = 'active' if action_name == active_on
|
20
|
-
link_to
|
30
|
+
content_tag :div, link_to(label, path, { class: link_klass }.compact), class: 'mu-user-menu-item'
|
31
|
+
end
|
32
|
+
|
33
|
+
def user_menu_header_icon
|
34
|
+
fa_icon('chevron-down', text: t(:my_account), id: 'mu-user-menu-header-icon', right: true)
|
21
35
|
end
|
22
36
|
end
|
@@ -1,3 +1,7 @@
|
|
1
|
+
<% content_for :breadcrumbs do %>
|
2
|
+
<%= header_breadcrumbs %>
|
3
|
+
<% end %>
|
4
|
+
|
1
5
|
<div class="mu-faqs">
|
2
6
|
<h1><%= t(:faqs) %></h1>
|
3
7
|
|
@@ -5,7 +9,7 @@
|
|
5
9
|
<div class="mu-faqs-content">
|
6
10
|
<%= @faqs %>
|
7
11
|
</div>
|
8
|
-
<div class="mu-faqs-navbar">
|
12
|
+
<div class="mu-faqs-navbar hidden-xs">
|
9
13
|
<nav>
|
10
14
|
<ul>
|
11
15
|
</ul>
|
@@ -1,25 +1,17 @@
|
|
1
|
-
<div class="col-md-3 mu-tab-body
|
2
|
-
<div class="
|
3
|
-
<div class="mu-user-menu-
|
4
|
-
<%=
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
<div class="mu-user-menu-divider horizontal"></div>
|
10
|
-
<div class="mu-user-menu-item">
|
11
|
-
<%= messages_user_menu_link %>
|
12
|
-
</div>
|
13
|
-
<% if current_user&.can_discuss_here? %>
|
14
|
-
<div class="mu-user-menu-item">
|
1
|
+
<div class="col-md-3 mu-tab-body">
|
2
|
+
<div class="mu-user-menu">
|
3
|
+
<div class="mu-user-menu-content">
|
4
|
+
<%= user_menu_header %>
|
5
|
+
<div class="col-xs-12 mu-user-menu-items hidden-sm-screen">
|
6
|
+
<%= profile_user_menu_link %>
|
7
|
+
<%= user_menu_divider %>
|
8
|
+
<%= messages_user_menu_link %>
|
15
9
|
<%= discussions_user_menu_link %>
|
10
|
+
<%= user_menu_divider %>
|
11
|
+
<%= certificates_user_menu_link %>
|
16
12
|
</div>
|
17
|
-
<% end %>
|
18
|
-
<div class="mu-user-menu-divider horizontal"></div>
|
19
|
-
<div class="mu-user-menu-item">
|
20
|
-
<%= certificates_user_menu_link %>
|
21
13
|
</div>
|
14
|
+
<div class="mu-user-menu-divider vertical hidden-sm hidden-xs"></div>
|
22
15
|
</div>
|
23
|
-
<div class="mu-user-menu-divider vertical hidden-sm hidden-xs"></div>
|
24
16
|
</div>
|
25
17
|
<div class="mu-user-menu-divider horizontal visible-sm visible-xs"></div>
|
@@ -4,15 +4,15 @@
|
|
4
4
|
|
5
5
|
<%= render partial: 'layouts/user_menu' %>
|
6
6
|
|
7
|
-
<div class="mu-
|
8
|
-
<
|
9
|
-
|
10
|
-
<% if @certificates.empty? %>
|
11
|
-
<div class="mu-tab-body">
|
12
|
-
<%= t :certificates_will_be_here %>
|
7
|
+
<div class="col-md-9 mu-tab-body">
|
8
|
+
<div class="mu-user-header">
|
9
|
+
<h1><%= t(:certificates) %></h1>
|
13
10
|
</div>
|
14
|
-
<%
|
15
|
-
|
11
|
+
<% if @certificates.empty? %>
|
12
|
+
<div class="mu-tab-body">
|
13
|
+
<%= t :certificates_will_be_here %>
|
14
|
+
</div>
|
15
|
+
<% else %>
|
16
16
|
<div class="col-md-12">
|
17
17
|
<div class="mu-list-group">
|
18
18
|
<% @certificates.each do |certificate| %>
|
@@ -28,5 +28,5 @@
|
|
28
28
|
<% end %>
|
29
29
|
</div>
|
30
30
|
</div>
|
31
|
-
|
32
|
-
|
31
|
+
<% end %>
|
32
|
+
</div>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mumuki-laboratory
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 9.0.
|
4
|
+
version: 9.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Franco Bulgarelli
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-03-
|
11
|
+
date: 2021-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|