From 7f4deee0568ff2d9e1172f1f61b53f59c8e491bf Mon Sep 17 00:00:00 2001 From: Solene Desvaux Date: Tue, 28 Jun 2022 15:08:02 +0200 Subject: [PATCH] Bug 30952: update search-engine --- .../intranet-tmpl/prog/css/addbiblio.css | 30 +- .../prog/css/src/staff-global.scss | 100 ++- .../prog/en/includes/budgets-admin-search.inc | 7 +- .../prog/en/includes/cat-search.inc | 60 +- .../prog/en/includes/cities-admin-search.inc | 2 +- .../en/includes/currencies-admin-search.inc | 2 +- .../prog/en/includes/patron_messages.inc | 2 +- .../prog/en/includes/z3950-admin-search.inc | 2 +- .../prog/en/modules/admin/aqbudgetperiods.tt | 108 ++- .../prog/en/modules/admin/didyoumean.tt | 106 +-- .../searchengine/elasticsearch/mappings.tt | 646 ++++++++-------- .../en/modules/authorities/authorities.tt | 726 ++++++++---------- .../prog/en/modules/catalogue/itemsearch.tt | 14 +- .../prog/en/modules/cataloguing/addbiblio.tt | 132 ++-- .../prog/en/modules/circ/circulation.tt | 2 +- .../prog/en/modules/circ/returns.tt | 2 +- .../prog/en/modules/intranet-main.tt | 148 ++-- .../prog/en/modules/labels/barcode-print.tt | 4 +- .../en/modules/labels/label-edit-batch.tt | 26 +- .../en/modules/labels/label-edit-layout.tt | 29 +- .../en/modules/labels/label-edit-profile.tt | 5 +- .../en/modules/labels/label-edit-range.tt | 5 +- .../en/modules/labels/label-edit-template.tt | 2 +- .../prog/en/modules/labels/label-manage.tt | 2 + .../prog/en/modules/labels/search.tt | 2 +- .../prog/en/modules/members/member.tt | 2 +- .../modules/reports/guided_reports_start.tt | 8 +- .../prog/en/modules/serials/claims.tt | 6 +- .../en/modules/serials/subscription-add.tt | 36 +- .../prog/en/modules/suggestion/suggestion.tt | 9 +- .../prog/js/elasticsearch-mappings.js | 44 +- 31 files changed, 1115 insertions(+), 1154 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/css/addbiblio.css b/koha-tmpl/intranet-tmpl/prog/css/addbiblio.css index c84f399ab7..4c4ef32b66 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/addbiblio.css +++ b/koha-tmpl/intranet-tmpl/prog/css/addbiblio.css @@ -6,8 +6,7 @@ div#toolbar { border: 0; } -#addbibliotabs .ui-tabs-nav, -#authoritytabs .ui-tabs-nav { +#addbibliotabs .ui-tabs-nav { display: none; } @@ -223,10 +222,6 @@ a.tagnum { width: 31em; } -#cat_addbiblio .field_marceditor .flatpickr_wrapper { - display: none; -} - .mandatory_marker { color: red; } @@ -277,6 +272,7 @@ tbody tr.active td { .toolbar-tabs-container { margin: 3em -5px -5px -5px; + width: -webkit-fill-available; } .toolbar-tabs { @@ -299,30 +295,34 @@ tbody tr.active td { } .toolbar-tabs li a { - border: 1px solid #EDF4F6; + border: 1px solid #71B443; border-left: 0; - border-right: 1px solid #EDF4F6; - border-bottom-right-radius: 5px; - border-bottom-left-radius: 5px; + background-color: #71B443; + border-right: 1px solid #71B443; + border-radius: 5px; + margin: 5px; + /* border-bottom-left-radius: 5px; */ display: block; + color: #fff; font-weight: bold; padding: .3em 1.5em; width: 100%; } .toolbar-tabs li.selected a { - background-color: #EDF4F6; - border-right: 1px solid #C3D6DB; - border-bottom: 1px solid #C3D6DB; + background-color: #418940; + border-right: 1px solid #418940; + border-bottom: 1px solid #418940; font-weight: bold; } .toolbar-tabs li.selected a:hover { - background-color: #EDF4F6; + background-color: #418940; } .toolbar-tabs li a:hover { - background-color: #F4F8F9; + background-color: #418940; + text-decoration: none; } .toolbar-tabs li:first-child a { diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss index 35f922be6f..f9d7162869 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss @@ -3,7 +3,7 @@ @import "flatpickr"; ::selection { - background: #538200; + background: #418940; color: #fff; } @@ -129,7 +129,7 @@ a { &.close { &:hover { - //color: #538200; + //color: #418940; } } @@ -229,10 +229,6 @@ a { } } -#addauth{ - color: #fff; - background-color: #71B443; -} #resetZ3950Search{ font-size: 110%; @@ -750,7 +746,7 @@ cite { input, textarea { &:focus { - border-color: #538200; + border-color: #418940; border-radius: 4px; } } @@ -884,6 +880,10 @@ label, width: 25%; } +.col-sm-6 { + width: 100%; +} + #area-news{ background-color: #FFF; color: #696969; @@ -1983,7 +1983,7 @@ div { &:hover, &:active{ font-weight: bold; - color: #418910; + color: #418940; } } } @@ -2127,7 +2127,7 @@ div { #reserves, #checkouts { - //border-top: 3px solid #418910; + //border-top: 3px solid #418940; padding: 1em; } @@ -2495,8 +2495,20 @@ dd { .dropdown-menu { position: absolute; top: 50px; + background-color: #F3F4F4; li { list-style-type: none; + + a{ + color: #000; + + &:hover{ + background-color: #F3F4F4; + color: #000; + text-decoration: underline; + background-image: none; + } + } } } @@ -2654,6 +2666,7 @@ i { border-radius: 3px; box-shadow: 1px 1px 2px 0 rgba(102, 102, 102, .5); margin: .5em; + width: fit-content; padding: .5em; } @@ -2827,7 +2840,7 @@ i { //border: 1px solid #BCBCBC; color: #000000; text-align: center; - background-color: #fff; + background-color: transparent; // box-shadow: 8px 8px 12px rgba(170, 170, 170, 0.356); @@ -2963,7 +2976,7 @@ i { &:hover { background-color: #FFFFFF; - color: #538200; + color: #418940; } } } @@ -3096,6 +3109,8 @@ li { #searchresults { background-color: #fff; margin-top: 20px; + min-width: 100%; + width: fit-content; // overflow: auto; box-shadow: 8px 8px 12px rgba(170, 170, 170, 0.356); padding: 20px; @@ -3359,7 +3374,7 @@ td { } } -#lientype, #add, #merge-patrons, #btn_batchremove, #doedit, #show_invoice_adjustment, #cancel_invoice_adjustment, #show_active_vendors, #add-contact, #multi_hold_submit, #show-picture-upload, #edit_suggester, #expand_all, #collapse_all, #hide_inactive, #show_inactive, #addnewmessageLabel, #results_batch_ops, #highlight_toggle_off, #selectall, #clearall, #highlight_toggle_on, #addColumn, #remove_from_cart, #place_hold, #add_to_list, #batch_modify, #batch_delete, #delColumn, #edit_manager, #addauth, #unset, #UncheckAll, #check-all, #results_batch_ops #uncheck-all, #frameworkactions, #authtypeactions, #modify_sru_fields, #cartsubmit, #z3950submit, #add_manual_restriction{ +#lientype, #add, #merge-patrons, #btn_batchremove, #doedit, #show_invoice_adjustment, #cancel_invoice_adjustment, #show_active_vendors, #add-contact, #multi_hold_submit, #show-picture-upload, #edit_suggester, #expand_all, #collapse_all, #hide_inactive, #show_inactive, #addnewmessageLabel, #results_batch_ops, #highlight_toggle_off, #selectall, #clearall, #highlight_toggle_on, #addColumn, #remove_from_cart, #place_hold, #add_to_list, #batch_modify, #batch_delete, #delColumn, #edit_manager, #unset, #UncheckAll, #check-all, #results_batch_ops #uncheck-all, #frameworkactions, #authtypeactions, #modify_sru_fields, #cartsubmit, #add_manual_restriction{ color: #71B443; padding: .3em; border: none; @@ -3824,7 +3839,7 @@ td { .ui-widget-content { background: #FFFFFF none; border-radius: 4px; - border: 3px solid #538200; + border: 3px solid #418940; color: #222222; } @@ -3950,7 +3965,7 @@ td { .ui-tabs-panel { background: #FFF none; border-radius: 4px; - border: 3px solid #538200; + border: 3px solid #418940; fieldset{ box-shadow: none; @@ -3965,7 +3980,7 @@ td { border-radius: 4px 4px 0 0; &.ui-tabs-active, &.ui-state-hover { - background-color: #418910; + background-color: #418940; border-radius: 4px 4px 0 0; border: none; border-bottom-width: 0; @@ -3999,11 +4014,11 @@ td { .ui-state-hover { a { - color: #538200; + color: #418940; &:link, &:visited { - color: #538200; + color: #418940; } } } @@ -4133,7 +4148,7 @@ td { font-weight: normal; padding-bottom: 1px; - background-color: #418910; + background-color: #418940; border: none; border-bottom-width: 0; //padding-bottom: 0; @@ -4159,7 +4174,7 @@ td { //background-color: #EDF4F5; border-top-left-radius: 4px; border-top-right-radius: 4px; - //color: #538200; + //color: #418940; } } } @@ -4167,7 +4182,7 @@ td { .tabs-container { background: none repeat scroll 0 0 transparent; - border: 3px solid #418910; + border: 3px solid #418940; border-radius: 4px; color: #222222; display: block; @@ -4180,7 +4195,7 @@ td { .ui-tabs-panel { background: #FFF none; border-radius: 4px; - border: 3px solid #538200; + border: 3px solid #418940; fieldset{ box-shadow: none; @@ -4839,10 +4854,15 @@ nav { &:hover, &:active{ background-color: #352C2E; - text-decoration: underline; + border-bottom: 1px 5px #fff; + color: #fff; } } } + + ul{ + background-color: #352C2E; + } } @@ -4864,23 +4884,20 @@ nav { } .loggedinusername{ - font-size: 0.85em; - font-weight: normal; - //position: absolute; - //right: 0px; - // white-space: pre; - //top: -10px; - //height: 20px; - //line-height: normal; - //padding-top: 10px; - //padding-right: 10px; - //width: 100%; - position: relative; - left: 135px; + /* font-size: 0.85em; */ + /* font-weight: normal; */ + /* position: relative; */ + /* left: 135px; */ bottom: 5px; + /* height: 20px; */ + /* width: 100%; */ + text-decoration: none; + position: relative; + float: right; + right: 0px; height: 20px; + /* top: 10px; */ width: 100%; - text-decoration: none; } .logged-in-branch-name{ @@ -4981,7 +4998,8 @@ button, white-space: nowrap; vertical-align: middle; touch-action: manipulation; - width: 90px; + min-width: 90px; + width: fit-content; cursor: pointer; background-image: none; padding: 6px 12px; @@ -5435,7 +5453,7 @@ code { /* background-color: #FFF; border: 1px solid #bfd9b9; border-top-width: 0;*/ - border: 3px solid #538200; + border: 3px solid #418940; border-radius: 4px; overflow: auto; //border-top-width: 0; @@ -5454,9 +5472,9 @@ code { padding: .5em 1em; &:hover { - background-color: #538200; + background-color: #418940; border-radius: 4px 4px 0 0; - border: 1px solid #538200; + border: 1px solid #418940; text-decoration: none; color: #fff; } @@ -5466,7 +5484,7 @@ code { a, a:hover, a:focus { - background-color: #538200; + background-color: #418940; border-radius: 4px 4px 0 0; color: #fff; //border: none; diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/budgets-admin-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/budgets-admin-search.inc index db6772d99c..025fbcfefb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/budgets-admin-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/budgets-admin-search.inc @@ -6,7 +6,7 @@
- [% FOREACH branchloo IN Branches.all( selected => selected_branchcode ) %] [% IF branchloo.selected %] @@ -32,7 +32,7 @@ Search funds Check out - + Search catalog @@ -71,7 +71,6 @@ } for (var i = inputssearch.length - 1; i >= 0; i--) { - inputssearch[i].classList.remove('focus'); if (elem == iconssearch[i]){ inputssearch[i].classList.add('focus'); @@ -110,4 +109,6 @@ + + diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-search.inc index c8fd3da791..2f221dbfe0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-search.inc @@ -6,14 +6,14 @@ [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %] @@ -36,10 +36,10 @@ + diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cities-admin-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cities-admin-search.inc index 30da7f777f..a315a1679d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/cities-admin-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cities-admin-search.inc @@ -2,7 +2,7 @@ diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt index 1fda69af78..226b5800d9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt @@ -21,21 +21,7 @@ }); var Sticky; $(document).ready(function() { - var tabs = $('#authoritytabs').tabs({ - activate: function(e, ui) { - $("#"+ $(ui.newPanel).attr("id") + " .input_marceditor:visible:eq(0)").focus(); - } - }); - - /* On page load, check for location.hash in the page URL */ - var hash = location.hash; - var hashPieces = hash.split('?'); - if( hashPieces[0] !== "" ){ - var activeTab = $("[href='" + hashPieces[0] + "']"); - selectTab(activeTab); - window.scrollTo( 0, 0 ); - } - + var tabs = $('#authoritytabs').tabs(); $( "ul.sortable_field", tabs ).sortable(); $( "ul.sortable_subfield", tabs ).sortable(); Sticky = $("#toolbar"); @@ -47,7 +33,7 @@ if(Check()){ $("#f").submit(); } - }); + }); $("#z3950submit").click(function(){ var strQuery = GetZ3950Terms(); var index = "&index=[% index | html %]"; @@ -56,218 +42,174 @@ } return false; }); - $(".toolbar-tabs a").on("click",function(e){ - e.preventDefault(); - selectTab( $(this ) ); - }); - - $(".tag_anchor").on("click", function(e){ - e.preventDefault(); - $(".tag_anchor").removeClass("selected"); - $(this).addClass("selected"); - var link = this.href; - var linkid = link.substring( link.indexOf("#") + 1 ); - window.scrollTo( 0, getScrollto( linkid, "toolbar" ) ); - }); - - $("body").on("click", ".linkfield", function(e){ - e.preventDefault(); - var tab = $(this).data("tab"); - var field = $(this).data("field"); - var tablink = $("a[data-tabid='" + tab + "']" ); - selectTab( tablink ); - window.scrollTo( 0, getScrollto( field, "toolbar" ) ); - }); }); - function selectTab( tablink ){ - $(".toolbar-tabs li").removeClass("selected"); - tablink.parent().addClass("selected"); - var tabid = tablink.data("tabid"); - $('#authoritytabs').selectTabByID("#tab" + tabid + "XX"); - $(".tag_anchors").removeClass("tab_selected").hide(); - $(".tag_anchors_" + tabid ).addClass("tab_selected").show(); - } - - /** - * Returns a roughly ideal position to scroll an element into view - * @param {string} target - The HTML id of the element to scroll into view - * @param {string} elemid - The HTML id of the element which might obscure - * the view of the target element e.g. a floating toolbar - * @return {number} - The y-coordinate to pass to window.scrollTo() - */ - function getScrollto( target, elemid ){ - var dest = $("#" + target ); - var yoffset = dest.offset(); - - if( elemid != "" ){ - var element = $("#" + elemid ); - var elem_height = element.outerHeight(); - } else { - elem_height = 0; - } - return yoffset.top - elem_height - 20; - } - - - /** - * check if z3950 mandatories are set or not - */ - function GetZ3950Terms(){ - var strQuery="&authtypecode="+document.forms['f'].authtypecode.value; - var mandatories = new Array(); - var mandatories_label = new Array(); - [% FOREACH BIG_LOO IN BIG_LOOP %][% FOREACH innerloo IN BIG_LOO.innerloop %][% FOREACH subfield_loo IN innerloo.subfield_loop %][% IF ( subfield_loo.z3950_mandatory ) %]mandatories.push("[% subfield_loo.id | html %]"); - mandatories_label.push("[% subfield_loo.z3950_mandatory | html %]");[% END %][% END %][% END %][% END %] - - for(var i=0,len=mandatories.length; i= 10){ - elem = document.getElementById(divid); - eleminputs = elem.getElementsByTagName('input'); - - for(var j=0,len2=eleminputs.length; j= 10){ + elem = document.getElementById(divid); + eleminputs = elem.getElementsByTagName('input'); + + for(var j=0,len2=eleminputs.length; j [% Asset.css("css/addbiblio.css") | $raw %] -
-
Loading, please wait...
-
+
+
Loading, please wait...
+
+ +[% INCLUDE 'header.inc' %] - [% INCLUDE 'header.inc' %] +