diff --git a/config/vufind/facets.ini b/config/vufind/facets.ini index e1a1e5dad44c2b41d8af3d7fb6ace0bfdeab8449..c75cd2a40777e529257ce301f92bc52903ca795e 100644 --- a/config/vufind/facets.ini +++ b/config/vufind/facets.ini @@ -68,6 +68,7 @@ dateRange[] = publishDate ; (see https://wiki.apache.org/solr/HierarchicalFaceting but note that we always ; use a trailing slash to avoid ambiguities) ;hierarchical[] = building +;hierarchical[] = format ; General sort options for hierarchical facets (Home page, Advanced Search and ; SideFacets). diff --git a/import/translation_maps/format_map_level0.properties b/import/translation_maps/format_map_level0.properties new file mode 100644 index 0000000000000000000000000000000000000000..3d481b0675e1b1e0a44ffbd882aa73ae0309b146 --- /dev/null +++ b/import/translation_maps/format_map_level0.properties @@ -0,0 +1,62 @@ +# +# Hierarchical facet mapping for format - level 0 (main level) +# Note that this mapping is not used by default. To enable, see the associated +# configuration in marc_local.properties. +# +# DATA FROM INDEXER = Label +# +Atlas = 0/Map/ +Book = 0/Book/ +BookComponentPart = 0/Book/ +Braille = 0/Book/ +BRDisc = 0/Video/ +CDROM = 0/Software/ +Chart = 0/Image/ +ChipCartridge = 0/Software/ +Collage = 0/Image/ +ConferenceProceeding= 0/Conference Proceeding/ +DiscCartridge = 0/Software/ +Drawing = 0/Image/ +eBook = 0/Book/ +Electronic = 0/Electronic/ +Filmstrip = 0/Video/ +FlashCard = 0/Image/ +FloppyDisk = 0/Software/ +Globe = 0/Map/ +GovernmentDocument = 0/Government Document/ +Journal = 0/Serial/ +Kit = 0/Kit/ +Manuscript = 0/Manuscript/ +Map = 0/Map/ +Microfilm = 0/Microfilm/ +MotionPicture = 0/Video/ +MusicalScore = 0/Musical Score/ +MusicRecording = 0/Audio/ +Newspaper = 0/Serial/ +OnlineIntegratingResource = 0/Database/ +Painting = 0/Image/ +Photonegative = 0/Image/ +Photo = 0/Image/ +PhysicalIntegratingResource = 0/Serial/ +PhysicalObject = 0/Physical Object/ +Print = 0/Image/ +SensorImage = 0/Image/ +SerialComponentPart = 0/Serial/ +Serial = 0/Serial/ +Slide = 0/Image/ +Software = 0/Software/ +SoundCassette = 0/Audio/ +SoundDisc = 0/Audio/ +SoundRecording = 0/Audio/ +TapeCartridge = 0/Software/ +TapeCassette = 0/Software/ +TapeReel = 0/Software/ +Thesis = 0/Thesis/ +Transparency = 0/Image/ +Unknown = 0/Unknown/ +VideoCartridge = 0/Video/ +VideoCassette = 0/Video/ +VideoDisc = 0/Video/ +VideoOnline = 0/Video/ +VideoReel = 0/Video/ +Video = 0/Video/ diff --git a/import/translation_maps/format_map_level1.properties b/import/translation_maps/format_map_level1.properties new file mode 100644 index 0000000000000000000000000000000000000000..848d64875ac311fa13c5d0af9497add580c77b9f --- /dev/null +++ b/import/translation_maps/format_map_level1.properties @@ -0,0 +1,65 @@ +# +# Hierarchical facet mapping for format - level 1 +# Note that this mapping is not used by default. To enable, see the associated +# configuration in marc_local.properties. +# +# Note also that if there is only a single value mapped to main level (0), no level +# 1 mapping is done by default. These values are commented out below. +# +# DATA FROM INDEXER = Label +# +Atlas = 1/Map/Atlas/ +Book = 1/Book/Book/ +BookComponentPart = 1/Book/Book Chapter/ +Braille = 1/Book/Braille/ +BRDisc = 1/Video/Blu-ray Disc/ +CDROM = 1/Software/CD-ROM/ +Chart = 1/Image/Chart/ +ChipCartridge = 1/Software/Chip Cartridge/ +Collage = 1/Image/Collage/ +#ConferenceProceeding= 1/Conference Proceeding/?/ +DiscCartridge = 1/Software/Disc Cartridge/ +Drawing = 1/Image/Drawing/ +eBook = 1/Book/eBook/ +#Electronic = 1/Electronic/?/ +Filmstrip = 1/Video/Filmstrip/ +FlashCard = 1/Image/Flash Card/ +FloppyDisk = 1/Software/Floppy Disk/ +Globe = 1/Map/Globe/ +#GovernmentDocument = 1/Government Document/?/ +Journal = 1/Serial/Journal/ +#Kit = 1/Kit/?/ +#Manuscript = 1/Manuscript/?/ +Map = 1/Map/Map/ +#Microfilm = 1/Microfilm/?/ +MotionPicture = 1/Video/Motion Picture/ +#MusicalScore = 1/Musical Score/?/ +MusicRecording = 1/Audio/Music Recording/ +Newspaper = 1/Serial/Newspaper/ +#OnlineIntegratingResource = 1/Database/?/ +Painting = 1/Image/Painting/ +Photonegative = 1/Image/Photo Negative/ +Photo = 1/Image/Photo/ +PhysicalIntegratingResource = 1/Serial/Reference Material/ +#PhysicalObject = 1/Physical Object/ +Print = 1/Image/Print/ +SensorImage = 1/Image/Sensor Image/ +SerialComponentPart = 1/Serial/Journal Article/ +Serial = 1/Serial/Serial/ +Slide = 1/Image/Slide/ +Software = 1/Software/Other/ +SoundCassette = 1/Audio/Sound Cassette/ +SoundDisc = 1/Audio/Sound Disc/ +SoundRecording = 1/Audio/Sound Recording/ +TapeCartridge = 1/Software/Tape Cartridge/ +TapeCassette = 1/Software/Tape Cassette/ +TapeReel = 1/Software/Tape Reel/ +#Thesis = 1/Thesis/?/ +Transparency = 1/Image/Transparency/ +#Unknown = 1/Unknown/?/ +VideoCartridge = 1/Video/Video Cartridge/ +VideoCassette = 1/Video/Video Cassette/ +VideoDisc = 1/Video/Video Disc/ +VideoOnline = 1/Video/Online Video/ +VideoReel = 1/Video/Video Reel/ +Video = 1/Video/Other/ diff --git a/themes/bootstrap3/templates/RecordDriver/DefaultRecord/format-list.phtml b/themes/bootstrap3/templates/RecordDriver/DefaultRecord/format-list.phtml index 086cd3fab1c7eb38f227a2814d72ac31ca17b7b4..06fa7d1f54630df182e3326879a6dfa62c3a2137 100644 --- a/themes/bootstrap3/templates/RecordDriver/DefaultRecord/format-list.phtml +++ b/themes/bootstrap3/templates/RecordDriver/DefaultRecord/format-list.phtml @@ -1,3 +1,5 @@ <?php foreach ($this->driver->getFormats() as $format): ?> - <span class="format <?=$this->record($this->driver)->getFormatClass($format) ?>"><?=$this->transEsc($format) ?></span> + <?php if ($translated = $this->transEsc($format)): ?> + <span class="format <?=$this->record($this->driver)->getFormatClass($format) ?>"><?=$translated ?></span> + <?php endif; ?> <?php endforeach; ?>