From 8b4729cacb61b74fd559418690a1148b384ddddc Mon Sep 17 00:00:00 2001 From: "M. Sonntag" Date: Mon, 19 Oct 2020 17:42:40 +0200 Subject: [PATCH 1/9] [patch/v1.2-v1.3.sql] Add req extension note The database update script relies on a database extension that needs to be activated before the script can be run. The commit adds the required steps as a note. --- patch/patch_v1_2_to_v1_3.sql | 3 +++ 1 file changed, 3 insertions(+) diff --git a/patch/patch_v1_2_to_v1_3.sql b/patch/patch_v1_2_to_v1_3.sql index 21d4a4bf..e581d2af 100644 --- a/patch/patch_v1_2_to_v1_3.sql +++ b/patch/patch_v1_2_to_v1_3.sql @@ -2,6 +2,9 @@ SQL script to copy the content of 'description', 'logo' URL and 'thumbnail' URL from the 'conference' table to the new 'conftext' table. The columns above will be deprecated. This script is required when migrating from GCA-Web v1.2 to v1.3. + +Make sure uuid_generate_v1 is available by enabling the extension uuid-ossp as +the postgres superuser in database play: 'CREATE EXTENSION IF NOT EXISTS "uuid-ossp";' */ INSERT INTO conftext (uuid, cttype, "text", conference_uuid) From e5dee5c18fd1b56583bcd4ec9d71518484f943be Mon Sep 17 00:00:00 2001 From: "M. Sonntag" Date: Mon, 19 Oct 2020 17:44:22 +0200 Subject: [PATCH 2/9] [views/conferencelist] Fix thumbnails display Offsite thumbnails where not scaled properly, the commit uses the appropriate css class for scaled display. --- app/views/conferencelist.scala.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/conferencelist.scala.html b/app/views/conferencelist.scala.html index 65aa6c1c..ee6406d8 100644 --- a/app/views/conferencelist.scala.html +++ b/app/views/conferencelist.scala.html @@ -67,7 +67,7 @@

@if(conference.getConfText("thumbnail") != null && conference.getConfText("thumbnail") != "") { - } From 9b3153a93664e6cf834e9fd5aa60238cd6355f34 Mon Sep 17 00:00:00 2001 From: "M. Sonntag" Date: Mon, 19 Oct 2020 19:26:44 +0200 Subject: [PATCH 3/9] [less] Add print stylesheet --- .../custom/bootstrap/_custom-print.less | 9 +++ .../g-node-bootstrap-print.play.less | 68 +++++++++++++++++++ app/views/template.scala.html | 4 ++ 3 files changed, 81 insertions(+) create mode 100644 app/assets/stylesheets/custom/bootstrap/_custom-print.less create mode 100644 app/assets/stylesheets/g-node-bootstrap-print.play.less diff --git a/app/assets/stylesheets/custom/bootstrap/_custom-print.less b/app/assets/stylesheets/custom/bootstrap/_custom-print.less new file mode 100644 index 00000000..25844ca4 --- /dev/null +++ b/app/assets/stylesheets/custom/bootstrap/_custom-print.less @@ -0,0 +1,9 @@ +// Do not display elements with the class noprint in the print view +.noprint { + display: none; +} + +// Do not display specific elements in the print view +.navbar, .footer, .hidden-data, .nav, .jumbo-small, .callout, .pager, .alert { + display: none; +} diff --git a/app/assets/stylesheets/g-node-bootstrap-print.play.less b/app/assets/stylesheets/g-node-bootstrap-print.play.less new file mode 100644 index 00000000..9aa0329d --- /dev/null +++ b/app/assets/stylesheets/g-node-bootstrap-print.play.less @@ -0,0 +1,68 @@ +// file used for compilation within a play framework + +// adjust this to the path where the original bootstrap less files are located +@bootPath: "/lib/bootstrap/less/"; +// adjust this to the path where the custom less files are located +@customPath: "custom/bootstrap/"; + +// Core variables and mixins +@import "@{bootPath}variables"; +@import "@{bootPath}mixins"; + +// Custom variables, overwrite existing bootstrap variables +@import "@{customPath}_custom-colors"; +@import "@{customPath}_custom-vars"; + +// Reset +@import "@{bootPath}normalize"; +@import "@{bootPath}print"; + +// Core CSS +@import "@{bootPath}scaffolding"; +@import "@{bootPath}type"; +@import "@{bootPath}code"; +@import "@{bootPath}grid"; +@import "@{bootPath}tables"; +@import "@{bootPath}forms"; +@import "@{bootPath}buttons"; + +// Components +@import "@{bootPath}component-animations"; +@import "@{bootPath}glyphicons"; +@import "@{bootPath}dropdowns"; +@import "@{bootPath}button-groups"; +@import "@{bootPath}input-groups"; +@import "@{bootPath}navs"; +@import "@{bootPath}navbar"; +@import "@{bootPath}breadcrumbs"; +@import "@{bootPath}pagination"; +@import "@{bootPath}pager"; +@import "@{bootPath}labels"; +@import "@{bootPath}badges"; +@import "@{bootPath}jumbotron"; +@import "@{bootPath}thumbnails"; +@import "@{bootPath}alerts"; +@import "@{bootPath}progress-bars"; +@import "@{bootPath}media"; +@import "@{bootPath}list-group"; +@import "@{bootPath}panels"; +@import "@{bootPath}wells"; +@import "@{bootPath}close"; + +// Components w/ JavaScript +@import "@{bootPath}modals"; +@import "@{bootPath}tooltip"; +@import "@{bootPath}popovers"; +@import "@{bootPath}carousel"; + +// Utility classes +@import "@{bootPath}utilities"; +@import "@{bootPath}responsive-utilities"; + +// Custom elements +@import "@{customPath}_custom-elements"; + +// Custom print view elements; needs to be the last import +// to make sure existing styles are overwritten by the print +// style. +@import "@{customPath}_custom-print"; diff --git a/app/views/template.scala.html b/app/views/template.scala.html index 31fa34d4..73f8eefb 100644 --- a/app/views/template.scala.html +++ b/app/views/template.scala.html @@ -31,6 +31,10 @@ + + + From 5995bd3e8389d33cff863a6e9828670206449df6 Mon Sep 17 00:00:00 2001 From: "M. Sonntag" Date: Mon, 19 Oct 2020 19:27:29 +0200 Subject: [PATCH 4/9] [less/print] Finetune print layout Closes #508 A print specific stylesheet ensures that abstracts prints are usefully rendered. --- .../custom/bootstrap/_custom-print.less | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/app/assets/stylesheets/custom/bootstrap/_custom-print.less b/app/assets/stylesheets/custom/bootstrap/_custom-print.less index 25844ca4..0dc67447 100644 --- a/app/assets/stylesheets/custom/bootstrap/_custom-print.less +++ b/app/assets/stylesheets/custom/bootstrap/_custom-print.less @@ -7,3 +7,57 @@ .navbar, .footer, .hidden-data, .nav, .jumbo-small, .callout, .pager, .alert { display: none; } + +// Display the conference name but do not display the local link in the print view +.page-header { + h1 { + a[href]:after { + display: none; + } + } +} + +.affiliations, .abstract-text, .acknowledgements, .references { + margin: 0.5em; + padding: 0.5em; +} + +// Required to properly display abstract authors in the print view +.authors { + padding: 0; + margin: 0; + margin-top: 0.2em; + list-style: none; + display: inline-block; + font-size: 14px; + + ul { + padding: 0; + margin: 0; + list-style: none; + display: inline-block; + font-size: large; + } + + li { + display: inline-block; + + span:after { + content: " "; + } + } + + li:after { + content: ", "; + } + + li:last-child:after { + content: "" !important; + } +} + +// Required to properly display abstract copyright text in the print view +.foot-info ul { + list-style-type: none; + padding-left: 0px; +} From a0abb44cc6afd5d4eb92b74a81221069e018c487 Mon Sep 17 00:00:00 2001 From: "M. Sonntag" Date: Mon, 19 Oct 2020 20:22:16 +0200 Subject: [PATCH 5/9] [views/conferencelist] Fix unpublished conf list Closes #500 The unpublished conferences section should only occur if the logged in user is either an admin or a conference admin. --- app/views/conferencelist.scala.html | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/views/conferencelist.scala.html b/app/views/conferencelist.scala.html index ee6406d8..4f4d3b26 100644 --- a/app/views/conferencelist.scala.html +++ b/app/views/conferencelist.scala.html @@ -99,10 +99,13 @@

@conference.name

} @if(account.isDefined) { -
-

Unpublished conferences

-
@for((conference,i) <- list_other.zipWithIndex) { + @if(i == 0 && (conference.isOwner(account.get) || account.get.isAdmin)) { +
+

Unpublished conferences

+
+ } + @if(!conference.isPublished && (conference.isOwner(account.get) || account.get.isAdmin)) {
From d23d1308072a86bb4737262b03a9cd477cc56dd4 Mon Sep 17 00:00:00 2001 From: "M. Sonntag" Date: Mon, 19 Oct 2020 20:40:51 +0200 Subject: [PATCH 6/9] [doc] Add json example files Closes #483 Adds full json examples for locations and schedule. --- doc/json_examples/locations.json | 38 ++++++++ doc/json_examples/schedule.json | 161 +++++++++++++++++++++++++++++++ 2 files changed, 199 insertions(+) create mode 100644 doc/json_examples/locations.json create mode 100644 doc/json_examples/schedule.json diff --git a/doc/json_examples/locations.json b/doc/json_examples/locations.json new file mode 100644 index 00000000..350986b1 --- /dev/null +++ b/doc/json_examples/locations.json @@ -0,0 +1,38 @@ +[ + { + "ExtendedData":"", + "name":"Event A", + "description":"Theologicum, Liebermeisterstrasse 12, 72076 Tuebingen", + "point": + { + "lat":48.525742885891795, + "long":9.055126905441284 + }, + "type":0, + "zoomto":true + }, + { + "ExtendedData":"", + "name":"Event B", + "description":"Neckarmueller, Gartenstrasse , 72076 Tuebingen", + "point": + { + "lat":48.51933329151785, + "long":9.058645963668823 + }, + "type":5, + "zoomto":true + }, + { + "ExtendedData":"", + "name":"Event C", + "description":"Rittersaal, Burgsteige 11, 72076 Tuebingen", + "point": + { + "lat":48.51937237686814, + "long":9.050610065460205 + }, + "type":0, + "zoomto":true + } +] diff --git a/doc/json_examples/schedule.json b/doc/json_examples/schedule.json new file mode 100644 index 00000000..a7cb9b6b --- /dev/null +++ b/doc/json_examples/schedule.json @@ -0,0 +1,161 @@ +[ + { + "title": "Satellite Workshops", + "subtitle": "Description", + "tracks": [ + { + "title": "Session title", + "subtitle": null, + "chair": ["Chair name"], + "events": [ + { + "title": "Session Day I", + "subtitle": null, + "start": "14:00", + "end": "18:30", + "date": "2018-09-25", + "location": "Some Address", + "type": "workshop", + "authors": ["Author A", "Author B"] + }, + { + "title": "Session Day II", + "subtitle": null, + "start": "08:30", + "end": "12:30", + "date": "2018-09-26", + "location": "Other Address", + "type": "workshop", + "authors": ["Author A", "Author B"] + } + ] + }, + { + "title": "Other Session title", + "subtitle": null, + "chair": ["Chair A","Chair B"], + "events": [ + { + "title": "Session Day I", + "subtitle": null, + "start": "14:00", + "end": "18:30", + "date": "2018-09-25", + "location": "Address 1", + "type": "workshop", + "authors": ["Author A"] + } + ] + } + ] + }, + { + "title": "Postdoc Meeting", + "subtitle": null, + "start": "19:00", + "end": null, + "location": "Some address", + "date": "2018-09-25", + "authors": [], + "type": "social", + "abstract": null + }, + { + "title" : "Conference Opening", + "subtitle" : null, + "chair" : [], + "events" : [ + { + "title": "Welcome by Name A", + "subtitle": "President of the Technische Universität", + "start": "14:00", + "end": "14:05", + "location": null, + "date": "2018-09-26", + "authors": ["Author A"], + "type": "talk", + "abstract": null + }, + { + "title": "Opening Lecture", + "subtitle": "Pushing the limits", + "start": "14:15", + "end": "15:00", + "location": null, + "date": "2018-09-26", + "authors": ["Author A"], + "type": "talk", + "abstract": null + } + ] + }, + { + "title" : "Braitenberg Award", + "subtitle" : null, + "chair" : [], + "events" : [ + { + "title": "Valentino Braitenberg Award Ceremony", + "subtitle": null, + "start": "15:00", + "end": "15:20", + "location": null, + "date": "2018-09-26", + "authors": [], + "type": "symposium", + "abstract": null + } + ] + }, + { + "title": "Poster Session I", + "subtitle": null, + "start": "16:00", + "end": "19:30", + "location": null, + "date": "2018-09-26", + "authors": [], + "type": "poster", + "abstract": null + }, + { + "title": "Coffee Break", + "subtitle": null, + "start": "10:30", + "end": "11:00", + "location": null, + "date": "2018-09-27", + "authors": [], + "type": "break", + "abstract": null + }, + { + "title" : "Session II", + "subtitle" : null, + "chair" : [], + "events" : [ + { + "title": "Some title", + "subtitle": null, + "start": "11:00", + "end": "11:45", + "location": null, + "date": "2018-09-27", + "authors": ["Author A"], + "type": "talk", + "abstract": null + }, + { + "title": "Other title", + "subtitle": null, + "start": "11:45", + "end": "12:30", + "location": null, + "date": "2018-09-27", + "authors": ["Author B"], + "type": "talk", + "abstract": null + } + ] + } +] From 23afeb6bd38f879c40d1b0d836f08ff57174ed99 Mon Sep 17 00:00:00 2001 From: "M. Sonntag" Date: Mon, 19 Oct 2020 21:28:14 +0200 Subject: [PATCH 7/9] [assets/location.js] Fix mapbox maps Closes #510 --- app/assets/javascripts/locations.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/locations.js b/app/assets/javascripts/locations.js index 2d79c9b1..a2521871 100644 --- a/app/assets/javascripts/locations.js +++ b/app/assets/javascripts/locations.js @@ -43,12 +43,16 @@ require(["lib/models", "lib/tools", "lib/leaflet/leaflet", "lib/msg", "lib/astat if (self.mapType === "locations") { $("#map-div").height(0.75 * $("#map-div").width()); var confmap = L.map("map-div"); - L.tileLayer("https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}", { - attribution: 'Map data © OpenStreetMap contributors, CC-BY-SA, Imagery © Mapbox', + + L.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token={accessToken}', { + attribution: '© Mapbox © OpenStreetMap Improve this map', + tileSize: 512, maxZoom: 20, - id: "mapbox.streets", + zoomOffset: -1, + id: 'mapbox/streets-v11', accessToken: "pk.eyJ1IjoiZ25vZGUiLCJhIjoiY2prOGFnbzY2MWlmNzN3bzRhY205N2oxZCJ9.-j7b1aziK9nUNjgHQh0ojw" }).addTo(confmap); + var texts = ""; for (var i = 0; i < geojson.length; i++) { From 59476c39bb034aa7be9f23ff6bac01c5d23eeb68 Mon Sep 17 00:00:00 2001 From: "M. Sonntag" Date: Tue, 20 Oct 2020 15:19:41 +0200 Subject: [PATCH 8/9] [js/model] Add sortid to observableabstract Closes #507 --- app/assets/javascripts/lib/models.js | 1 + 1 file changed, 1 insertion(+) diff --git a/app/assets/javascripts/lib/models.js b/app/assets/javascripts/lib/models.js index 3026d8c6..1b66491d 100644 --- a/app/assets/javascripts/lib/models.js +++ b/app/assets/javascripts/lib/models.js @@ -1093,6 +1093,7 @@ define(["lib/tools", "lib/accessors", "moment", "knockout"], function(tools, ac var self = tools.inherit(this, Model, uuid); + self.sortId = sortId || 0; self.title = ko.observable(title || null); self.topic = ko.observable(topic || null); self.text = ko.observable(text || null); From 83b005094e6079a0c45a3c0627c37fbf7cea152d Mon Sep 17 00:00:00 2001 From: "M. Sonntag" Date: Tue, 20 Oct 2020 16:19:08 +0200 Subject: [PATCH 9/9] [CHANGELOG] Update v1.3 notes --- CHANGELOG.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6903d0c5..3aa2048c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,8 +5,12 @@ until the next release. # Release v1.3 +## Database changes This release contains required database changes. After redeployment the database needs to be updated manually using script `patch/patch_v1_2_to_v1_3.sql` and the database service restarted for the changes to take effect. +## Build issues +The current project setup is still using an outdated build tool (`activator`) and is several versions behind the current state of the play framework. The default sbt CDNs for the underlying build dependencies have been updated and no longer provide the required dependencies. Therefore additional CDNs have been added to the project build to keep it in a buildable state. The docker build has been changed to a layered build to decrease build times. See issue #497 and PRs #498 and #509 for details. + ## Features - Stars will be shown in the conference abstract list, indicating favourite abstracts of a user. For details see issue #419. - The favour/disfavour abstract methods in abstract-list.js now only use javascript. @@ -14,8 +18,10 @@ This release contains required database changes. After redeployment the database - Mobile versions of Figures and conference banners are now automatically created when a figure or banner is uploaded. - Both site and conference admins are now able to upload banners via the conference administration. - The selenium framework is introduced to integrate frontend tests. -- The way DOI is represented in the abstract submission for has been updated. For details see issue #478. +- The way a DOI is represented in the abstract submission form has been updated. For details see issue #478. - A conference dependent notice can now be added via the conference administration page. The text will be displayed for the respective conference only. This change requires a database change. After deployment of this version, the database needs to be updated manually using script `patch/patch_v1_2_to_v1_3.sql`. For details see issue #470. +- A search field has been added to the abstract list of a conference. For details see PR #505. +- Print view specific stylesheets were added for useful print rendering of abstract pages. See issue #508 for details. ## Fixes - The string length of notes when changing abstract states will be limited to 255 to avoid database problems. For details see issue #448. @@ -25,6 +31,9 @@ This release contains required database changes. After redeployment the database - Added feedback on a failed email change attempt. For details see issue #467. - Added sign-up notification after new user registration. For details see issue #473. - The login status is now always properly displayed. For details see issue #468. +- Added error messages on abstract reference validation, if the input is numeric. For details see issue #499. +- The outdated mapbox.js plugin was updated to the latest version. See issue #510 for details. +- An issue was resolved where the sortid of an abstract was removed when an abstract was re-submitted. See issue #507 for details. # Release v1.2