http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7933

Fridolyn SOMERS <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #9308|0                           |1
        is obsolete|                            |
             Status|Failed QA                   |In Discussion
           Assignee|[email protected]       |[email protected]
                   |                            |m

--- Comment #11 from Fridolyn SOMERS <[email protected]> ---
Created attachment 13707
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=13707&action=edit
Proposed patch (revisited)

I propose a new patch based on same behavior :
at OPAC, remove from MARC::Record all subfields declared hidden in framework.
(if all subfields are removed, field is removed).

C4::Biblio :
------------
I created RemoveHiddenSubfields for that.
It can be used for OPAC and intranet to remove hidden subfields from record
(see catalogue/MARCdetail.pl).
My purpose is to allow it other calls than OPAC pages.

GetMarcBiblio gets 2 more args : $template and $withouthidden. They are
optional to avoid modifying intranet calls.
I created GetMarcBiblioForOpac that calls GetMarcBiblio with $template='opac'
and $withouthidden=1. This method is to explicit the fact that hidden fields
are removed at OPAC.

GetISBDView already as the $template parameter. I used it to call
GetMarcBiblioForOpac if $template='opac'.

C4::Record :
------------
CSV export exists at OPAC so marc2csv() gets a new arg : $template.
marc2csv is based on marcrecord2csv. I modified its args to use directly
modified record and since it is only for C4::Record, I turned it into private :
_marcrecord2csv.

C4::Search :
------------
In result page, records come from C4::Search::searchResults.
So I add RemoveHiddenSubfields if from OPAC.

OPAC pages to test :
--------------------
I added behavior in all opac pages using GetMarcBiblio : 
- opac-ISBDdetail.pl
- opac-MARCdetail.pl (avoid duplicated behavior)
- opac-basket.pl
- opac-detail.pl (behavior with and without XSLT)
- opac-downloadcart.pl
- opac-downloadshelf.pl
- opac-export.pl
- opac-reserve.pl
- opac-search.pl
- opac-sendbasket.pl
- opac-sendshelf.pl
- opac-showmarc.pl
- opac-showreviews.pl

Other :
-------
Note that behavior does not apply to OAI and ILS-DI.
I think there is no need.

Note that to any subfield can be hidden, many pages use
C4::Biblio::GetBiblioData and C4::Items::GetItemsInfo. They get datas from
talbles biblio, bilioitems and items.
So subfields mapped to a database column can theorically not be hidden.
But these datas are very common informations about biblio (title, author, ...),
they sould not be hidden.


Please feel free to discuss and ask modifications.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to