Skip to content

Commit

Permalink
Merge branch 'staging' into tuan2
Browse files Browse the repository at this point in the history
  • Loading branch information
amtuannguyen committed Nov 7, 2024
2 parents de88d88 + db043fa commit b87aa45
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 21 deletions.
13 changes: 4 additions & 9 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@
</head>
<body>
<div class="container shadow-lg rounded-3 border p-4 p-md-5 my-md-3">
<% if AppSettings.app_maintenance == "true" %>
<div class="alert alert-warning text-center" role="alert">
<strong>Attention:</strong> <%= AppSettings.app_maintenance_message %>
</div>
<% end %>
<header>
<div class="d-flex flex-column flex-md-row align-items-center">
<div class="p-2">
Expand All @@ -31,11 +26,11 @@
<main class="my-3">
<header>
<%= render :template => "layouts/navbar" %>

<% if AppSettings.app_maintenance == "true" %>
<div class="alert alert-warning" role="alert">
<h2>Attention!</h2>
<p><%= AppSettings.app_maintenance_message %></p>
</div>
<div class="alert alert-warning text-center" role="alert">
<%= raw(AppSettings.app_maintenance_message) %>
</div>
<% end %>

<% flash.each do |name, msg| %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/settings/_student_submission.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<%= f.input :student_begin_external_non_yorku_email, as: :rich_text_area, label: "Non-YorkU email message", input_html: { rows: 3 } %>
</div>
<div class="tab-pane fade" id="nav-update" role="tabpanel" aria-labelledby="nav-update-tab" tabindex="0">
<%= f.input :student_update_details_initial, as: :rich_text_area, label: "Initial information", input_html: { rows: 15, class: "mb-4" } %>
<%= f.input :student_update_details_initial, as: :rich_text_area, label: "Update ETD Details", input_html: { rows: 15, class: "mb-4" } %>
<%= f.input :student_update_details_abstract, as: :rich_text_area, label: "Abstract", input_html: { rows: 5, class: "mb-4" } %>
<%= f.input :student_update_details_subjects, as: :rich_text_area, label: "Subjects", input_html: { rows: 5, class: "mb-4" } %>
<%= f.input :student_update_details_keywords, as: :rich_text_area, label: "Keywords", input_html: { rows: 5 } %>
Expand Down
6 changes: 3 additions & 3 deletions app/views/student_view/process/review.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@
</div>

<div class="licence-box my-5 bg-light p-3" >
<h4 title="Yorkspace Distribution Licence">Yorkspace Distribution Licence</h4>
<h4 title="Yorkspace Distribution Licence">YorkSpace Non-Exclusive Distribution Licence</h4>
<div class="form-text">Please review the licence below and accept if you agree</div>
<hr class="text-primary border-3">
<p>
<a id="ydlButton" class="btn btn-primary" data-bs-toggle="collapse" href="#collapseYDL" role="button" aria-expanded="false" aria-controls="collapseYDL">
View YorkSpace Licence Agreement
View YorkSpace Non-Exclusive Distribution Licence Agreement
</a>
</p>
<div class="collapse" id="collapseYDL">
Expand All @@ -83,7 +83,7 @@
</div>

<div class="bg-secondary-subtle p-2 fw-bold">
<%= f.input :yorkspace_licence_agreement, as: :boolean, label: "I agree to YorkSpace Distribution Licence", required: true %>
<%= f.input :yorkspace_licence_agreement, as: :boolean, label: "I agree to YorkSpace Non-Exclusive Distribution Licence", required: true %>
</div>
</div>

Expand Down
12 changes: 6 additions & 6 deletions app/views/student_view/process/status.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
</button>
</h2>
<div id="collapseOne" class="<%= show_accordion(Thesis::OPEN) %>" data-bs-parent="#accordionThesis">
<div class="accordion-body">
<div class="accordion-body settings-content">
<%= raw(AppSettings.student_check_status_open) %>
</div>
</div>
Expand All @@ -45,7 +45,7 @@
</button>
</h2>
<div id="collapseTwo" class="<%= show_accordion(Thesis::UNDER_REVIEW) %>" data-bs-parent="#accordionThesis">
<div class="accordion-body">
<div class="accordion-body settings-content">
<%= raw(AppSettings.student_check_status_under_review) %>
</div>
</div>
Expand All @@ -58,7 +58,7 @@
</button>
</h2>
<div id="collapseThree" class="<%= show_accordion(Thesis::RETURNED) %>" data-bs-parent="#accordionThesis">
<div class="accordion-body">
<div class="accordion-body settings-content">
<%= raw(AppSettings.student_check_status_returned) %>
</div>
</div>
Expand All @@ -71,7 +71,7 @@
</button>
</h2>
<div id="collapseFour" class="<%= show_accordion(Thesis::ACCEPTED) %>" data-bs-parent="#accordionThesis">
<div class="accordion-body">
<div class="accordion-body settings-content">
<%= raw(AppSettings.student_check_status_accepted) %>
</div>
</div>
Expand All @@ -84,7 +84,7 @@
</button>
</h2>
<div id="collapseFive" class="<%= show_accordion(Thesis::PUBLISHED) %>" data-bs-parent="#accordionThesis">
<div class="accordion-body">
<div class="accordion-body settings-content">
<%= raw(AppSettings.student_check_status_published) %>
</div>
</div>
Expand All @@ -97,7 +97,7 @@
</button>
</h2>
<div id="collapseSix" class="<%= show_accordion(Thesis::REJECTED) %>" data-bs-parent="#accordionThesis">
<div class="accordion-body">
<div class="accordion-body settings-content">
<%= raw(AppSettings.student_check_status_rejected) %>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions test/system/students_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -287,13 +287,13 @@ class StudentsTest < ApplicationSystemTestCase
assert page.has_selector?('#thesis_yorkspace_licence_agreement', visible: true), "#thesis_yorkspace_licence_agreement not found."
checkbox = find('#thesis_yorkspace_licence_agreement', visible: true)
assert_not checkbox.disabled?
click_link('View YorkSpace Licence Agreement')
click_link('View YorkSpace Non-Exclusive Distribution Licence Agreement')
assert page.has_selector?('#yorkspace-licence', visible: true), "#yorkspace-licence not found."
assert page.has_selector?('#thesis_yorkspace_licence_agreement', visible: true), "#thesis_yorkspace_licence_agreement not found."
checkbox = find('#thesis_yorkspace_licence_agreement', visible: true)
checkbox.check

check('I agree to YorkSpace Distribution Licence', allow_label_click: true)
check('I agree to YorkSpace Non-Exclusive Distribution Licence', allow_label_click: true)

assert checkbox.checked?, "#thesis_yorkspace_licence_agreement checkbox is not checked."

Expand Down

0 comments on commit b87aa45

Please sign in to comment.