[Koha-bugs] [Bug 10891] Make facets customisable (umbrella report)

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Sep 25 23:24:52 CEST 2013


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

--- Comment #13 from mathieu saby <mathieu.saby at univ-rennes2.fr> ---
After discussion on koha-devel I'm trying to put the configuration in JSON
string, stored in a new syspref, which will be editable only through a new page
in staff admin.

The JSON will look like that :

[
  {
    "code": "branches",
    "label": "Libraries",
    "index": {"UNIMARC":"branch","MARC21":"branch"},
    "mandatory": 1,
    "INTRAorder": 1,
    "OPACorder": 1,
    "mapping": {"UNIMARC":["995b"],"MARC21":["952a"]},
    "expandafter": null,
    "sort": null
  },
  {
    "code": "location",
    "label": "Libraries",
    "index": {"UNIMARC":"location","MARC21":"location"},
    "mandatory": 1,
    "INTRAorder": 2,
    "OPACorder": 2,
    "mapping": {"UNIMARC":["995e"],"MARC21":["952c"]},
    "expandafter": null,
    "sort": null
  },
  {
    "code": "language",
    "label": "Language of document",
    "index": {"UNIMARC":"ln","MARC21":"ln"},
    "mandatory": 1,
    "INTRAorder": 3,
    "OPACorder": 3,
    "mapping": {"UNIMARC":["101a"],"MARC21":["041a"]},
    "expandafter": null,
    "sort": null
  },
  {
    "code": "languageoforiginal",
    "label": "Language of original",
    "index": {"UNIMARC":"ln","MARC21":"ln"},
    "mandatory": 1,
    "INTRAorder": 4,
    "OPACorder": 4,
    "mapping": {"UNIMARC":["101c"],"MARC21":["041h"]},
    "expandafter": null,
    "sort": null
  }, 
  {
    "code": "typeofmaterial",
    "label": "Type of material",
    "index": {"UNIMARC":"Material-type"},
    "mandatory": 1,
    "INTRAorder": 5,
    "OPACorder": 5,
    "mapping": {"UNIMARC":["200b"]},
    "expandafter": null,
    "sort": null
  }
]

- code is a unique code for each facet
- label is the name displayed in english templates (of course, templates will
ne to be edited to take into account the new facets)
- index is an object with the name of zebra index in unimarc and marc21 conf
files. If only unimarc index is stored, the facet will be editable only if
marcflavor = unimarc. The same for Marc21
Most often, it is the same index, but not in every cases
- mandatory = 1 means the facet is a standard Koha facet defined in Koha source
code, not a completely user defined facet; mandatory facets can be display or
not, and configured. but they can't be suppressed from the syspref.
For the moment, the syspref will only contains mandatory syspref. But it will
be easy to allow librarians to define their own facets
- INTRAOrder and OPACOrder : order of display of this facet in intranet and
OPAC. If 0 or null, the facet is not displayed. The order can be different on
OPAC and intranet
- mapping : the fields and subfields in UNIMARC and MARC21. Syntax : 606abx.
digits of label could be replaced by . : 6.. match 600-699
- expandafter : This field will give the abiliy to override the limit of 6
values displayed by default. If null, only show the 6 first values in each
sysypref, and collapse the rest. Otherwise, show the XXX first values
- sort : This field will give the abiliy to override the default sorting
(alphabetic). If null, use the defaut sorting. Otherwise, define a custom
sorting according to some codes (not yet defined. for ex : alpha_desc,
alpha_asc, occurences_desc, occurences_asc)


M. Saby

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list