mumuki-laboratory 8.2.0 → 8.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +19 -8
- data/app/assets/javascripts/mumuki_laboratory/application/bridge.js +2 -1
- data/app/assets/javascripts/mumuki_laboratory/application/button.js +0 -2
- data/app/assets/javascripts/mumuki_laboratory/application/codemirror.js +1 -1
- data/app/assets/javascripts/mumuki_laboratory/application/i18n.js +73 -0
- data/app/assets/javascripts/mumuki_laboratory/application/kids.js +22 -1
- data/app/assets/javascripts/mumuki_laboratory/application/kindergarten.js +6 -1
- data/app/assets/javascripts/mumuki_laboratory/application/primary.js +5 -3
- data/app/assets/javascripts/mumuki_laboratory/application/results-renderer.js +28 -1
- data/app/assets/javascripts/mumuki_laboratory/application/submission.js +72 -48
- data/app/assets/stylesheets/mumuki_laboratory/application.scss +1 -0
- data/app/assets/stylesheets/mumuki_laboratory/application/_codemirror-themes.scss +1 -0
- data/app/assets/stylesheets/mumuki_laboratory/application/codemirror-themes/_mu-light.scss +3 -0
- data/app/assets/stylesheets/mumuki_laboratory/application/modules/_discussion.scss +31 -8
- data/app/assets/stylesheets/mumuki_laboratory/application/modules/_kids.scss +2 -3
- data/app/assets/stylesheets/mumuki_laboratory/application/modules/_kids_results.scss +1 -0
- data/app/assets/stylesheets/mumuki_laboratory/application/modules/_terms.scss +4 -0
- data/app/controllers/application_controller.rb +1 -1
- data/app/controllers/chapters_controller.rb +9 -5
- data/app/controllers/exam_authorization_requests_controller.rb +26 -0
- data/app/controllers/exam_registrations_controller.rb +6 -0
- data/app/controllers/guide_container_controller.rb +2 -7
- data/app/helpers/application_helper.rb +4 -0
- data/app/helpers/contextualization_result_helper.rb +0 -8
- data/app/helpers/discussions_helper.rb +8 -0
- data/app/helpers/icons_helper.rb +3 -11
- data/app/helpers/menu_bar_helper.rb +6 -2
- data/app/helpers/overlapped_buttons_helper.rb +10 -6
- data/app/helpers/progress_bar_helper.rb +2 -2
- data/app/views/book_discussions/index.html.erb +3 -1
- data/app/views/chapters/show.html.erb +21 -9
- data/app/views/complements/show.html.erb +1 -1
- data/app/views/discussions/_message.html.erb +7 -7
- data/app/views/discussions/index.html.erb +11 -4
- data/app/views/exam_authorization_requests/show.html.erb +17 -0
- data/app/views/exam_registrations/show.html.erb +37 -0
- data/app/views/exams/show.html.erb +1 -1
- data/app/views/exercises/show.html.erb +2 -2
- data/app/views/layouts/_discussions.html.erb +0 -4
- data/app/views/layouts/_guide.html.erb +4 -33
- data/app/views/layouts/_guide_container.html.erb +28 -0
- data/app/views/layouts/_guide_title_icons.html.erb +9 -0
- data/app/views/layouts/_progress_bar.html.erb +9 -7
- data/app/views/layouts/_progress_listing.html.erb +5 -5
- data/app/views/layouts/_social_media.html.erb +2 -2
- data/app/views/layouts/application.html.erb +4 -7
- data/app/views/layouts/exercise_inputs/layouts/_input_kindergarten.html.erb +1 -1
- data/app/views/layouts/modals/_kindergarten_results_aborted.html.erb +1 -1
- data/app/views/lessons/show.html.erb +1 -1
- data/app/views/notifications/_discussion.html.erb +1 -0
- data/app/views/notifications/_dropdown.html.erb +13 -0
- data/app/views/notifications/_exam_authorization_request.html.erb +1 -0
- data/app/views/notifications/_exam_registration.html.erb +1 -0
- data/app/views/notifications/_message.html.erb +1 -0
- data/app/views/users/_term.html.erb +1 -1
- data/config/routes.rb +3 -0
- data/lib/mumuki/laboratory/controllers/notifications.rb +3 -22
- data/lib/mumuki/laboratory/controllers/results_rendering.rb +2 -1
- data/lib/mumuki/laboratory/locales/en.yml +31 -22
- data/lib/mumuki/laboratory/locales/es-CL.yml +23 -9
- data/lib/mumuki/laboratory/locales/es.yml +30 -22
- data/lib/mumuki/laboratory/locales/pt.yml +25 -16
- data/lib/mumuki/laboratory/version.rb +1 -1
- data/spec/controllers/exam_authorization_requests_controller_spec.rb +40 -0
- data/spec/controllers/exam_registrations_controller_spec.rb +19 -0
- data/spec/controllers/exercise_solutions_controller_spec.rb +3 -2
- data/spec/dummy/db/schema.rb +50 -1
- data/spec/dummy/public/character/animations.json +1 -0
- data/{public → spec/dummy/public}/character/kibi/context.svg +0 -0
- data/{public → spec/dummy/public}/character/kibi/failure.svg +0 -0
- data/{public → spec/dummy/public}/character/kibi/jump.svg +0 -0
- data/spec/dummy/public/character/kibi/passed_with_warnings.svg +4 -0
- data/{public → spec/dummy/public}/character/kibi/success2_l.svg +0 -0
- data/{public → spec/dummy/public}/character/kibi/success_l.svg +0 -0
- data/{public → spec/dummy/public}/character/magnifying_glass/apparition.svg +0 -0
- data/{public → spec/dummy/public}/character/magnifying_glass/loop.svg +0 -0
- data/spec/features/chapters_flow_spec.rb +112 -0
- data/spec/features/login_flow_spec.rb +1 -1
- data/spec/features/notifications_flow_spec.rb +46 -0
- data/spec/features/topic_flow_spec.rb +0 -1
- data/spec/javascripts/bridge-spec.js +2 -2
- data/spec/javascripts/csrf-token-spec.js +2 -2
- data/spec/javascripts/editors-spec.js +7 -9
- data/spec/javascripts/elipsis-spec.js +4 -4
- data/spec/javascripts/events-spec.js +7 -7
- data/spec/javascripts/exercise-spec.js +7 -8
- data/spec/javascripts/global-spec.js +3 -3
- data/spec/javascripts/i18n-spec.js +82 -0
- data/spec/javascripts/kids-button-spec.js +34 -0
- data/spec/javascripts/results-renderers-spec.js +5 -5
- data/spec/javascripts/speech-bubble-renderer-spec.js +2 -3
- data/spec/javascripts/submissions-store-spec.js +14 -14
- data/spec/javascripts/sync-mode-spec.js +3 -3
- data/spec/javascripts/timeout-spec.js +2 -2
- data/spec/javascripts/timer-spec.js +2 -2
- metadata +125 -92
- data/spec/features/chapter_spec.rb +0 -70
@@ -0,0 +1 @@
|
|
1
|
+
@import "codemirror-themes/mu-light";
|
@@ -5,7 +5,7 @@ $discussion-toolbar-color: #f6f6fa;
|
|
5
5
|
$message-divider-color: #ecf0f1;
|
6
6
|
$discussion-button-color: #fafafa;
|
7
7
|
$toolbar-filter-color: #808080;
|
8
|
-
$moderator-
|
8
|
+
$moderator-badge-color: #dd9900;
|
9
9
|
|
10
10
|
.discussions-list {
|
11
11
|
margin: 30px 0;
|
@@ -177,8 +177,17 @@ $moderator-star-color: #dd9900;
|
|
177
177
|
width: 100%;
|
178
178
|
}
|
179
179
|
|
180
|
-
.moderator-
|
181
|
-
|
180
|
+
.moderator-badge {
|
181
|
+
position: relative;
|
182
|
+
top: -2px;
|
183
|
+
margin: 2px;
|
184
|
+
font-size: 12px;
|
185
|
+
text-transform: uppercase;
|
186
|
+
color: white;
|
187
|
+
background-color: $moderator-badge-color;
|
188
|
+
border: solid $moderator-badge-color 1px;
|
189
|
+
border-radius: 5px;
|
190
|
+
padding-inline: 5px;
|
182
191
|
}
|
183
192
|
|
184
193
|
.discussion-user-menu {
|
@@ -326,12 +335,15 @@ summary.discussion-summary {
|
|
326
335
|
.actions {
|
327
336
|
float: right;
|
328
337
|
a {
|
329
|
-
margin-left:
|
338
|
+
margin-left: 20px;
|
330
339
|
cursor: pointer;
|
331
340
|
}
|
332
341
|
.discussion-message-approved {
|
333
342
|
text-decoration: none;
|
334
|
-
|
343
|
+
i {
|
344
|
+
transition: color 0.3s;
|
345
|
+
}
|
346
|
+
&:hover, &.selected {
|
335
347
|
i {
|
336
348
|
color: $brand-success;
|
337
349
|
}
|
@@ -341,17 +353,20 @@ summary.discussion-summary {
|
|
341
353
|
text-decoration: none;
|
342
354
|
i {
|
343
355
|
position: relative;
|
356
|
+
transition: color 0.3s;
|
344
357
|
&:after {
|
345
358
|
position: absolute;
|
346
|
-
left:
|
359
|
+
left: 10px;
|
360
|
+
top: -6px;
|
347
361
|
content: ' ';
|
348
|
-
height:
|
362
|
+
height: 30px;
|
349
363
|
width: 2px;
|
350
364
|
transform: rotate(-45deg);
|
351
365
|
background-color: #aaaaaa;
|
366
|
+
transition: background-color 0.3s;
|
352
367
|
}
|
353
368
|
}
|
354
|
-
&.selected {
|
369
|
+
&:hover, &.selected {
|
355
370
|
i {
|
356
371
|
color: $brand-primary;
|
357
372
|
&:after {
|
@@ -360,6 +375,14 @@ summary.discussion-summary {
|
|
360
375
|
}
|
361
376
|
}
|
362
377
|
}
|
378
|
+
.discussion-delete-message {
|
379
|
+
i {
|
380
|
+
transition: color 0.3s;
|
381
|
+
&:hover {
|
382
|
+
color: black;
|
383
|
+
}
|
384
|
+
}
|
385
|
+
}
|
363
386
|
i {
|
364
387
|
color: #aaaaaa
|
365
388
|
}
|
@@ -10,9 +10,8 @@ $kids-speech-border: 1px solid $kids-speech-border-color;
|
|
10
10
|
|
11
11
|
$kids-speech-tabs-width: 40px;
|
12
12
|
|
13
|
-
.mu-exercise-
|
14
|
-
|
15
|
-
border: 1px solid #dddddd;
|
13
|
+
.mu-kids-exercise-workspace.mu-submitless-exercise .mu-kids-submit-button {
|
14
|
+
display: none;
|
16
15
|
}
|
17
16
|
|
18
17
|
.mu-kids-exercise {
|
@@ -131,6 +131,7 @@ $capital-animation-width: 135px;
|
|
131
131
|
'success': $mu-color-success,
|
132
132
|
'warning': $mu-color-warning,
|
133
133
|
'passed': $mu-color-success,
|
134
|
+
'passed_with_warnings': $mu-color-warning,
|
134
135
|
'passed-with-warnings': $mu-color-warning,
|
135
136
|
'failed': $mu-color-danger,
|
136
137
|
'errored': $mu-color-broken,
|
@@ -15,11 +15,15 @@
|
|
15
15
|
}
|
16
16
|
.terms-card-header {
|
17
17
|
cursor: pointer;
|
18
|
+
outline: 0;
|
18
19
|
font-weight: bold;
|
19
20
|
padding: .75rem 1.25rem;
|
20
21
|
margin-bottom: 0;
|
21
22
|
background-color: rgba(0,0,0,.03);
|
22
23
|
border-bottom: 1px solid rgba(0,0,0,.125);
|
24
|
+
&::-webkit-details-marker {
|
25
|
+
display:none;
|
26
|
+
}
|
23
27
|
}
|
24
28
|
&:first-child .terms-card-header{
|
25
29
|
border-radius: calc(.25rem - 1px) calc(.25rem - 1px) 0 0;
|
@@ -34,8 +34,8 @@ class ApplicationController < ActionController::Base
|
|
34
34
|
helper_method :current_workspace,
|
35
35
|
:login_button,
|
36
36
|
:notifications_count,
|
37
|
-
:user_notifications_path,
|
38
37
|
:has_notifications?,
|
38
|
+
:notifications,
|
39
39
|
:subject,
|
40
40
|
:should_choose_organization?,
|
41
41
|
:current_immersive_organizations,
|
@@ -1,13 +1,17 @@
|
|
1
1
|
require 'addressable/uri'
|
2
2
|
|
3
|
-
|
4
|
-
|
3
|
+
# It acts as a guide container in monolesson contexts
|
4
|
+
class ChaptersController < GuideContainerController
|
5
5
|
include Mumuki::Laboratory::Controllers::ImmersiveNavigation
|
6
6
|
|
7
|
-
def show
|
8
|
-
end
|
9
|
-
|
10
7
|
def subject
|
11
8
|
@chapter ||= Chapter.find_by(id: params[:id])
|
12
9
|
end
|
10
|
+
|
11
|
+
private
|
12
|
+
|
13
|
+
def set_guide
|
14
|
+
@monolesson = subject.monolesson
|
15
|
+
@guide = @monolesson&.guide
|
16
|
+
end
|
13
17
|
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
class ExamAuthorizationRequestsController < ApplicationController
|
2
|
+
def show
|
3
|
+
@authorization_request = ExamAuthorizationRequest.find(params[:id])
|
4
|
+
current_user.read_notification! @authorization_request
|
5
|
+
end
|
6
|
+
|
7
|
+
def create
|
8
|
+
authorization_request = ExamAuthorizationRequest.create! authorization_request_params
|
9
|
+
current_user.read_notification! authorization_request.exam_registration
|
10
|
+
flash.notice = I18n.t :exam_authorization_request_created
|
11
|
+
end
|
12
|
+
|
13
|
+
def update
|
14
|
+
ExamAuthorizationRequest.update params[:id], authorization_request_params
|
15
|
+
flash.notice = I18n.t :exam_authorization_request_saved
|
16
|
+
redirect_to root_path
|
17
|
+
end
|
18
|
+
|
19
|
+
private
|
20
|
+
|
21
|
+
def authorization_request_params
|
22
|
+
params
|
23
|
+
.require(:exam_authorization_request).permit(:exam_id, :exam_registration_id)
|
24
|
+
.merge(user: current_user, organization: Organization.current)
|
25
|
+
end
|
26
|
+
end
|
@@ -4,18 +4,13 @@ class GuideContainerController < ApplicationController
|
|
4
4
|
before_action :set_guide
|
5
5
|
|
6
6
|
def show
|
7
|
-
|
8
|
-
|
9
|
-
@next_exercise = subject.next_exercise(current_user)
|
10
|
-
else
|
11
|
-
@next_exercise = subject.first_exercise
|
12
|
-
end
|
7
|
+
@stats = subject.stats_for(current_user)
|
8
|
+
@next_exercise = subject.next_exercise(current_user)
|
13
9
|
end
|
14
10
|
|
15
11
|
private
|
16
12
|
|
17
13
|
def set_guide
|
18
|
-
raise Mumuki::Domain::NotFoundError if subject.nil?
|
19
14
|
@guide = subject.guide
|
20
15
|
end
|
21
16
|
end
|
@@ -44,4 +44,8 @@ module ApplicationHelper
|
|
44
44
|
<span class="#{'hidden' unless active} #{options[:class]}">#{active_text}</span>
|
45
45
|
}.html_safe
|
46
46
|
end
|
47
|
+
|
48
|
+
def notification_preview_for(target)
|
49
|
+
render "notifications/#{target.class.name.underscore}", { target: target }
|
50
|
+
end
|
47
51
|
end
|
@@ -16,14 +16,6 @@ module ContextualizationResultHelper
|
|
16
16
|
:hidden_done
|
17
17
|
elsif contextualization.exercise.choice?
|
18
18
|
contextualization.solved? ? :correct_answer : :wrong_answer
|
19
|
-
else
|
20
|
-
contextualization_status_translation_key contextualization
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
def contextualization_status_translation_key(contextualization)
|
25
|
-
if contextualization.exercise.input_kindergarten?
|
26
|
-
"kindergarten_#{contextualization.submission_status}"
|
27
19
|
else
|
28
20
|
contextualization.submission_status
|
29
21
|
end
|
@@ -52,6 +52,14 @@ module DiscussionsHelper
|
|
52
52
|
profile_picture_for(user, class: image_class)
|
53
53
|
end
|
54
54
|
|
55
|
+
def forum_terms_link
|
56
|
+
%Q{
|
57
|
+
<span>
|
58
|
+
#{ t(:forum_terms_link, terms_link: link_to_forum_terms).html_safe }
|
59
|
+
</span>
|
60
|
+
}.html_safe
|
61
|
+
end
|
62
|
+
|
55
63
|
def discussions_link_with_teaser(item)
|
56
64
|
%Q{
|
57
65
|
<div>
|
data/app/helpers/icons_helper.rb
CHANGED
@@ -7,9 +7,9 @@ module IconsHelper
|
|
7
7
|
fa_icon name, options.merge(class: 'fa-fw fixed-icon')
|
8
8
|
end
|
9
9
|
|
10
|
-
def
|
11
|
-
link_to
|
12
|
-
exercise_path(exercise) if current_user?
|
10
|
+
def assignment_status_icon(assignment)
|
11
|
+
link_to contextualization_fa_icon(assignment),
|
12
|
+
exercise_path(assignment.exercise) if current_user?
|
13
13
|
end
|
14
14
|
|
15
15
|
def language_icon(language)
|
@@ -22,10 +22,6 @@ module IconsHelper
|
|
22
22
|
fa_icon(*icon_for(contextualization))
|
23
23
|
end
|
24
24
|
|
25
|
-
def exercise_status_fa_icon(exercise)
|
26
|
-
contextualization_fa_icon(exercise.assignment_for(current_user))
|
27
|
-
end
|
28
|
-
|
29
25
|
def discussion_status_fa_icon(discussion)
|
30
26
|
contextualization_fa_icon(discussion)
|
31
27
|
end
|
@@ -35,10 +31,6 @@ module IconsHelper
|
|
35
31
|
[iconized[:type], class: "text-#{iconized[:class]} status-icon"]
|
36
32
|
end
|
37
33
|
|
38
|
-
def class_for_exercise(exercise)
|
39
|
-
icon_class_for(exercise.assignment_for(current_user))
|
40
|
-
end
|
41
|
-
|
42
34
|
def icon_class_for(iconizable)
|
43
35
|
iconizable.iconize[:class].to_s
|
44
36
|
end
|
@@ -39,7 +39,11 @@ module MenuBarHelper
|
|
39
39
|
li_tag menu_item('sign-out-alt', :sign_out, logout_path(origin: url_for))
|
40
40
|
end
|
41
41
|
|
42
|
-
def menu_item(icon, name, url)
|
43
|
-
link_to fixed_fa_icon(icon, text: t(name)), url, role: 'menuitem', tabindex: '-1'
|
42
|
+
def menu_item(icon, name, url, translation_params = {})
|
43
|
+
link_to fixed_fa_icon(icon, text: t(name, translation_params)), url, role: 'menuitem', tabindex: '-1'
|
44
|
+
end
|
45
|
+
|
46
|
+
def any_menu_bar_links?
|
47
|
+
menu_bar_links.any?
|
44
48
|
end
|
45
49
|
end
|
@@ -1,10 +1,10 @@
|
|
1
1
|
module OverlappedButtonsHelper
|
2
2
|
def expand_icon
|
3
|
-
overlapped_button_icon :fullscreen, :expand
|
3
|
+
overlapped_button_icon :fullscreen, :expand
|
4
4
|
end
|
5
5
|
|
6
|
-
def restart_icon
|
7
|
-
overlapped_button_icon :restart, :undo
|
6
|
+
def restart_icon(data_placement='left')
|
7
|
+
overlapped_button_icon :restart, :undo, data_placement
|
8
8
|
end
|
9
9
|
|
10
10
|
def format_icon
|
@@ -12,10 +12,14 @@ module OverlappedButtonsHelper
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def restart_guide_link(guide)
|
15
|
-
link_to restart_icon
|
15
|
+
link_to restart_icon('top'),
|
16
|
+
guide_progress_path(guide),
|
17
|
+
class: 'mu-content-toolbar-item mu-restart-guide',
|
18
|
+
data: {confirm: t(:confirm_restart)},
|
19
|
+
method: :delete
|
16
20
|
end
|
17
21
|
|
18
|
-
def overlapped_button_icon(key, icon,
|
19
|
-
fa_icon(icon, title: t(key)
|
22
|
+
def overlapped_button_icon(key, icon, data_placement='left')
|
23
|
+
fa_icon(icon, title: t(key), class: 'fa-fw', role: 'button', 'aria-label': t(key), 'data-placement': data_placement)
|
20
24
|
end
|
21
25
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
module ProgressBarHelper
|
2
2
|
include IconsHelper
|
3
3
|
|
4
|
-
def class_for_progress_list_item(
|
5
|
-
"progress-list-item text-center #{
|
4
|
+
def class_for_progress_list_item(assignment, active)
|
5
|
+
"progress-list-item text-center #{icon_class_for(assignment)} #{active ? 'active' : ''}"
|
6
6
|
end
|
7
7
|
|
8
8
|
end
|
@@ -10,7 +10,7 @@
|
|
10
10
|
|
11
11
|
<div class="row">
|
12
12
|
<div class="mu-inline-block-left">
|
13
|
-
<h1><%=
|
13
|
+
<h1><%= t :forum %></h1>
|
14
14
|
</div>
|
15
15
|
</div>
|
16
16
|
|
@@ -21,3 +21,5 @@
|
|
21
21
|
<%= render partial: 'layouts/discussions' %>
|
22
22
|
<% end %>
|
23
23
|
</div>
|
24
|
+
|
25
|
+
<%= forum_terms_link %>
|
@@ -3,9 +3,14 @@
|
|
3
3
|
<% end %>
|
4
4
|
|
5
5
|
<div class="chapter-description">
|
6
|
-
<h1>
|
7
|
-
<span class="hidden-xs"><%= t(:chapter_number, number: @chapter.number) %>: </span>
|
8
|
-
<span><%= @chapter.name %></span>
|
6
|
+
<h1 class="pull-left">
|
7
|
+
<span class="hidden-xs pull-left"><%= t(:chapter_number, number: @chapter.number) %>: </span>
|
8
|
+
<span class="pull-left"><%= @chapter.name %></span>
|
9
|
+
<% if @chapter.monolesson? %>
|
10
|
+
<div class="mu-monolesson pull-left">
|
11
|
+
<%= render partial: 'layouts/guide_title_icons' %>
|
12
|
+
</div>
|
13
|
+
<% end %>
|
9
14
|
</h1>
|
10
15
|
|
11
16
|
<%= @chapter.description_html %>
|
@@ -13,14 +18,21 @@
|
|
13
18
|
</div>
|
14
19
|
|
15
20
|
<% if @chapter.lessons.present? %>
|
16
|
-
|
17
|
-
|
21
|
+
<% if @chapter.monolesson? %>
|
22
|
+
<div class="mu-monolesson">
|
23
|
+
<%= render partial: 'layouts/guide', locals: { subject: @monolesson } %>
|
24
|
+
</div>
|
25
|
+
<% else %>
|
26
|
+
<div>
|
27
|
+
<h3><%= t(:lessons) %></h3>
|
18
28
|
|
19
|
-
|
20
|
-
|
21
|
-
|
29
|
+
<% @chapter.lessons.includes(guide: :exercises).each do |lesson| %>
|
30
|
+
<h4><%= lesson.number %>. <%= link_to_path_element lesson, mode: :plain %></h4>
|
31
|
+
<%= render partial: 'layouts/progress_listing', locals: { guide: lesson.guide } %>
|
32
|
+
<% end %>
|
33
|
+
</div>
|
22
34
|
<% end %>
|
23
|
-
|
35
|
+
|
24
36
|
<% end %>
|
25
37
|
|
26
38
|
<% if @chapter.appendix.present? %>
|
@@ -1 +1 @@
|
|
1
|
-
<%= render partial: "layouts/
|
1
|
+
<%= render partial: "layouts/guide_container", locals: { subject: @complement }%>
|
@@ -3,29 +3,29 @@
|
|
3
3
|
<div class="discussion-message-bubble-header">
|
4
4
|
<div class="discussion-message-bubble-title">
|
5
5
|
<%= user.name %>
|
6
|
+
<% if user.moderator_here? %>
|
7
|
+
<span class="moderator-badge"><%= t(:moderation) %></span>
|
8
|
+
<% end %>
|
6
9
|
<span class="message-date">
|
7
10
|
<%= t(:time_since, time: time_ago_in_words(message.created_at)) %>
|
8
11
|
</span>
|
9
|
-
<% if user.moderator_here? %>
|
10
|
-
<%= fa_icon(:star, 'data-toggle': 'tooltip', title: (t :moderator), class: 'moderator-star') %>
|
11
|
-
<% end %>
|
12
12
|
<span class="actions">
|
13
13
|
<% if message.authorized? current_user %>
|
14
14
|
<% if current_user&.moderator_here? %>
|
15
15
|
<a class="discussion-message-approved <%= 'selected' if message.approved? %>" onclick="mumuki.Forum.discussionMessageToggleApprove('<%= approve_discussion_message_url(@discussion, message) %>', $(this))">
|
16
|
-
<%= fa_icon(:check, class: 'fa-
|
16
|
+
<%= fa_icon(:check, class: 'fa-lg') %>
|
17
17
|
</a>
|
18
18
|
<% if message.from_initiator? %>
|
19
19
|
<a class="discussion-message-not-actually-a-question <%= 'selected' if message.not_actually_a_question? %>" onclick="mumuki.Forum.discussionMessageToggleNotActuallyAQuestion('<%= question_discussion_message_url(@discussion, message) %>', $(this))">
|
20
|
-
<%= fa_icon('question-circle', type: 'regular', class: 'fa-
|
20
|
+
<%= fa_icon('question-circle', type: 'regular', class: 'fa-lg') %>
|
21
21
|
</a>
|
22
22
|
<% end %>
|
23
23
|
<% end %>
|
24
|
-
<%= link_to fa_icon('trash-alt', type: :regular), discussion_message_path(@discussion, message), method: :delete, data: { confirm: t(:are_you_sure, action: t(:destroy_message)) } %>
|
24
|
+
<%= link_to fa_icon('trash-alt', type: :regular, class: 'fa-lg'), discussion_message_path(@discussion, message), method: :delete, data: { confirm: t(:are_you_sure, action: t(:destroy_message)) }, class: 'discussion-delete-message' %>
|
25
25
|
<% end %>
|
26
26
|
<% if should_show_approved_for?(current_user, message) %>
|
27
27
|
<span class="discussion-message-approved selected">
|
28
|
-
<%= fa_icon(:check, class: 'fa-
|
28
|
+
<%= fa_icon(:check, class: 'fa-lg', 'data-toggle': 'tooltip', title: (t :approved_message)) %>
|
29
29
|
</span>
|
30
30
|
<% end %>
|
31
31
|
</span>
|