Bug 29825 - Preview of authority record on edit mode as MARC formatted view
Summary: Preview of authority record on edit mode as MARC formatted view
Status: Passed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: MARC Authority data support (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: George Veranis
QA Contact: Kyle M Hall
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-07 23:42 UTC by George Veranis
Modified: 2024-03-29 12:55 UTC (History)
6 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:


Attachments
Bug 29825: Preview of authority record on edit mode as MARC formatted view (4.31 KB, patch)
2022-09-01 20:45 UTC, George Veranis
Details | Diff | Splinter Review
Bug 29825: Preview of authority record on edit mode as MARC formatted view (1.96 KB, patch)
2022-09-02 12:57 UTC, George Veranis
Details | Diff | Splinter Review
Bug 29825: Preview of authority record on edit mode as MARC formatted view (1.96 KB, patch)
2022-09-02 19:48 UTC, George Veranis
Details | Diff | Splinter Review
Bug 29825: Preview of authority record on edit mode as MARC formatted view (5.23 KB, patch)
2022-09-02 19:49 UTC, George Veranis
Details | Diff | Splinter Review
Bug 29825: Preview of authority record on edit mode as MARC formatted view (1.96 KB, patch)
2022-09-02 20:08 UTC, George Veranis
Details | Diff | Splinter Review
Bug 29825: Preview of authority record on edit mode as MARC formatted view (5.23 KB, patch)
2022-09-02 20:08 UTC, George Veranis
Details | Diff | Splinter Review
Bug 29825: Preview of authority record on edit mode as MARC formatted view (1.61 KB, patch)
2022-09-02 20:08 UTC, George Veranis
Details | Diff | Splinter Review
Bug 29825: Preview of authority record on edit mode as MARC formatted view (4.28 KB, patch)
2022-09-02 20:34 UTC, George Veranis
Details | Diff | Splinter Review
Bug 29825: Preview of authority record on edit mode as MARC formatted view (1.41 KB, patch)
2022-09-02 20:34 UTC, George Veranis
Details | Diff | Splinter Review
Bug 29825: Preview of authority record on edit mode as MARC formatted view (4.59 KB, patch)
2023-06-30 19:52 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 29825: Preview of authority record on edit mode as MARC formatted view (1.41 KB, patch)
2023-06-30 19:52 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 29825: (follow-up) Some style fixes and modal correction (7.29 KB, patch)
2023-06-30 19:52 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 29825: Preview of authority record on edit mode as MARC formatted view (4.65 KB, patch)
2023-07-05 21:31 UTC, Phil Ringnalda
Details | Diff | Splinter Review
Bug 29825: Preview of authority record on edit mode as MARC formatted view (1.46 KB, patch)
2023-07-05 21:32 UTC, Phil Ringnalda
Details | Diff | Splinter Review
Bug 29825: (follow-up) Some style fixes and modal correction (7.34 KB, patch)
2023-07-05 21:32 UTC, Phil Ringnalda
Details | Diff | Splinter Review
Bug 29825: Preview of authority record on edit mode as MARC formatted view (5.69 KB, patch)
2023-11-22 22:35 UTC, Phil Ringnalda
Details | Diff | Splinter Review
Bug 29825: (follow-up) Some style fixes and modal correction (7.32 KB, patch)
2023-11-22 22:35 UTC, Phil Ringnalda
Details | Diff | Splinter Review
Bug 29825: Preview of authority record on edit mode as MARC formatted view (5.74 KB, patch)
2024-03-29 12:55 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 29825: (follow-up) Some style fixes and modal correction (7.38 KB, patch)
2024-03-29 12:55 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description George Veranis 2022-01-07 23:42:41 UTC
While a librarian is cataloguing an authority record by using the framework cannot check the full view of the record in MARC structure way before saving. 
That patch will add a new action on edit mode in order to show on a new window a preview of MARC record that will be saved.
Comment 1 Owen Leonard 2022-01-10 12:40:10 UTC
George is this something you're working on? If so please assign it to yourself and mark the bug ASSIGNED.
Comment 2 George Veranis 2022-01-10 22:11:49 UTC
Yes you are right, I just did that.
Comment 3 George Veranis 2022-09-01 20:45:39 UTC Comment hidden (obsolete)
Comment 4 Owen Leonard 2022-09-02 11:49:12 UTC
Template process failed: file error - modals/edit_authority_preview.inc: not found at /kohadevbox/koha/C4/Templates.pm line 127

Looks like you may have forgotten to 'git add' the new include file?
Comment 5 George Veranis 2022-09-02 12:57:00 UTC Comment hidden (obsolete)
Comment 6 George Veranis 2022-09-02 19:48:58 UTC Comment hidden (obsolete)
Comment 7 George Veranis 2022-09-02 19:49:01 UTC Comment hidden (obsolete)
Comment 8 George Veranis 2022-09-02 19:51:04 UTC
(In reply to Owen Leonard from comment #4)
> Template process failed: file error - modals/edit_authority_preview.inc: not
> found at /kohadevbox/koha/C4/Templates.pm line 127
> 
> Looks like you may have forgotten to 'git add' the new include file?

I think now I did in right way thanks to Andreas
Comment 9 George Veranis 2022-09-02 20:08:35 UTC Comment hidden (obsolete)
Comment 10 George Veranis 2022-09-02 20:08:39 UTC Comment hidden (obsolete)
Comment 11 George Veranis 2022-09-02 20:08:43 UTC Comment hidden (obsolete)
Comment 12 George Veranis 2022-09-02 20:34:09 UTC Comment hidden (obsolete)
Comment 13 George Veranis 2022-09-02 20:34:13 UTC Comment hidden (obsolete)
Comment 14 George Veranis 2022-09-02 20:35:55 UTC
(In reply to Owen Leonard from comment #4)
> Template process failed: file error - modals/edit_authority_preview.inc: not
> found at /kohadevbox/koha/C4/Templates.pm line 127
> 
> Looks like you may have forgotten to 'git add' the new include file?

Ok now it looks right, sorry for multiple tries but now you can test it in a normal way.
Comment 15 Emmanuel Bétemps 2022-09-08 13:53:28 UTC
Hi,

after applying the patch :
- the Edit option is in the 'Action' drop down menu
- when I click on this option, the record is displayed but the screen keeps on loading and, even if I see the 'Marc preview' button on the toolbar, I can't do anything

(before applying the patch, the 'MARC preview' option in the 'Actions' drop down menu display a pop up which is blank)
Comment 16 Owen Leonard 2023-06-30 19:52:35 UTC
Created attachment 152915 [details] [review]
Bug 29825: Preview of authority record on edit mode as MARC formatted view

This bug adds a new functionality on Edit mode of a new or existing authority.
Add a new button 'MARC Preview' in order librarian have the ability to preview
the record on MARC plain structure mode and have all fields and subfields
that entered before save/update the record.

To test:
1. Open or add an authority
2. The preview button isn't on toolbar
3. Apply the patch
4. Do step 1
5. The preview button exists
6. Do some changes or not to the authority record
7. Click to Preview MARC button and a modal window will appear with all fields
   indicators and subfields that filled in the form of cataloguing.

Mentored by: Andreas Roussos
Comment 17 Owen Leonard 2023-06-30 19:52:38 UTC
Created attachment 152916 [details] [review]
Bug 29825: Preview of authority record on edit mode as MARC formatted view

A new file for modal view of result added.
Comment 18 Owen Leonard 2023-06-30 19:52:40 UTC
Created attachment 152917 [details] [review]
Bug 29825: (follow-up) Some style fixes and modal correction

This patch makes a few coding style changes to the new JavaScript and
updates the Bootstrap modal markup to be in line with current standards.

The previous patches lacked a trigger for the preview modal, so I added
that. Since the content of the modal uses spaces for formatting I added
monospace formatting to the modal body.
Comment 19 Owen Leonard 2023-06-30 19:53:57 UTC
I was curious about this so I thought I'd rebase it and make a few minor corrections just to get it back in play.
Comment 20 Phil Ringnalda 2023-07-01 18:52:49 UTC
Using two spaces between the subfield label and the subfield value is jarring. One space isn't entirely shocking, detail.pl does that, or given that this looks more like the advanced bib editor than detail.pl no spaces but some padding or whatever that uses to get a little separation without a whole space wouldn't be shocking to advanced editor users, but two spaces looks like I accidentally started every field with a leading space.

It would also be vastly more useful (and probably more accessible) if it copied over the title attributes from tagnum and subfieldcode and used them as titles in the preview.
Comment 21 Phil Ringnalda 2023-07-05 21:21:09 UTC
But when I went looking for our house style for displaying MARC, I see that we use either nothing or a leading _ or ‡ or a trailing {space}/ as a subfield delimiter, that we either make the subfield code bold or do not, and that we either follow it with a space or do not, and that we either put each subfield on a new line or do not. _aTitle and <strong>_a</strong> Title are even just two views from the same script. Maybe our house style is "every MARC display must look different than any other MARC display" :)
Comment 22 Phil Ringnalda 2023-07-05 21:31:58 UTC
Created attachment 153078 [details] [review]
Bug 29825: Preview of authority record on edit mode as MARC formatted view

This bug adds a new functionality on Edit mode of a new or existing authority.
Add a new button 'MARC Preview' in order librarian have the ability to preview
the record on MARC plain structure mode and have all fields and subfields
that entered before save/update the record.

To test:
1. Open or add an authority
2. The preview button isn't on toolbar
3. Apply the patch
4. Do step 1
5. The preview button exists
6. Do some changes or not to the authority record
7. Click to Preview MARC button and a modal window will appear with all fields
   indicators and subfields that filled in the form of cataloguing.

Mentored by: Andreas Roussos

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Comment 23 Phil Ringnalda 2023-07-05 21:32:01 UTC
Created attachment 153079 [details] [review]
Bug 29825: Preview of authority record on edit mode as MARC formatted view

A new file for modal view of result added.

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Comment 24 Phil Ringnalda 2023-07-05 21:32:05 UTC
Created attachment 153080 [details] [review]
Bug 29825: (follow-up) Some style fixes and modal correction

This patch makes a few coding style changes to the new JavaScript and
updates the Bootstrap modal markup to be in line with current standards.

The previous patches lacked a trigger for the preview modal, so I added
that. Since the content of the modal uses spaces for formatting I added
monospace formatting to the modal body.

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Comment 25 Marcel de Rooy 2023-09-15 09:23:04 UTC
Please fix commit names !
First two patches have the same name, different contents.
Comment 26 Phil Ringnalda 2023-11-18 00:33:03 UTC
The commit name for the second would have been "Bug 29825: Oops, I forgot to 'git add'" so really rather than fixing it, the first two should just be squashed.
Comment 27 Victor Grousset/tuxayo 2023-11-22 00:53:43 UTC
Ok great, so you can do it, attach and the ticket will sort itself out automatically I think (will only keep your two patches after the squash). Otherwise it will need to be manually obsoleted ("Details" link next to the patch)
Comment 28 Phil Ringnalda 2023-11-22 22:35:25 UTC
Created attachment 159200 [details] [review]
Bug 29825: Preview of authority record on edit mode as MARC formatted view

This bug adds a new functionality on Edit mode of a new or existing authority.
Add a new button 'MARC Preview' in order librarian have the ability to preview
the record on MARC plain structure mode and have all fields and subfields
that entered before save/update the record.

To test:
1. Open or add an authority
2. The preview button isn't on toolbar
3. Apply the patch
4. Do step 1
5. The preview button exists
6. Do some changes or not to the authority record
7. Click to Preview MARC button and a modal window will appear with all fields
   indicators and subfields that filled in the form of cataloguing.

Mentored by: Andreas Roussos

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Comment 29 Phil Ringnalda 2023-11-22 22:35:27 UTC
Created attachment 159201 [details] [review]
Bug 29825: (follow-up) Some style fixes and modal correction

This patch makes a few coding style changes to the new JavaScript and
updates the Bootstrap modal markup to be in line with current standards.

The previous patches lacked a trigger for the preview modal, so I added
that. Since the content of the modal uses spaces for formatting I added
monospace formatting to the modal body.

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Comment 30 Kyle M Hall 2024-03-29 12:55:06 UTC
Created attachment 164126 [details] [review]
Bug 29825: Preview of authority record on edit mode as MARC formatted view

This bug adds a new functionality on Edit mode of a new or existing authority.
Add a new button 'MARC Preview' in order librarian have the ability to preview
the record on MARC plain structure mode and have all fields and subfields
that entered before save/update the record.

To test:
1. Open or add an authority
2. The preview button isn't on toolbar
3. Apply the patch
4. Do step 1
5. The preview button exists
6. Do some changes or not to the authority record
7. Click to Preview MARC button and a modal window will appear with all fields
   indicators and subfields that filled in the form of cataloguing.

Mentored by: Andreas Roussos

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 31 Kyle M Hall 2024-03-29 12:55:14 UTC
Created attachment 164127 [details] [review]
Bug 29825: (follow-up) Some style fixes and modal correction

This patch makes a few coding style changes to the new JavaScript and
updates the Bootstrap modal markup to be in line with current standards.

The previous patches lacked a trigger for the preview modal, so I added
that. Since the content of the modal uses spaces for formatting I added
monospace formatting to the modal body.

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>