Skip to content

Commit

Permalink
Merge branch 'release/5.6.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
jorg-vr committed Jul 6, 2022
2 parents 3f0b8c6 + aec4a83 commit e36ec5e
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 16 deletions.
18 changes: 9 additions & 9 deletions app/assets/javascripts/components/search_actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export class SearchActions extends ShadowlessLitElement {
return this.actions.filter(isSearchAction);
}

performAction(action: SearchAction): boolean {
async performAction(action: SearchAction): boolean {
if (!action.action && !action.js) {
return true;
}
Expand All @@ -118,17 +118,17 @@ export class SearchActions extends ShadowlessLitElement {
if (action.confirm === undefined || window.confirm(action.confirm)) {
const url: string = searchQuery.addParametersToUrl(action.action);

fetch(url, {
const response = await fetch(url, {
method: "POST",
headers: { "Content-Type": "application/json" }
}).then( data => {
new Toast(data.message);
if (data.js) {
eval(data.js);
} else {
searchQuery.resetAllQueryParams();
}
});
const data = await response.json();
new Toast(data.message);
if (data.js) {
eval(data.js);
} else {
searchQuery.resetAllQueryParams();
}
}

return false;
Expand Down
3 changes: 1 addition & 2 deletions app/assets/stylesheets/pages/home.css.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
position: relative;
}

.home-header:before {
.home-header::before {
content: "";
background: $primary-30;
position: absolute;
Expand All @@ -23,7 +23,6 @@
transform: translate(-50%, 0);
}


.home-header img {
margin-top: -35px;
margin-bottom: -10px;
Expand Down
5 changes: 5 additions & 0 deletions app/controllers/auth/omniauth_callbacks_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,11 @@ def redirect_to_known_provider!(user)
end

def redirect_duplicate_email_for_provider!
ApplicationMailer.with(
authinfo: auth_hash,
errors: I18n.t('devise.omniauth_callbacks.duplicate_email_for_provider', email_address: auth_email, provider: provider.class.sym.to_s)
).user_unable_to_log_in.deliver_later

set_flash_message :alert, :duplicate_email_for_provider, email_address: auth_email, provider: provider.class.sym.to_s
flash[:options] = [{ url: contact_path, message: I18n.t('pages.contact.prompt') }]
redirect_to root_path
Expand Down
2 changes: 1 addition & 1 deletion app/views/activities/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<h2 class="card-title-text"><%= t ".title" %></h2>
</div>
<div class="card-supporting-text">
<%= render partial: 'layouts/searchbar', locals: {labels: @labels, programming_languages: @programming_languages, repositories: @repositories, activity_types: [ContentPage, Exercise], description_languages: ["en", "nl"], judges: @judges, no_dropdown_for: ["labels", "judges"]} %>
<%= render partial: 'layouts/searchbar', locals: {labels: @labels, programming_languages: @programming_languages, repositories: @repositories, activity_types: [ContentPage, Exercise], description_languages: ["en", "nl"], judges: @judges, no_dropdown_for: ["labels", "judges", "repositories"]} %>
<div id="activities-table-wrapper">
<%= render partial: 'activities_table', locals: {activities: @activities} %>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/annotations/question_index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<% actions << { text: t('questions.index.watch'), search: { refresh: true }, click: 'window.dodona.toggleIndexReload()' } %>
<% actions << { text: t('questions.index.everything'), search: { everything: true } } if @unfiltered %>
<% end %>
<%= render partial: 'layouts/searchbar', locals: { actions: actions, refresh_element: "#refresh-element", courses: @courses, question_states: Question.question_states.keys } %>
<%= render partial: 'layouts/searchbar', locals: { actions: actions, refresh_element: "#refresh-element", courses: @courses, question_states: Question.question_states.keys, no_dropdown_for: ["courses"] } %>
<div id="questions-table-wrapper">
<%= render partial: 'questions_table', locals: { questions: @questions } %>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/series/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
<div class="card-supporting-text card-border">
<div class="col-12">
<h4 id="add-activities"><%= t ".add_activities" %></h4>
<%= render partial: 'layouts/searchbar', locals: {baseUrl: available_activities_series_path(@series), eager: true, labels: @labels, programming_languages: @programming_languages, repositories: @repositories, activity_types: [ContentPage, Exercise], description_languages: ["en", "nl"]} %>
<%= render partial: 'layouts/searchbar', locals: {baseUrl: available_activities_series_path(@series), eager: true, labels: @labels, programming_languages: @programming_languages, repositories: @repositories, activity_types: [ContentPage, Exercise], description_languages: ["en", "nl"], no_dropdown_for: ["labels", "repositories"]} %>
<div id="activities-table-wrapper">
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/users/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<% end %>
</div>
<div class="card-supporting-text">
<%= render partial: 'layouts/searchbar', locals: {institutions: Institution.all} %>
<%= render partial: 'layouts/searchbar', locals: {institutions: Institution.all, no_dropdown_for: ["institutions"]} %>
<div id="users-table-wrapper">
<%= render partial: 'users_table', locals: {users: @users, pagination_opts: @pagination_opts} %>
</div>
Expand Down
2 changes: 1 addition & 1 deletion config/initializers/00_version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class Application
module Version
MAJOR = 5
MINOR = 6
PATCH = 1
PATCH = 2

STRING = [MAJOR, MINOR, PATCH].compact.join('.')
end
Expand Down

0 comments on commit e36ec5e

Please sign in to comment.