Bug 23159

Summary: Reindent addbiblio.tt
Product: Koha Reporter: Owen Leonard <oleonard>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: enhancement    
Priority: P5 - low CC: fridolin.somers, lucas, m.de.rooy, mtompset
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
19.11.00,19.05.03
Bug Depends on:    
Bug Blocks: 22399    
Attachments: Bug 23159: Reindent addbiblio.tt
Bug 23159: (followup) re-add comments"
Bug 23159: (followup) remove added comments
Bug 23159: (followup) re-add comments"
Bug 23159: Reindent addbiblio.tt
Bug 23159: (follow-up) remove added comments
Bug 23159: (follow-up) re-add comments"
Bug 23159: Reindent addbiblio.tt
Bug 23159: (follow-up) remove added comments
Bug 23159: (follow-up) re-add comments"

Description Owen Leonard 2019-06-19 12:49:41 UTC
I would like to reindent cataloging/addbiblio.tt: Remove tabs, correct indentation, add some comments to clarify the structure.
Comment 1 Owen Leonard 2019-06-19 12:56:07 UTC
Created attachment 90786 [details] [review]
Bug 23159: Reindent addbiblio.tt

This patch corrects whitespace in the basic MARC editor template,
addbiblio.tt: Tabs converted to spaces, indentation corrected. Some
comments have been added in the markup to clarify the page structure.

To test, apply the patch and open the basic MARC editor. Confirm that
everything works correctly, including:

 - Showing/hiding subfields
 - Re-ordering subfields
 - Removing tags and subfields
 - Cloning tags and subfields
 - Plugin links

Use the "-w" flag when using diff to examine the patch. The only changes
should be places where single lines were broken up and where comments
were added.
Comment 2 Mark Tompsett 2019-06-19 14:04:56 UTC
Comment on attachment 90786 [details] [review]
Bug 23159: Reindent addbiblio.tt

Review of attachment 90786 [details] [review]:
-----------------------------------------------------------------

::: koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt
@@ +488,5 @@
> +                                [% ELSE %]
> +                                    <button type="submit" class="new" onclick="confirmnotdup('view'); return false;"><i class="fa fa-fw fa-save"></i> No, save as new record</button>
> +                                [% END %]
> +                            </form>
> +                        </div> <!-- /.dialog.alert -->

HTML comments and Template comments added make this harder to check.

@@ +489,5 @@
> +                                    <button type="submit" class="new" onclick="confirmnotdup('view'); return false;"><i class="fa fa-fw fa-save"></i> No, save as new record</button>
> +                                [% END %]
> +                            </form>
> +                        </div> <!-- /.dialog.alert -->
> +                    [% END # /IF duplicatebiblionumber %]

Your insertion of comments while clarifying, would have been better in a separate commit, so it would be easier to check.
Comment 3 Mark Tompsett 2019-06-19 14:09:38 UTC
Created attachment 90789 [details] [review]
Bug 23159: (followup) re-add comments"

This reverts the previous followup, so that all patches
can be pushed without only pushing the first one.
Comment 4 Mark Tompsett 2019-06-19 14:10:27 UTC
Created attachment 90790 [details] [review]
Bug 23159: (followup) remove added comments
Comment 5 Mark Tompsett 2019-06-19 14:10:31 UTC
Created attachment 90791 [details] [review]
Bug 23159: (followup) re-add comments"

This reverts the previous followup, so that all patches
can be pushed without only pushing the first one.
Comment 6 Mark Tompsett 2019-06-19 14:17:35 UTC
Created attachment 90792 [details] [review]
Bug 23159: Reindent addbiblio.tt

This patch corrects whitespace in the basic MARC editor template,
addbiblio.tt: Tabs converted to spaces, indentation corrected. Some
comments have been added in the markup to clarify the page structure.

To test, apply the patch and open the basic MARC editor. Confirm that
everything works correctly, including:

 - Showing/hiding subfields
 - Re-ordering subfields
 - Removing tags and subfields
 - Cloning tags and subfields
 - Plugin links

Use the "-w" flag when using diff to examine the patch. The only changes
should be places where single lines were broken up and where comments
were added.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Comment 7 Mark Tompsett 2019-06-19 14:17:38 UTC
Created attachment 90793 [details] [review]
Bug 23159: (follow-up) remove added comments

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Comment 8 Mark Tompsett 2019-06-19 14:17:41 UTC
Created attachment 90794 [details] [review]
Bug 23159: (follow-up) re-add comments"

This reverts the previous followup, so that all patches
can be pushed without only pushing the first one.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Comment 9 Mark Tompsett 2019-06-19 14:21:48 UTC
TEST PLAN (on a kohadevbox)
---------
$ git checkout master
$ git pull
$ git checkout -b bug_23159 origin/master
$ git bz apply 23159
-- do this interactively, and only apply the first 2 patches
$ tr -d '[:space:]' < koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt > after.txt
$ git checkout master
$ tr -d '[:space:]' < koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt > before.txt
$ diff before.txt after.txt
-- no differences, which means the only differences are whitespace
$ git checkout bug_23159
$ git bz apply 23159
-- apply the last patch
$ restart_all

Do the recommended testing in comment #1, though the "-w" won't help much,
hence the provision of the remove and re-add comments patches.
Comment 10 Marcel de Rooy 2019-06-21 07:28:13 UTC
Created attachment 90873 [details] [review]
Bug 23159: Reindent addbiblio.tt

This patch corrects whitespace in the basic MARC editor template,
addbiblio.tt: Tabs converted to spaces, indentation corrected. Some
comments have been added in the markup to clarify the page structure.

To test, apply the patch and open the basic MARC editor. Confirm that
everything works correctly, including:

 - Showing/hiding subfields
 - Re-ordering subfields
 - Removing tags and subfields
 - Cloning tags and subfields
 - Plugin links

Use the "-w" flag when using diff to examine the patch. The only changes
should be places where single lines were broken up and where comments
were added.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 11 Marcel de Rooy 2019-06-21 07:28:17 UTC
Created attachment 90874 [details] [review]
Bug 23159: (follow-up) remove added comments

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 12 Marcel de Rooy 2019-06-21 07:28:21 UTC
Created attachment 90875 [details] [review]
Bug 23159: (follow-up) re-add comments"

This reverts the previous followup, so that all patches
can be pushed without only pushing the first one.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 13 Marcel de Rooy 2019-06-21 07:31:23 UTC
(In reply to M. Tompsett from comment #2)
> Your insertion of comments while clarifying, would have been better in a
> separate commit, so it would be easier to check.

Agree completely. Without the two patches of Mark, this patch would probably be sitting in the queue for much longer!

@RM: Patch 2 and 3 do not need to be pushed (although they can), but prove that patch 1 can be pushed.
Comment 14 Martin Renvoize 2019-06-24 16:03:49 UTC
Nice work!

Pushed to master for 19.11.00
Comment 15 Fridolin Somers 2019-07-24 07:41:43 UTC
Enhancement not pushed to 19.05.x
Comment 16 Fridolin Somers 2019-08-06 13:38:00 UTC
I choose to push to stable branch in order to ease next patches

Pushed to 19.05.x for 19.05.03
Comment 17 Lucas Gass 2019-08-13 19:43:04 UTC
i also wanted to have this in 18.11.x but I was unable to apply cleanly or rebase. no backport