Bug 23159 - Reindent addbiblio.tt
Summary: Reindent addbiblio.tt
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Owen Leonard
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on:
Blocks: 22399
  Show dependency treegraph
 
Reported: 2019-06-19 12:49 UTC by Owen Leonard
Modified: 2020-06-04 20:32 UTC (History)
4 users (show)

See Also:
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
Circulation function:


Attachments
Bug 23159: Reindent addbiblio.tt (74.15 KB, patch)
2019-06-19 12:56 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 23159: (followup) re-add comments" (6.80 KB, patch)
2019-06-19 14:09 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 23159: (followup) remove added comments (6.70 KB, patch)
2019-06-19 14:10 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 23159: (followup) re-add comments" (6.80 KB, patch)
2019-06-19 14:10 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 23159: Reindent addbiblio.tt (74.21 KB, patch)
2019-06-19 14:17 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 23159: (follow-up) remove added comments (6.75 KB, patch)
2019-06-19 14:17 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 23159: (follow-up) re-add comments" (6.85 KB, patch)
2019-06-19 14:17 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 23159: Reindent addbiblio.tt (74.31 KB, patch)
2019-06-21 07:28 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 23159: (follow-up) remove added comments (6.84 KB, patch)
2019-06-21 07:28 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 23159: (follow-up) re-add comments" (6.94 KB, patch)
2019-06-21 07:28 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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 (ashimema) 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 (lukeg) 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