Created attachment 25770 [details] [review] Make MARC Details tab HTML consistent In Catalog > MARC Details, the HTML in the different tabs is slightly inconsistent and doesn't differentiate different elements, making CSS styling complicated or impossible: * tab 0 has <p class="subfield_line"> whereas all the other tabs have just <p> * all other tabs wrap the subfield character in <b> tags, except for tab 0 * the MARC tag title is a single div with the tag, the indicators and the field description. Attached patch folds all the tab outputs into a single TT BLOCK, which is then reused. It also marks the separate parts of the tag title in their own spans. The output should be nearly identical to previous behaviour, minus a dash from the tag title descriptions - it was used to separate the tag from the description. The description can now be styled separately from the tag itself, so the dash can be added with CSS, if necessary. To test: 1) Look at some MARC details in the staff client, noting the contents of each tab. 2) Install patch 3) Compare the MARC details output to what was shown in step 1. Should be the same, minus a dash in each of the tag title descriptions.
Created attachment 26462 [details] [review] [SIGNED OFF] Bug 11885 - Inconsistent HTML in MARC Details In Catalog > MARC Details, the HTML in the different tabs is slightly inconsistent and doesn't differentiate different elements, making CSS styling complicated or impossible: * tab 0 has <p class="subfield_line"> whereas all the other tabs have just <p> * all other tabs wrap the subfield character in <b> tags, except for tab 0 * the MARC tag title is a single div with the tag, the indicators and the field description. Attached patch folds all the tab outputs into a single TT BLOCK, which is then reused. It also marks the separate parts of the tag title in their own spans. The output should be nearly identical to previous behaviour, minus a dash from the tag title descriptions - it was used to separate the tag from the description. The description can now be styled separately from the tag itself, so the dash can be added with CSS, if necessary. Revised test: 1) Find a biblio 2) Edit the record so that there is something in every tab (0-9). 3) Save and then click 'MARC' in the left pane to view the MARC details. 4) Note the contents of each tab. 5) Apply patch 6) Compare the MARC details output to what was noted. Should be the same, minus a dash in each of the tag title descriptions. http://bugs.koha-community.org/show_bug.cgi?id=11885 NOTE: It's so elegant! Signed-off-by: Pasi Kallinen <pasi.kallinen@pttk.fi> Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
QA comment: I didn't find any regression (tag missing, etc.) but 3 smalls things differ from master: 1/ subtags was bold 2/ 1 dash existed between tag and tag name 3/ A space has been added ("606 #1 - Sujet nom commun" becomes "606 # 1 Sujet nom commun", "101 ## - Langue" becomes "101 # # Langue") I am going to provide screenshots. Marked as Failed QA.
Created attachment 26468 [details] with patch
Created attachment 26469 [details] without patch
(In reply to Jonathan Druart from comment #2) > QA comment: > > I didn't find any regression (tag missing, etc.) but 3 smalls things differ > from master: > 1/ subtags was bold > 2/ 1 dash existed between tag and tag name > 3/ A space has been added ("606 #1 - Sujet nom commun" becomes "606 # 1 > Sujet nom commun", "101 ## - Langue" becomes "101 # # Langue") > > I am going to provide screenshots. > > Marked as Failed QA. If you really want the exact same behaviour as before, add the following CSS to your IntranetUserCSS: .tag_title .tag_desc:before { content: " - "; } .tag_title .tag_ind2 { margin-left:-4px; } .subfield-label { font-weight: bold; } div[id=tab0XX] .subfield-label, .subfield-label .desc { font-weight: normal; }
(In reply to paxed from comment #5) > If you really want the exact same behaviour as before, add the following CSS > to your IntranetUserCSS: I don't think it is the good answer :) Was it expected? If yes, why?
Created attachment 26773 [details] [review] Bug 11885 - Follow-up to address issues raised Jonathan Druart raised the following three issues: 1/ subtags was bold before patch 2/ 1 dash existed between tag and tag name 3/ A space has been added ("606 #1 - Sujet nom commun" becomes "606 # 1 Sujet nom commun", "101 ## - Langue" becomes "101 # # Langue") This patch addresses them in the following way: 1/ You will note that @ was not bold on the 0 tab. Every other tab were bold. By making the similar template into a procedure based on the 0XX tab, bolding was lost. This patch bolds all subtags including the @, so that the visible change is minimized. 2/ The dash was programmatically added in at the code stage previously. This bug fix splits the the single concatenation mess into parts which can be styled. This puts the dash back into the template. However, it should be noted that the spacing for the 0 tab's tag and tag description will have an extra space after the hypen that was lacking before. 3/ <span>...</span><span>...</span> is different than <span>...</span> <span>...</span> The later puts that extra space. This patch fixes that. See comment 1 for the test plan.
(In reply to M. Tompsett from comment #7) > Created attachment 26773 [details] [review] [review] > Bug 11885 - Follow-up to address issues raised > > This patch addresses them in the following way: > 1/ You will note that @ was not bold on the 0 tab. > Every other tab were bold. By making the similar template > into a procedure based on the 0XX tab, bolding was lost. > This patch bolds all subtags including the @, so that > the visible change is minimized. Why hard-coded <b> tags? Isn't there some good reason to separate presentation and content? > 2/ The dash was programmatically added in at the code stage > previously. This bug fix splits the the single concatenation > mess into parts which can be styled. This puts the dash back > into the template. However, it should be noted that the > spacing for the 0 tab's tag and tag description will have an > extra space after the hypen that was lacking before. Wrap the dash and the spaces before the description in <span class="dashwrapper"> or something, so it'll be easier to hide with css. > 3/ <span>...</span><span>...</span> is different than > <span>...</span> > <span>...</span> > The later puts that extra space. This patch fixes that. This one is good.
(In reply to paxed from comment #8) > (In reply to M. Tompsett from comment #7) > > Created attachment 26773 [details] [review] [review] [review] > > Bug 11885 - Follow-up to address issues raised > > > > This patch addresses them in the following way: > > 1/ ... > > Why hard-coded <b> tags? Isn't there some good reason to separate > presentation and content? Because that is the way it was done before. I'm not saying it was the best way to do it, but it reduces visible differences. > > 2/ ... > > Wrap the dash and the spaces before the description in <span > class="dashwrapper"> or something, so it'll be easier to hide with css. Sure, why not.
Created attachment 26853 [details] [review] Bug 11885 - Follow-up to address issues raised Jonathan Druart raised the following three issues: 1/ subtags was bold before patch 2/ 1 dash existed between tag and tag name 3/ A space has been added ("606 #1 - Sujet nom commun" becomes "606 # 1 Sujet nom commun", "101 ## - Langue" becomes "101 # # Langue") This patch addresses them in the following way: 1/ You will note that @ was not bold on the 0 tab. Every other tab were bold. By making the similar template into a procedure based on the 0XX tab, bolding was lost. This patch bolds all subtags including the @, so that the visible change is minimized. 2/ The dash was programmatically added in at the code stage previously. This bug fix splits the the single concatenation mess into parts which can be styled. This puts the dash back into the template. However, it should be noted that the spacing for the 0 tab's tag and tag description will have an extra space after the hypen that was lacking before. 3/ <span>...</span><span>...</span> is different than <span>...</span> <span>...</span> The later puts that extra space. This patch fixes that. See comment 1 for the test plan.
Created attachment 26917 [details] [review] [SIGNED-OFF] Bug 11885 - Inconsistent HTML in MARC Details In Catalog > MARC Details, the HTML in the different tabs is slightly inconsistent and doesn't differentiate different elements, making CSS styling complicated or impossible: * tab 0 has <p class="subfield_line"> whereas all the other tabs have just <p> * all other tabs wrap the subfield character in <b> tags, except for tab 0 * the MARC tag title is a single div with the tag, the indicators and the field description. Attached patch folds all the tab outputs into a single TT BLOCK, which is then reused. It also marks the separate parts of the tag title in their own spans. The output should be nearly identical to previous behaviour, minus a dash from the tag title descriptions - it was used to separate the tag from the description. The description can now be styled separately from the tag itself, so the dash can be added with CSS, if necessary. Revised test: 1) Find a biblio 2) Edit the record so that there is something in every tab (0-9). 3) Save and then click 'MARC' in the left pane to view the MARC details. 4) Note the contents of each tab. 5) Apply patch 6) Compare the MARC details output to what was noted. Should be the same, minus a dash in each of the tag title descriptions. http://bugs.koha-community.org/show_bug.cgi?id=11885 Signed-off-by: Pasi Kallinen <pasi.kallinen@pttk.fi> Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Created attachment 26918 [details] [review] [SIGNED-OFF] Bug 11885 - Follow-up to address issues raised Jonathan Druart raised the following three issues: 1/ subtags was bold before patch 2/ 1 dash existed between tag and tag name 3/ A space has been added ("606 #1 - Sujet nom commun" becomes "606 # 1 Sujet nom commun", "101 ## - Langue" becomes "101 # # Langue") This patch addresses them in the following way: 1/ You will note that @ was not bold on the 0 tab. Every other tab were bold. By making the similar template into a procedure based on the 0XX tab, bolding was lost. This patch bolds all subtags including the @, so that the visible change is minimized. 2/ The dash was programmatically added in at the code stage previously. This bug fix splits the the single concatenation mess into parts which can be styled. This puts the dash back into the template. However, it should be noted that the spacing for the 0 tab's tag and tag description will have an extra space after the hypen that was lacking before. 3/ <span>...</span><span>...</span> is different than <span>...</span> <span>...</span> The later puts that extra space. This patch fixes that. See comment 1 for the test plan. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Work as described. Small koha-qa errors fixed in followup
Created attachment 26919 [details] [review] Bug 11885 - followup to remove tabs Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Created attachment 26992 [details] [review] Bug 11885 - Inconsistent HTML in MARC Details In Catalog > MARC Details, the HTML in the different tabs is slightly inconsistent and doesn't differentiate different elements, making CSS styling complicated or impossible: * tab 0 has <p class="subfield_line"> whereas all the other tabs have just <p> * all other tabs wrap the subfield character in <b> tags, except for tab 0 * the MARC tag title is a single div with the tag, the indicators and the field description. Attached patch folds all the tab outputs into a single TT BLOCK, which is then reused. It also marks the separate parts of the tag title in their own spans. The output should be nearly identical to previous behaviour, minus a dash from the tag title descriptions - it was used to separate the tag from the description. The description can now be styled separately from the tag itself, so the dash can be added with CSS, if necessary. Revised test: 1) Find a biblio 2) Edit the record so that there is something in every tab (0-9). 3) Save and then click 'MARC' in the left pane to view the MARC details. 4) Note the contents of each tab. 5) Apply patch 6) Compare the MARC details output to what was noted. Should be the same, minus a dash in each of the tag title descriptions. http://bugs.koha-community.org/show_bug.cgi?id=11885 Signed-off-by: Pasi Kallinen <pasi.kallinen@pttk.fi> Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Created attachment 26993 [details] [review] Bug 11885 - Follow-up to address issues raised Jonathan Druart raised the following three issues: 1/ subtags was bold before patch 2/ 1 dash existed between tag and tag name 3/ A space has been added ("606 #1 - Sujet nom commun" becomes "606 # 1 Sujet nom commun", "101 ## - Langue" becomes "101 # # Langue") This patch addresses them in the following way: 1/ You will note that @ was not bold on the 0 tab. Every other tab were bold. By making the similar template into a procedure based on the 0XX tab, bolding was lost. This patch bolds all subtags including the @, so that the visible change is minimized. 2/ The dash was programmatically added in at the code stage previously. This bug fix splits the the single concatenation mess into parts which can be styled. This puts the dash back into the template. However, it should be noted that the spacing for the 0 tab's tag and tag description will have an extra space after the hypen that was lacking before. 3/ <span>...</span><span>...</span> is different than <span>...</span> <span>...</span> The later puts that extra space. This patch fixes that. See comment 1 for the test plan. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Work as described. Small koha-qa errors fixed in followup Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Created attachment 26994 [details] [review] Bug 11885 - followup to remove tabs Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Created attachment 26995 [details] [review] Bug 11885: Add a css class to set subfield code bold Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
All looks good, no regression found. Marked as Passed QA.
Pushed to master. Thanks, Pasi!
Pushed to 3.14.x, will be in 3.14.10 (code real improvement, nice job)
Picked for 3.12.15