Commit e78b77e6 authored by Taico Aerts's avatar Taico Aerts
Browse files

Merge branch 'development' into 'master'

Project Forum Release 2.9.0

See merge request !918
parents c6ed4fca 299d631a
GIT
remote: https://github.com/activerecord-hackery/ransack.git
revision: 0fcf1b5ebf35e7dcd376754bdc0a6a101c46562b
revision: 04ee9a362d12d8c84171cef8fbf10d472d50f9bd
specs:
ransack (2.6.0)
activerecord (>= 6.0.4)
activesupport (>= 6.0.4)
ransack (3.2.1)
activerecord (>= 6.1.5)
activesupport (>= 6.1.5)
i18n
GIT
......@@ -27,9 +27,9 @@ GIT
GIT
remote: https://gitlab.ewi.tudelft.nl/eip/projectforum/rglpk
revision: fb3118d018873992b2e0ef107cabc46f13717c34
revision: d4c051f935fd996a0a876d2b6074edb999e7f015
specs:
rglpk (1.0.0)
rglpk (1.1.0)
PATH
remote: vendor/gems/graph_matching
......@@ -162,7 +162,7 @@ GEM
rack-test (>= 0.6.3)
regexp_parser (>= 1.5, < 3.0)
xpath (~> 3.2)
caxlsx (3.2.0)
caxlsx (3.3.0)
htmlentities (~> 4.3, >= 4.3.4)
marcel (~> 1.0)
nokogiri (~> 1.10, >= 1.10.4)
......@@ -321,6 +321,8 @@ GEM
net-ssh (>= 2.6.5, < 8.0.0)
net-ssh (7.0.1)
nio4r (2.5.8)
nokogiri (1.13.9-arm64-darwin)
racc (~> 1.4)
nokogiri (1.13.9-x86_64-linux)
racc (~> 1.4)
orm_adapter (0.5.0)
......@@ -405,7 +407,7 @@ GEM
rubocop-ast (>= 1.22.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.22.0)
rubocop-ast (1.23.0)
parser (>= 3.1.1.0)
rubocop-rails (2.16.1)
activesupport (>= 4.2.0)
......@@ -461,6 +463,7 @@ GEM
actionpack (>= 5.2)
activesupport (>= 5.2)
sprockets (>= 3.0.0)
sqlite3 (1.5.3-arm64-darwin)
sqlite3 (1.5.3-x86_64-linux)
sshkit (1.21.3)
net-scp (>= 1.1.2)
......@@ -498,6 +501,7 @@ GEM
rubyzip (>= 1.0.0)
PLATFORMS
arm64-darwin-21
x86_64-linux
DEPENDENCIES
......@@ -582,4 +586,4 @@ DEPENDENCIES
zip-zip
BUNDLED WITH
2.2.9
2.3.24
......@@ -8,10 +8,14 @@ $(document).on('turbolinks:load', function() {
});
function init_selectize($elem) {
$elem.selectize({
plugins: ['remove_button'],
delimiter: ','
});
$elem.each(function () {
if (this.tagName === 'SELECT' && this.selectize === undefined) {
$(this).selectize({
plugins: ['remove_button'],
delimiter: ','
});
}
});
}
$(document).on('turbolinks:before-cache', function() {
......
......@@ -75,13 +75,6 @@ label.required:after {
}
}
.show-collapsed { display: none; }
.hide-collapsed { display: inherit; }
.collapsed > .show-collapsed,
.collapsed > span > .show-collapsed { display: inherit; }
.collapsed > .hide-collapsed,
.collapsed > span > .hide-collapsed { display: none; }
.list-group-item.archived {
background-color: #e0e0e0;
}
......
......@@ -18,10 +18,10 @@ $alert-danger-border: $state-danger-border !default;
margin-top: 15px;
}
.main--devise .alert-info,
.main--devise .alert-success,
.main--devise .alert-warning,
.main--devise .alert-danger {
.main--devise .alert-info:not(.devise-alert-in-form),
.main--devise .alert-success:not(.devise-alert-in-form),
.main--devise .alert-warning:not(.devise-alert-in-form),
.main--devise .alert-danger:not(.devise-alert-in-form) {
margin: 75px 0 -125px 0;
}
......
......@@ -44,69 +44,69 @@
.columns.two { width: 16.66%; }
.columns.one { width: 8.33%; }
.pas, .psa { padding: 5px; }
.pas, .psa { padding: 5px !important; }
.pam, .pma { padding: 10px; }
.pal, .pla { padding: 20px; }
.pax, .pxa { padding: 40px; }
.paxx, .pxxa { padding: 80px; }
.paxxx, .pxxxa { padding: 160px; }
.pzt, .ptz { padding-top: 0; }
.pzt, .ptz { padding-top: 0 !important; }
.pst, .pts { padding-top: 5px; }
.pmt, .ptm { padding-top: 10px; }
.plt, .ptl { padding-top: 20px; }
.pxt, .ptx { padding-top: 40px; }
.pzl, .plz { padding-left: 0; }
.pzl, .plz { padding-left: 0 !important; }
.psl, .pls { padding-left: 5px; }
.pml, .plm { padding-left: 10px; }
.pll { padding-left: 20px; }
.pxl, .plx { padding-left: 40px; }
.pzr, .prz { padding-right: 0; }
.pzr, .prz { padding-right: 0 !important; }
.psr, .prs { padding-right: 5px; }
.pmr, .prm { padding-right: 10px; }
.plr, .prl { padding-right: 20px; }
.pxr, .prx { padding-right: 40px; }
.pzb, .pbz { padding-bottom: 0; }
.pzb, .pbz { padding-bottom: 0 !important; }
.psb, .pbs { padding-bottom: 5px; }
.pmb, .pbm { padding-bottom: 10px; }
.plb, .pbl { padding-bottom: 20px; }
.pxb, .pbx { padding-bottom: 40px; }
.mza, .maz { margin: 0; }
.mza, .maz { margin: 0 !important; }
.msa, .mas { margin: 5px; }
.mma, .mam { margin: 10px; }
.mla, .mal { margin: 20px; }
.mxa, .max { margin: 40px; }
.mzt, .mtz { margin-top: 0; }
.mzt, .mtz { margin-top: 0 !important; }
.mst, .mts { margin-top: 5px; }
.mmt, .mtm { margin-top: 10px; }
.mlt, .mtl { margin-top: 20px; }
.mxt, .mtx { margin-top: 40px; }
.mzl, .mlz { margin-left: 0; }
.mzl, .mlz { margin-left: 0 !important; }
.msl, .mls { margin-left: 5px; }
.mml, .mlm { margin-left: 10px; }
.mll { margin-left: 20px; }
.mxl, .mlx { margin-left: 40px; }
.mzr, .mrz { margin-right: 0; }
.mzr, .mrz { margin-right: 0 !important; }
.msr, .mrs { margin-right: 5px; }
.mmr, .mrm { margin-right: 10px; }
.mlr, .mrl { margin-right: 20px; }
.mxr, .mrx { margin-right: 40px; }
.mzb, .mbz { margin-bottom: 0; }
.mzb, .mbz { margin-bottom: 0 !important; }
.msb, .mbs { margin-bottom: 5px; }
.mmb, .mbm { margin-bottom: 10px; }
.mlb, .mbl { margin-bottom: 20px; }
.mxb, .mbx { margin-bottom: 40px; }
.pno { padding: 0; }
.mno { margin: 0; }
.pno { padding: 0 !important; }
.mno { margin: 0 !important; }
.d-flex {
display: flex;
......@@ -116,6 +116,10 @@
justify-content: space-between;
}
.align-items-center {
align-items: center;
}
.flex-column {
flex-direction: column;
}
......@@ -203,6 +207,7 @@
.bc-gray { border-color: #999; }
.bc-dkgray { border-color: #333; }
.bc-ltgray { border-color: #EEE; }
.bc-primary { border-color: $brand-primary; }
.btn-default-if-not-active:not(.active):not(:hover){
color: #333;
......@@ -240,6 +245,13 @@
box-sizing:border-box;
}
.show-collapsed { display: none; }
.hide-collapsed { display: inherit; }
.collapsed > .show-collapsed,
.collapsed > span > .show-collapsed { display: inherit; }
.collapsed > .hide-collapsed,
.collapsed > span > .hide-collapsed { display: none; }
@media (min-width: $screen-md-min) {
.pull-md-right { float: right !important; }
}
......
......@@ -32,7 +32,9 @@ module Admin
course_edition_ids: params[:importing_editions],
filtered_importable_projects: params[:filtered_importable_projects],
success_projects: success_projects,
failed_projects: failed_projects), status: :see_other # 303
failed_projects: failed_projects,
subject: params[:subject],
message: params[:message]), status: :see_other # 303
end
private
......@@ -70,25 +72,32 @@ module Admin
copy_course_specific_roles(new_project, project)
if params[:notify] == '1'
event = log_event(
new_project,
:import
).associate(project.course_edition, as: :course_edition_old)
.associate(@edition, as: :course_edition_new)
.associate(project, as: :project_old)
event = log_generic_notification_event(
prepare_notification_text(params[:subject], project, new_project),
prepare_notification_text(params[:message], project, new_project)
).associate(new_project, as: :project)
end
end
# If there is no event, return
return new_project unless event
# If there is no event, return
next unless event
# Actually send notification if no failures occurred
event.notify(User.with_role(:client, project), as: :client)
.notify(User.with_role(:employee, project.offerer.actable) - User.with_role(:client, project), as: :employee)
# Actually send notification if no failures occurred
event.notify(User.with_role(:client, project))
.notify(User.with_role(:employee, project.offerer.actable) - User.with_role(:client, project))
end
new_project
end
def prepare_notification_text(text, old_project, new_project)
text.to_str
.gsub('$PROJECT_DATE', I18n.l(old_project.created_at, format: :human_date))
.gsub('$PROJECT', old_project.name)
.gsub('$OFFERER_NAME', old_project.offerer.name)
.gsub('$OLD_COURSE_EDITION', old_project.course_edition.display_name)
.gsub('$NEW_COURSE_EDITION', new_project.course_edition.display_name)
end
def copy_course_specific_roles(new_project, project)
csr_ids_to_copy = (params[:course_specific_roles_to_migrate] || {})[:ids] || []
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment