mumuki-laboratory 8.3.0 → 9.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/mumuki_laboratory/application/codemirror.js +1 -1
  3. data/app/assets/javascripts/mumuki_laboratory/application/upload.js +69 -14
  4. data/app/assets/stylesheets/mumuki_laboratory/application.scss +1 -0
  5. data/app/assets/stylesheets/mumuki_laboratory/application/_codemirror-themes.scss +1 -0
  6. data/app/assets/stylesheets/mumuki_laboratory/application/_layout.scss +3 -0
  7. data/app/assets/stylesheets/mumuki_laboratory/application/_modules.scss +1 -0
  8. data/app/assets/stylesheets/mumuki_laboratory/application/codemirror-themes/_mu-light.scss +3 -0
  9. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_content_show.scss +15 -2
  10. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_discussion.scss +31 -8
  11. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_medal.scss +1 -1
  12. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_user_menu.scss +35 -0
  13. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_user_profile.scss +11 -0
  14. data/app/controllers/api/base_controller.rb +0 -1
  15. data/app/controllers/api/courses_controller.rb +1 -1
  16. data/app/controllers/api/organizations_controller.rb +5 -2
  17. data/app/controllers/api/roles_controller.rb +4 -0
  18. data/app/controllers/api/users_controller.rb +6 -1
  19. data/app/controllers/application_controller.rb +1 -1
  20. data/app/controllers/concerns/with_authorization.rb +1 -16
  21. data/app/controllers/concerns/with_user_params.rb +4 -0
  22. data/app/controllers/discussions_messages_controller.rb +0 -1
  23. data/app/controllers/exam_authorization_requests_controller.rb +26 -0
  24. data/app/controllers/exam_registrations_controller.rb +6 -0
  25. data/app/controllers/users_controller.rb +8 -5
  26. data/app/helpers/application_helper.rb +4 -0
  27. data/app/helpers/breadcrumbs_helper.rb +4 -0
  28. data/app/helpers/content_view_helper.rb +19 -0
  29. data/app/helpers/exercise_input_helper.rb +8 -17
  30. data/app/helpers/icons_helper.rb +3 -11
  31. data/app/helpers/links_helper.rb +2 -2
  32. data/app/helpers/menu_bar_helper.rb +3 -3
  33. data/app/helpers/overlapped_buttons_helper.rb +10 -6
  34. data/app/helpers/progress_bar_helper.rb +2 -2
  35. data/app/helpers/user_menu_helper.rb +18 -0
  36. data/app/views/chapters/show.html.erb +17 -16
  37. data/app/views/complements/show.html.erb +1 -1
  38. data/app/views/discussions/_message.html.erb +7 -7
  39. data/app/views/exam_authorization_requests/show.html.erb +17 -0
  40. data/app/views/exam_registrations/show.html.erb +37 -0
  41. data/app/views/exams/show.html.erb +1 -1
  42. data/app/views/{layouts → exercises}/_exercise_skipped.html.erb +0 -0
  43. data/app/views/exercises/_exercise_title_icons.html.erb +4 -0
  44. data/app/views/exercises/show.html.erb +5 -8
  45. data/app/views/{layouts → guides}/_guide.html.erb +3 -3
  46. data/app/views/guides/_guide_container.html.erb +24 -0
  47. data/app/views/{layouts → guides}/_guide_title_icons.html.erb +1 -3
  48. data/app/views/layouts/_progress_bar.html.erb +9 -7
  49. data/app/views/layouts/_progress_listing.html.erb +5 -5
  50. data/app/views/layouts/_user_menu.html.erb +21 -0
  51. data/app/views/layouts/application.html.erb +1 -6
  52. data/app/views/layouts/exercise_inputs/editors/_upload.html.erb +11 -2
  53. data/app/views/lessons/show.html.erb +1 -1
  54. data/app/views/notifications/_discussion.html.erb +1 -0
  55. data/app/views/notifications/_dropdown.html.erb +13 -0
  56. data/app/views/notifications/_exam_authorization_request.html.erb +1 -0
  57. data/app/views/notifications/_exam_registration.html.erb +1 -0
  58. data/app/views/notifications/_message.html.erb +1 -0
  59. data/app/views/users/_user_form.html.erb +10 -8
  60. data/app/views/users/discussions.html.erb +28 -0
  61. data/app/views/users/edit.html.erb +1 -1
  62. data/app/views/users/messages.html.erb +27 -0
  63. data/app/views/users/show.html.erb +4 -51
  64. data/app/views/users/terms.html.erb +2 -2
  65. data/config/routes.rb +6 -0
  66. data/lib/mumuki/laboratory/controllers/notifications.rb +3 -22
  67. data/lib/mumuki/laboratory/locales/en.yml +35 -18
  68. data/lib/mumuki/laboratory/locales/es-CL.yml +26 -9
  69. data/lib/mumuki/laboratory/locales/es.yml +31 -15
  70. data/lib/mumuki/laboratory/locales/pt.yml +28 -11
  71. data/lib/mumuki/laboratory/version.rb +1 -1
  72. data/spec/controllers/exam_authorization_requests_controller_spec.rb +40 -0
  73. data/spec/controllers/exam_registrations_controller_spec.rb +19 -0
  74. data/spec/controllers/organizations_api_controller_spec.rb +16 -9
  75. data/spec/dummy/db/schema.rb +24 -0
  76. data/spec/features/exercise_flow_spec.rb +3 -3
  77. data/spec/features/login_flow_spec.rb +1 -1
  78. data/spec/features/menu_bar_spec.rb +24 -24
  79. data/spec/features/notifications_flow_spec.rb +46 -0
  80. data/spec/features/profile_flow_spec.rb +6 -9
  81. data/spec/features/terms_flow_spec.rb +30 -0
  82. data/spec/javascripts/bridge-spec.js +2 -2
  83. data/spec/javascripts/csrf-token-spec.js +2 -2
  84. data/spec/javascripts/editors-spec.js +7 -9
  85. data/spec/javascripts/elipsis-spec.js +4 -4
  86. data/spec/javascripts/events-spec.js +7 -7
  87. data/spec/javascripts/exercise-spec.js +7 -8
  88. data/spec/javascripts/global-spec.js +3 -3
  89. data/spec/javascripts/i18n-spec.js +23 -20
  90. data/spec/javascripts/kids-button-spec.js +6 -8
  91. data/spec/javascripts/results-renderers-spec.js +5 -5
  92. data/spec/javascripts/speech-bubble-renderer-spec.js +2 -3
  93. data/spec/javascripts/submissions-store-spec.js +14 -14
  94. data/spec/javascripts/sync-mode-spec.js +3 -3
  95. data/spec/javascripts/timeout-spec.js +2 -2
  96. data/spec/javascripts/timer-spec.js +2 -2
  97. data/spec/javascripts/upload-spec.js +80 -0
  98. metadata +129 -103
  99. data/app/views/layouts/_guide_container.html.erb +0 -28
@@ -1,5 +1,4 @@
1
1
  class DiscussionsMessagesController < AjaxController
2
- include WithAuthorization
3
2
  include WithUserDiscussionValidation
4
3
 
5
4
  before_action :set_discussion!, only: [:create, :destroy]
@@ -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
@@ -0,0 +1,6 @@
1
+ class ExamRegistrationsController < ApplicationController
2
+ def show
3
+ @registration = ExamRegistration.find(params[:id])
4
+ @authorization_request = @registration.authorization_request_for(current_user)
5
+ end
6
+ end
@@ -5,11 +5,6 @@ class UsersController < ApplicationController
5
5
  before_action :set_user!
6
6
  skip_before_action :validate_accepted_role_terms!
7
7
 
8
- def show
9
- @messages = current_user.messages.to_a
10
- @watched_discussions = current_user.watched_discussions_in_organization
11
- end
12
-
13
8
  def update
14
9
  current_user.update_and_notify! user_params
15
10
  current_user.accept_profile_terms!
@@ -27,6 +22,14 @@ class UsersController < ApplicationController
27
22
  @profile_terms ||= Term.profile_terms_for(current_user)
28
23
  end
29
24
 
25
+ def messages
26
+ @messages ||= current_user.messages_in_organization
27
+ end
28
+
29
+ def discussions
30
+ @watched_discussions = current_user.watched_discussions_in_organization
31
+ end
32
+
30
33
  def unsubscribe
31
34
  user_id = User.unsubscription_verifier.verify(params[:id])
32
35
  User.find(user_id).unsubscribe_from_reminders!
@@ -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
@@ -41,6 +41,10 @@ module BreadcrumbsHelper
41
41
  discussion.friendly.truncate_words(4)
42
42
  end
43
43
 
44
+ def breadcrumbs_for_my_account
45
+ header_breadcrumbs + breadcrumb_list_item(t(:my_account), 'last')
46
+ end
47
+
44
48
  private
45
49
 
46
50
  def breadcrumbs_for_linkable(e, extra=nil, last='')
@@ -0,0 +1,19 @@
1
+ module ContentViewHelper
2
+ def full_title_for(content)
3
+ "#{t(content_type_number(content), number: content.number)}: #{content.name}"
4
+ end
5
+
6
+ def short_title_for(content)
7
+ content.name
8
+ end
9
+
10
+ private
11
+
12
+ def content_type_number(content)
13
+ "#{content_type(content)}_number"
14
+ end
15
+
16
+ def content_type(content)
17
+ content.model_name.element
18
+ end
19
+ end
@@ -53,12 +53,11 @@ module ExerciseInputHelper
53
53
  waiting_text = t(options.waiting_t) if options.waiting_t.present?
54
54
  %Q{
55
55
  <div class="btn-submit-container">
56
- <#{options.tag} for="#{options.for}"
57
- class="btn btn-success btn-block btn-submit #{options.classes}"
56
+ <button class="btn btn-success btn-block btn-submit #{options.classes}"
58
57
  data-waiting="#{waiting_text}">
59
- #{fa_icon options.fa_icon}
58
+ #{fa_icon 'play'}
60
59
  #{text} #{remaining_attempts_text(assignment)}
61
- </#{options.tag}>
60
+ </button>
62
61
  </div>
63
62
  }.html_safe
64
63
  end
@@ -92,26 +91,18 @@ module ExerciseInputHelper
92
91
 
93
92
  def submit_button_options(exercise)
94
93
  if exercise.upload?
95
- struct for: 'upload-input',
96
- tag: :label,
94
+ struct classes: 'disabled',
97
95
  waiting_t: :uploading_solution,
98
- fa_icon: :upload,
99
- t: :upload_solution
96
+ t: :create_submission
100
97
  elsif exercise.hidden?
101
- struct tag: :button,
102
- classes: 'submission_control',
98
+ struct classes: 'submission_control',
103
99
  waiting_t: :working,
104
- fa_icon: :play,
105
100
  t: :continue_exercise
106
101
  elsif exercise.input_kids?
107
- struct tag: :button,
108
- classes: 'submission_control',
109
- fa_icon: :play
102
+ struct classes: 'submission_control'
110
103
  else
111
- struct tag: :button,
112
- classes: 'submission_control',
104
+ struct classes: 'submission_control',
113
105
  waiting_t: :sending_solution,
114
- fa_icon: :play,
115
106
  t: :create_submission
116
107
  end
117
108
  end
@@ -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 exercise_status_icon(exercise)
11
- link_to exercise_status_fa_icon(exercise),
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
@@ -26,7 +26,7 @@ module LinksHelper
26
26
  if current_user&.teacher_here? && item.teacher_info.present?
27
27
  %Q{
28
28
  <a
29
- class="mu-content-toolbar-item mu-popover"
29
+ class="mu-popover"
30
30
  data-toggle="popover"
31
31
  data-html="true"
32
32
  title="#{t :teacher_info}"
@@ -80,7 +80,7 @@ module LinksHelper
80
80
  return unless current_user&.writer?
81
81
 
82
82
  url = yield
83
- link_to fixed_fa_icon('pencil-alt'), url, class: "mu-content-toolbar-item", target: "_blank", title: t(:edit)
83
+ link_to fixed_fa_icon('pencil-alt'), url, target: "_blank", title: t(:edit)
84
84
  end
85
85
 
86
86
  def url_for_bibliotheca_guide(guide)
@@ -18,7 +18,7 @@ module MenuBarHelper
18
18
  end
19
19
 
20
20
  def link_to_profile
21
- menu_item('user', :profile, user_path)
21
+ menu_item('user', :my_account, user_path)
22
22
  end
23
23
 
24
24
  def link_to_classroom
@@ -39,8 +39,8 @@ 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
44
  end
45
45
 
46
46
  def any_menu_bar_links?
@@ -1,10 +1,10 @@
1
1
  module OverlappedButtonsHelper
2
2
  def expand_icon
3
- overlapped_button_icon :fullscreen, :expand, " (F11)"
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, guide_progress_path(guide), class: 'mu-content-toolbar-item mu-restart-guide', data: {confirm: t(:confirm_restart)}, method: :delete
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, extra_title='')
19
- fa_icon(icon, title: t(key) + extra_title, class: 'fa-fw', role: 'button', 'aria-label': t(key), 'data-placement': 'left')
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(exercise, active)
5
- "progress-list-item text-center #{class_for_exercise(exercise)} #{active ? 'active' : ''}"
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
@@ -0,0 +1,18 @@
1
+ module UserMenuHelper
2
+ def profile_user_menu_link
3
+ user_menu_link t(:my_profile), user_path, 'show'
4
+ end
5
+
6
+ def messages_user_menu_link
7
+ user_menu_link t(:messages), messages_user_path, 'messages'
8
+ end
9
+
10
+ def discussions_user_menu_link
11
+ user_menu_link t(:discussions), discussions_user_path, 'discussions'
12
+ end
13
+
14
+ def user_menu_link(label, path, active_on)
15
+ link_klass = 'active' if action_name == active_on
16
+ link_to label, path, { class: link_klass }.compact
17
+ end
18
+ end
@@ -2,33 +2,34 @@
2
2
  <%= breadcrumbs @chapter %>
3
3
  <% end %>
4
4
 
5
- <div class="chapter-description">
6
- <h1 class="pull-left">
7
- <span class="hidden-xs pull-left"><%= t(:chapter_number, number: @chapter.number) %>:&nbsp;</span>
8
- <span class="pull-left"><%= @chapter.name %></span>
5
+ <div class="row">
6
+ <div class="mu-inline-block-left">
7
+ <h1 class="hidden-xs"><%= full_title_for @chapter %></h1>
8
+ <h1 class="visible-xs"><%= short_title_for @chapter %></h1>
9
+
9
10
  <% if @chapter.monolesson? %>
10
- <div class="mu-monolesson pull-left">
11
- <%= render partial: 'layouts/guide_title_icons' %>
12
- </div>
11
+ <%= render partial: 'guides/guide_title_icons' %>
13
12
  <% end %>
14
- </h1>
15
-
16
- <%= @chapter.description_html %>
17
-
13
+ </div>
14
+ </div>
15
+ <div class="row">
16
+ <div class="col-md-12">
17
+ <div class="text-box mu-chapter-description">
18
+ <%= @chapter.description_html %>
19
+ </div>
20
+ </div>
18
21
  </div>
19
22
 
20
23
  <% if @chapter.lessons.present? %>
21
24
  <% if @chapter.monolesson? %>
22
- <div class="mu-monolesson">
23
- <%= render partial: 'layouts/guide', locals: { subject: @monolesson } %>
24
- </div>
25
+ <div> <%= render partial: 'guides/guide', locals: { subject: @monolesson } %> </div>
25
26
  <% else %>
26
27
  <div>
27
28
  <h3><%= t(:lessons) %></h3>
28
29
 
29
- <% @chapter.lessons.each do |lesson| %>
30
+ <% @chapter.lessons.includes(guide: :exercises).each do |lesson| %>
30
31
  <h4><%= lesson.number %>. <%= link_to_path_element lesson, mode: :plain %></h4>
31
- <%= render partial: 'layouts/progress_listing', locals: { exercises: lesson.exercises } %>
32
+ <%= render partial: 'layouts/progress_listing', locals: { guide: lesson.guide } %>
32
33
  <% end %>
33
34
  </div>
34
35
  <% end %>
@@ -1 +1 @@
1
- <%= render partial: "layouts/guide_container", locals: { subject: @complement }%>
1
+ <%= render partial: "guides/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-xs') %>
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-xs') %>
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-xs', 'data-toggle': 'tooltip', title: (t :approved_message)) %>
28
+ <%= fa_icon(:check, class: 'fa-lg', 'data-toggle': 'tooltip', title: (t :approved_message)) %>
29
29
  </span>
30
30
  <% end %>
31
31
  </span>
@@ -0,0 +1,17 @@
1
+ <%= content_for :breadcrumbs do %>
2
+ <%= breadcrumbs @authorization_request %>
3
+ <% end %>
4
+
5
+ <div class="row">
6
+ <div class="mu-inline-block-left">
7
+ <h1>
8
+ <%= t :exam_registration_to, description: @authorization_request.exam_registration.description %>
9
+ </h1>
10
+ </div>
11
+ </div>
12
+
13
+ <% if @authorization_request.approved? %>
14
+ <%= t :exam_authorization_request_approved_html, date: l(@authorization_request.exam.start_time, format: :long) %>
15
+ <% else %>
16
+ <%= t :exam_authorization_request_rejected %>
17
+ <% end %>
@@ -0,0 +1,37 @@
1
+ <%= content_for :breadcrumbs do %>
2
+ <%= breadcrumbs @registration %>
3
+ <% end %>
4
+
5
+ <div class="row">
6
+ <div class="mu-inline-block-left">
7
+ <h1>
8
+ <%= t :exam_registration_to, description: @registration.description %>
9
+ </h1>
10
+ </div>
11
+ </div>
12
+
13
+ <div class="row">
14
+ <div class="mu-inline-block-left">
15
+ <div class="bs-callout bs-callout-info">
16
+ <h4 class="text-info">
17
+ <strong><%= fa_icon :info_circle %> <%= t :important_info %></strong>
18
+ </h4>
19
+ <p>
20
+ <%= t :exam_registration_explanation_html, date: l(@registration.end_time, format: :long) %>
21
+ </p>
22
+ </div>
23
+ <%= form_for @authorization_request do |f| %>
24
+ <%= f.hidden_field :exam_registration_id, value: @registration.id %>
25
+ <div class="form-group">
26
+ <%= f.label :exam_id, t(:exam_registration_choose_exam) %>
27
+ <% @registration.exams.each do |exam| %>
28
+ <div class="field radio complementary complementary-radio">
29
+ <%= f.radio_button(:exam_id, exam.id, id: exam.id, required: true, checked: @authorization_request.exam_id == exam.id) %>
30
+ <%= label_tag exam.id, l(exam.start_time, format: :long) %>
31
+ </div>
32
+ <% end %>
33
+ </div>
34
+ <button class="btn btn-success"> <%= t :save %> </button>
35
+ <% end %>
36
+ </div>
37
+ </div>