Bugzilla – Attachment 140181 Details for
Bug 29825
Preview of authority record on edit mode as MARC formatted view
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29825: Preview of authority record on edit mode as MARC formatted view
Bug-29825-Preview-of-authority-record-on-edit-mode.patch (text/plain), 5.23 KB, created by
George Veranis
on 2022-09-02 19:49:01 UTC
(
hide
)
Description:
Bug 29825: Preview of authority record on edit mode as MARC formatted view
Filename:
MIME Type:
Creator:
George Veranis
Created:
2022-09-02 19:49:01 UTC
Size:
5.23 KB
patch
obsolete
>From 5675405f240af80b6b3af5e25e0805d743264d27 Mon Sep 17 00:00:00 2001 >From: George Veranis <gveranis@dataly.gr> >Date: Fri, 2 Sep 2022 21:47:43 +0200 >Subject: [PATCH] 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. >--- > .../en/modules/authorities/authorities.tt | 104 +++++++++--------- > 1 file changed, 52 insertions(+), 52 deletions(-) > >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 72015c0d02..3c0557d751 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt >@@ -80,59 +80,59 @@ > }); > > $('#preview').click(function (){ >- var content="<h3>Authority #: [% authid %]</h3><hr>"; >- content+="<div style='color:#004d99;'>"; >- var line=1; >- var has_input=0; >- var sf_has_input=0; >- $('#authoritytabs').find('[id^=tag_]').each(function(){ >- //check if tag has content >- has_input=0; >- $(this).find('.input_marceditor').each(function(){ >- if($(this).val()) has_input=1; >- }); >- if(has_input){ >- line=1; >- //tag >- var $tag = $(this).find('.tagnum').text(); >- content += $tag.replace('*','') +" "; >- //indicators >- $(this).find('.indicator').each(function(){ >- if( $(this).val() ) content += $(this).val(); >- else content += "_"; >- }); >- content += " "; >- //subfields >- $(this).find('.subfield_line').each(function(){ >- >- //check if subfield has content >- sf_has_input=0; >- $(this).find('.input_marceditor').each(function(){ >- if($(this).val()) sf_has_input=1; >- }); >- if(sf_has_input){ >- if(line>1) content += " "; >- //code >- $(this).find('.subfieldcode').each(function(){ >- $(this).find('.flat').each(function(){ >- if($(this).val()!='00') >- content += "\$"+$(this).val()+" "; >+ var content="<h3>Authority #: [% authid %]</h3><hr>"; >+ content+="<div style='color:#004d99;'>"; >+ var line=1; >+ var has_input=0; >+ var sf_has_input=0; >+ $('#authoritytabs').find('[id^=tag_]').each(function(){ >+ //check if tag has content >+ has_input=0; >+ $(this).find('.input_marceditor').each(function(){ >+ if($(this).val()) has_input=1; >+ }); >+ >+ if(has_input){ >+ line=1; >+ //tag >+ var $tag = $(this).find('.tagnum').text(); >+ content += $tag.replace('*','') +" "; >+ //indicators >+ $(this).find('.indicator').each(function(){ >+ if( $(this).val() ) content += $(this).val(); >+ else content += "_"; >+ }); >+ content += " "; >+ //subfields >+ $(this).find('.subfield_line').each(function(){ >+ //check if subfield has content >+ sf_has_input=0; >+ $(this).find('.input_marceditor').each(function(){ >+ if($(this).val()) sf_has_input=1; >+ }); >+ if(sf_has_input){ >+ if(line>1) content += " "; >+ //code >+ $(this).find('.subfieldcode').each(function(){ >+ $(this).find('.flat').each(function(){ >+ if($(this).val()!='00') >+ content += "\$"+$(this).val()+" "; >+ }); > }); >- }); >- //value >- $(this).find('.input_marceditor').each(function(){ >- content += "<span style='color:#000;'>"+$(this).val()+"</span>"; >- }); >- content+="</br>"; >- line+=1; >- } >- }); >- } >- }); >- >- $('#auEditPreview').modal('show'); >- $("#auloadpreview").html(content); >- }); >+ //value >+ $(this).find('.input_marceditor').each(function(){ >+ content += "<span style='color:#000;'>"+$(this).val()+"</span>"; >+ }); >+ content+="</br>"; >+ line+=1; >+ } >+ }); >+ } >+ }); >+ >+ $('#auEditPreview').modal('show'); >+ $("#auloadpreview").html(content); >+ }); > > }); > >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 29825
:
140063
|
140115
|
140180
|
140181
|
140182
|
140183
|
140184
|
140185
|
140186
|
152915
|
152916
|
152917
|
153078
|
153079
|
153080
|
159200
|
159201
|
164126
|
164127