From 79d3f9cc120bf853144e714f5ce35118c7c4eebe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johnny=20Marie=CC=81thoz?= Date: Wed, 20 Nov 2024 08:53:16 +0100 Subject: [PATCH] in progress MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Johnny Mariéthoz --- .../jsonschemas/common/countries-v0.0.1.json | 6 +- .../rero_ils/detailed_view_documents.html | 3 +- .../templates/rero_ils/ill_request_form.html | 1 - .../templates/rero_ils/patron_profile.html | 7 +- rero_ils/modules/patrons/views.py | 4 +- .../users/jsonschemas/users/user-v0.0.1.json | 12 +- .../templates/rero_ils/user_password.html | 2 +- .../templates/rero_ils/user_profile.html | 2 +- .../theme/assets/scss/rero_ils/styles.scss | 283 +++++++++--------- .../theme/templates/rero_ils/frontpage.html | 13 +- rero_ils/theme/templates/rero_ils/header.html | 6 +- rero_ils/theme/templates/rero_ils/page.html | 1 + rero_ils/theme/templates/rero_ils/search.html | 6 +- .../webpack_assets/build/webpack.config.js | 2 +- 14 files changed, 182 insertions(+), 166 deletions(-) diff --git a/rero_ils/jsonschemas/common/countries-v0.0.1.json b/rero_ils/jsonschemas/common/countries-v0.0.1.json index 241eaed228..3fa93140fc 100644 --- a/rero_ils/jsonschemas/common/countries-v0.0.1.json +++ b/rero_ils/jsonschemas/common/countries-v0.0.1.json @@ -381,6 +381,10 @@ "widget": { "formlyConfig": { "props": { + "placeholder": "Select an option…", + "sort": true, + "sortOrder": "asc", + "filter": true, "itemCssClass": "col-lg-4", "options": [ { @@ -1887,4 +1891,4 @@ } } } -} \ No newline at end of file +} diff --git a/rero_ils/modules/documents/templates/rero_ils/detailed_view_documents.html b/rero_ils/modules/documents/templates/rero_ils/detailed_view_documents.html index b8c0f3b8a7..ffa734841b 100644 --- a/rero_ils/modules/documents/templates/rero_ils/detailed_view_documents.html +++ b/rero_ils/modules/documents/templates/rero_ils/detailed_view_documents.html @@ -369,7 +369,8 @@

+ class="rero-ils-ui" + /> {% endif %} {% if holdings_count > 0 %} diff --git a/rero_ils/modules/ill_requests/templates/rero_ils/ill_request_form.html b/rero_ils/modules/ill_requests/templates/rero_ils/ill_request_form.html index 40c165d49a..7247849be0 100644 --- a/rero_ils/modules/ill_requests/templates/rero_ils/ill_request_form.html +++ b/rero_ils/modules/ill_requests/templates/rero_ils/ill_request_form.html @@ -111,5 +111,4 @@

- {%- endblock body %} diff --git a/rero_ils/modules/patrons/templates/rero_ils/patron_profile.html b/rero_ils/modules/patrons/templates/rero_ils/patron_profile.html index 63f8eb3082..08d94a6a83 100644 --- a/rero_ils/modules/patrons/templates/rero_ils/patron_profile.html +++ b/rero_ils/modules/patrons/templates/rero_ils/patron_profile.html @@ -18,13 +18,8 @@ #} {% extends 'rero_ils/page.html' %} -{%- block css %} -{{ super() }} -{{ node_assets('@rero/rero-ils-ui/dist/public-patron-profile', ['styles.*css'], 'css') }} -{%- endblock css %} - {%- block body %} - + {%- endblock body %} {%- block javascript %} diff --git a/rero_ils/modules/patrons/views.py b/rero_ils/modules/patrons/views.py index 54967e5dad..1943287747 100644 --- a/rero_ils/modules/patrons/views.py +++ b/rero_ils/modules/patrons/views.py @@ -237,10 +237,10 @@ def get_messages(patron_pid): for note in patron.get("notes", []): if note.get("type") == "public_note": messages.append({"type": "warning", "content": note.get("content")}) - bootstrap_alert_mapping = {"error": "danger"} + prime_alert_mapping = {"warning": "warn"} for message in messages: msg_type = message["type"] - message["type"] = bootstrap_alert_mapping.get(msg_type, msg_type) + message["type"] = prime_alert_mapping.get(msg_type, msg_type) return jsonify(messages) diff --git a/rero_ils/modules/users/jsonschemas/users/user-v0.0.1.json b/rero_ils/modules/users/jsonschemas/users/user-v0.0.1.json index 0ede19d560..c0fd800ec7 100644 --- a/rero_ils/modules/users/jsonschemas/users/user-v0.0.1.json +++ b/rero_ils/modules/users/jsonschemas/users/user-v0.0.1.json @@ -77,6 +77,7 @@ }, "gender": { "title": "Gender", + "type": "string", "enum": [ "male", "female", @@ -86,15 +87,16 @@ "widget": { "formlyConfig": { "props": { + "placeholder": "Select an option…", "options": [ - { - "label": "male", - "value": "male" - }, { "label": "female", "value": "female" }, + { + "label": "male", + "value": "male" + }, { "label": "other", "value": "other" @@ -294,4 +296,4 @@ } } } -} \ No newline at end of file +} diff --git a/rero_ils/modules/users/templates/rero_ils/user_password.html b/rero_ils/modules/users/templates/rero_ils/user_password.html index f676aafaa3..1b4d786a46 100644 --- a/rero_ils/modules/users/templates/rero_ils/user_password.html +++ b/rero_ils/modules/users/templates/rero_ils/user_password.html @@ -20,7 +20,7 @@ {%- block body %}

{{ _('Change password') }}

- + {%- endblock body %} {%- block javascript %} diff --git a/rero_ils/modules/users/templates/rero_ils/user_profile.html b/rero_ils/modules/users/templates/rero_ils/user_profile.html index 033b515d7a..1dd1ff15e2 100644 --- a/rero_ils/modules/users/templates/rero_ils/user_profile.html +++ b/rero_ils/modules/users/templates/rero_ils/user_profile.html @@ -20,7 +20,7 @@ {%- block body %}

{{ _('Profile') }}

- + {%- endblock body %} {%- block javascript %} diff --git a/rero_ils/theme/assets/scss/rero_ils/styles.scss b/rero_ils/theme/assets/scss/rero_ils/styles.scss index 0aa8b4ceda..0c9a8ad429 100644 --- a/rero_ils/theme/assets/scss/rero_ils/styles.scss +++ b/rero_ils/theme/assets/scss/rero_ils/styles.scss @@ -17,78 +17,88 @@ along with this program. If not, see . */ +:root { + font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, + "Helvetica Neue", Helvetica, Arial, sans-serif; + --font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", + Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 1rem; +} -@import "variables"; - -// Setting the path to fonts files. $fa-font-path: "~font-awesome/fonts"; $icon-font-path: "~bootstrap-sass/assets/fonts/bootstrap/"; -@import '~bootstrap/scss/bootstrap'; @import "~font-awesome/scss/font-awesome"; -// general styles -@import "page"; -@import "header"; -@import "footer"; -@import "search"; -@import "frontpage"; -@import "thumbnail"; +@layer bootstrap, rero-ils-ui, primeng; -// modules -@import "contributions/detailed"; -@import "patrons/profile"; -@import "documents/detailed"; +@layer bootstrap { + @import "variables"; -// bootstrap extension + // Setting the path to fonts files. + @import "~bootstrap/scss/bootstrap"; -.mw-25 { - max-width: 25%; -} + // general styles + @import "page"; + @import "header"; + @import "footer"; + @import "search"; + @import "frontpage"; + @import "thumbnail"; -.mw-50 { - max-width: 50%; -} + // modules + @import "contributions/detailed"; + @import "patrons/profile"; + @import "documents/detailed"; -.mw-75 { - max-width: 75%; -} + // bootstrap extension -// cover -.rero-ils-cover-logo { - width: 10em; -} + .mw-25 { + max-width: 25%; + } -// CSS code to allow `ng-csp="no-inline-css"` -[ng\:cloak], -[ng-cloak], -[data-ng-cloak], -[x-ng-cloak], -.ng-cloak, -.x-ng-cloak, -.ng-hide:not(.ng-hide-animate) { - display: none !important; -} + .mw-50 { + max-width: 50%; + } -ng\:form { - display: block; -} + .mw-75 { + max-width: 75%; + } -.ng-animate-shim { - visibility:hidden; -} + // cover + .rero-ils-cover-logo { + width: 10em; + } -.ng-anchor { - position:absolute; -} + // CSS code to allow `ng-csp="no-inline-css"` + [ng\:cloak], + [ng-cloak], + [data-ng-cloak], + [x-ng-cloak], + .ng-cloak, + .x-ng-cloak, + .ng-hide:not(.ng-hide-animate) { + display: none !important; + } + ng\:form { + display: block; + } -// TODO: to correct a display bug with webkit browsers + .ng-animate-shim { + visibility: hidden; + } -html [type=button] { - -webkit-appearance: none; -} + .ng-anchor { + position: absolute; + } -/* + // TODO: to correct a display bug with webkit browsers + + html [type="button"] { + -webkit-appearance: none; + } + + /* ********************************* GLOBAL @@ -96,40 +106,40 @@ html [type=button] { ******************************** */ -.rero-ils-external-link:after { - font-family: 'FontAwesome'; - font-size: $font-size-very-small; - vertical-align: top; - content: " \f08e"; -} - -.required::after { - content: " *"; - color: $red; - font-weight: bold; -} - -.no-data { - color: $secondary; -} - -button:disabled { - pointer-events: none; -} - -div.tooltip div.tooltip-inner{ - text-align: left; - max-width: 400px; -} - -.rero-ils-external-link:after { - font-family: 'FontAwesome'; - font-size: $font-size-very-small; - vertical-align: top; - content: " \f08e"; -} - -/* + .rero-ils-external-link:after { + font-family: "FontAwesome"; + font-size: $font-size-very-small; + vertical-align: top; + content: " \f08e"; + } + + .required::after { + content: " *"; + color: $red; + font-weight: bold; + } + + .no-data { + color: $secondary; + } + + button:disabled { + pointer-events: none; + } + + div.tooltip div.tooltip-inner { + text-align: left; + max-width: 400px; + } + + .rero-ils-external-link:after { + font-family: "FontAwesome"; + font-size: $font-size-very-small; + vertical-align: top; + content: " \f08e"; + } + + /* ********************************* TOAST @@ -137,59 +147,60 @@ div.tooltip div.tooltip-inner{ ******************************** */ -.toast { - min-width: 350px; -} - -.toast-container { - position: fixed; - z-index: 9999999; - top: 0; - right: 0; -} - -.toast-top-right { - top: 12px; - right: 24px; -} - -.toast-success .toast-body { - background-color: $green; - color: white; -} - -.toast-warning .toast-body { - background-color: $orange; - color: white; -} - -.toast-error .toast-body, -.toast-danger .toast-body { - background-color: $red; - color: white; -} - - -/* + .toast { + min-width: 350px; + } + + .toast-container { + position: fixed; + z-index: 9999999; + top: 0; + right: 0; + } + + .toast-top-right { + top: 12px; + right: 24px; + } + + .toast-success .toast-body { + background-color: $green; + color: white; + } + + .toast-warning .toast-body { + background-color: $orange; + color: white; + } + + .toast-error .toast-body, + .toast-danger .toast-body { + background-color: $red; + color: white; + } + + /* ********************************* BUTTON ******************************** */ -.btn-mini { - padding: .25rem .35rem .25rem .45rem; - font-size: .875rem; - line-height: 1.3; - border-radius: .2rem; -} - -.btn:focus, .btn:active:focus, .btn.active:focus { - outline:none; - box-shadow:none; -} - - -#password-show-hide-icon:hover { - cursor: pointer; + .btn-mini { + padding: 0.25rem 0.35rem 0.25rem 0.45rem; + font-size: 0.875rem; + line-height: 1.3; + border-radius: 0.2rem; + } + + .btn:focus, + .btn:active:focus, + .btn.active:focus { + outline: none; + box-shadow: none; + } + + #password-show-hide-icon:hover { + cursor: pointer; + } } diff --git a/rero_ils/theme/templates/rero_ils/frontpage.html b/rero_ils/theme/templates/rero_ils/frontpage.html index 4bed45dc7b..431eaa52e8 100644 --- a/rero_ils/theme/templates/rero_ils/frontpage.html +++ b/rero_ils/theme/templates/rero_ils/frontpage.html @@ -36,13 +36,15 @@