From c41da00b4a15a22c8554970240088a63f033bb7c Mon Sep 17 00:00:00 2001 From: Andrew Moore Date: Thu, 24 Apr 2008 10:30:57 -0500 Subject: [PATCH] Bug 2044: allowing multiuple icon sets I've rearranged the two directories where media type icons live. I've also added two more collections of icons, one from http://apps.carleton.edu/campus/library/bridge_icons/ and one from liblime (Tina). The first has a license restriction that I added to the "Licenses" tab on the "About" page. Then, I've adjusted the Item Types Administration page so that it can deal with multiple collections of icons. I also added a test script to verify that the two identical icon directories are actually identical. DOCUMENTATION CHANGE: It's possible that we need to add something to the administration documentation to indicate how you can add more sets of icons if you want. You simply add directory to koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/ and to koha-tmpl/opac-tmpl/prog/itemtypeimg. The icons should start showing up. Signed-off-by: Joshua Ferraro --- admin/itemtypes.pl | 72 +++++++++++++----- .../intranet-tmpl/prog/en/modules/about.tmpl | 17 ++++- .../prog/en/modules/admin/itemtypes.tmpl | 7 +- .../prog/img/itemtypeimg/bridge/2d_art.gif | Bin 0 -> 978 bytes .../prog/img/itemtypeimg/bridge/3d_art.gif | Bin 0 -> 988 bytes .../prog/img/itemtypeimg/bridge/archive.gif | Bin 0 -> 986 bytes .../prog/img/itemtypeimg/bridge/book.gif | Bin 0 -> 1051 bytes .../prog/img/itemtypeimg/bridge/cd_music.gif | Bin 0 -> 883 bytes .../img/itemtypeimg/bridge/computer_file.gif | Bin 0 -> 880 bytes .../img/itemtypeimg/bridge/digital_audio.gif | Bin 0 -> 1032 bytes .../prog/img/itemtypeimg/bridge/dvd.gif | Bin 0 -> 895 bytes .../prog/img/itemtypeimg/bridge/e_book.gif | Bin 0 -> 1145 bytes .../prog/img/itemtypeimg/bridge/e_journal.gif | Bin 0 -> 898 bytes .../prog/img/itemtypeimg/bridge/kit.gif | Bin 0 -> 878 bytes .../prog/img/itemtypeimg/bridge/laserdisk.gif | Bin 0 -> 976 bytes .../prog/img/itemtypeimg/bridge/map.gif | Bin 0 -> 1333 bytes .../img/itemtypeimg/bridge/periodical.gif | Bin 0 -> 977 bytes .../prog/img/itemtypeimg/bridge/score.gif | Bin 0 -> 833 bytes .../prog/img/itemtypeimg/bridge/sound.gif | Bin 0 -> 1041 bytes .../img/itemtypeimg/bridge/tape_music.gif | Bin 0 -> 1119 bytes .../prog/img/itemtypeimg/bridge/vhs.gif | Bin 0 -> 836 bytes .../img/itemtypeimg/bridge/vinyl_music.gif | Bin 0 -> 1340 bytes .../prog/img/itemtypeimg/bridge/web.gif | Bin 0 -> 1943 bytes .../img/itemtypeimg/liblime-kids/.DS_Store | Bin 0 -> 15364 bytes .../itemtypeimg/liblime-kids/addtobasket.gif | Bin 0 -> 2540 bytes .../itemtypeimg/liblime-kids/addtoshelf.gif | Bin 0 -> 2956 bytes .../itemtypeimg/liblime-kids/audiobook-cd.gif | Bin 0 -> 2927 bytes .../itemtypeimg/liblime-kids/audiobook.gif | Bin 0 -> 2867 bytes .../liblime-kids/beginner-reader-book.gif | Bin 0 -> 2936 bytes .../liblime-kids/big-book-icon.gif | Bin 0 -> 3193 bytes .../img/itemtypeimg/liblime-kids/book-bag.gif | Bin 0 -> 3047 bytes .../liblime-kids/book-icon-60px.gif | Bin 0 -> 2255 bytes .../liblime-kids/book-icon-author-search.gif | Bin 0 -> 5399 bytes .../liblime-kids/book-icon-biography.gif | Bin 0 -> 3135 bytes .../liblime-kids/book-icon-call-number.gif | Bin 0 -> 3982 bytes .../liblime-kids/book-icon-mystery.gif | Bin 0 -> 3009 bytes .../liblime-kids/book-icon-mystery2.gif | Bin 0 -> 3006 bytes .../liblime-kids/book-icon-non-fiction.gif | Bin 0 -> 2840 bytes .../liblime-kids/book-icon-scifi-60px.gif | Bin 0 -> 2892 bytes .../liblime-kids/book-icon-subject-search.gif | Bin 0 -> 5595 bytes .../liblime-kids/book-icon-title-search.gif | Bin 0 -> 5467 bytes .../liblime-kids/book-icon-western.gif | Bin 0 -> 2966 bytes .../liblime-kids/book-large-print.gif | Bin 0 -> 3037 bytes .../img/itemtypeimg/liblime-kids/brief..gif | Bin 0 -> 1843 bytes .../img/itemtypeimg/liblime-kids/card.gif | Bin 0 -> 2324 bytes .../liblime-kids/clear-book-bag.gif | Bin 0 -> 3081 bytes .../img/itemtypeimg/liblime-kids/detail.gif | Bin 0 -> 1866 bytes .../liblime-kids/faculty-course-materials.gif | Bin 0 -> 1969 bytes .../liblime-kids/icon-reference.gif | Bin 0 -> 3111 bytes .../liblime-kids/keyword-search.gif | Bin 0 -> 4334 bytes .../img/itemtypeimg/liblime-kids/music-CD.gif | Bin 0 -> 2832 bytes .../liblime-kids/newspaper-icon.gif | Bin 0 -> 3461 bytes .../liblime-kids/videocassette.gif | Bin 0 -> 3572 bytes .../liblime-kids/vinyl-sound-recordings.gif | Bin 0 -> 2875 bytes .../prog/img/itemtypeimg/{ => npl}/AF.gif | Bin .../prog/img/itemtypeimg/{ => npl}/AV.gif | Bin .../prog/img/itemtypeimg/{ => npl}/AVA.gif | Bin .../prog/img/itemtypeimg/{ => npl}/AVJ.gif | Bin .../prog/img/itemtypeimg/{ => npl}/AVJNF.gif | Bin .../prog/img/itemtypeimg/{ => npl}/AVNF.gif | Bin .../img/itemtypeimg/{ => npl}/Audiobook.gif | Bin .../img/itemtypeimg/{ => npl}/Biography.gif | Bin .../img/itemtypeimg/{ => npl}/Book-on-CD.gif | Bin .../itemtypeimg/{ => npl}/Book-on-Tape.gif | Bin .../itemtypeimg/{ => npl}/CD-ROM-software.gif | Bin .../prog/img/itemtypeimg/{ => npl}/CDM.gif | Bin .../prog/img/itemtypeimg/{ => npl}/DVD.gif | Bin .../prog/img/itemtypeimg/{ => npl}/EASY.gif | Bin .../prog/img/itemtypeimg/{ => npl}/EDLS.gif | Bin .../itemtypeimg/{ => npl}/Ed.-Curriculum.gif | Bin .../prog/img/itemtypeimg/{ => npl}/FLAG.gif | Bin .../{ => npl}/Faculty-Course-Materials.gif | Bin .../{ => npl}/Fiction-large-print.gif | Bin .../img/itemtypeimg/{ => npl}/Fiction.gif | Bin .../prog/img/itemtypeimg/{ => npl}/JB.gif | Bin .../prog/img/itemtypeimg/{ => npl}/JF.gif | Bin .../prog/img/itemtypeimg/{ => npl}/JNF.gif | Bin .../prog/img/itemtypeimg/{ => npl}/JREF.gif | Bin .../{ => npl}/Juvenile-audiobook.gif | Bin .../{ => npl}/Juvenile-biography.gif | Bin .../{ => npl}/Juvenile-book-tape-kit.gif | Bin .../{ => npl}/Juvenile-fiction.gif | Bin .../{ => npl}/Juvenile-non-fiction.gif | Bin .../{ => npl}/Juvenile-picture-books.gif | Bin .../{ => npl}/Juvenile-reference.gif | Bin .../prog/img/itemtypeimg/{ => npl}/KIT.gif | Bin .../prog/img/itemtypeimg/{ => npl}/LP.gif | Bin .../prog/img/itemtypeimg/{ => npl}/LPNF.gif | Bin .../itemtypeimg/{ => npl}/Local-history.gif | Bin .../prog/img/itemtypeimg/{ => npl}/MAG.gif | Bin .../prog/img/itemtypeimg/{ => npl}/MFLM.gif | Bin .../prog/img/itemtypeimg/{ => npl}/MZ.gif | Bin .../img/itemtypeimg/{ => npl}/Magazine.gif | Bin .../img/itemtypeimg/{ => npl}/Microfiche.gif | Bin .../img/itemtypeimg/{ => npl}/Microfilm.gif | Bin .../img/itemtypeimg/{ => npl}/Music-CD.gif | Bin .../img/itemtypeimg/{ => npl}/Mystery.gif | Bin .../{ => npl}/Non-fiction-large-print.gif | Bin .../img/itemtypeimg/{ => npl}/Non-fiction.gif | Bin .../prog/img/itemtypeimg/{ => npl}/PB.gif | Bin .../prog/img/itemtypeimg/{ => npl}/PF.gif | Bin .../img/itemtypeimg/{ => npl}/Pamphlet.gif | Bin .../{ => npl}/Paperback-romance.gif | Bin .../img/itemtypeimg/{ => npl}/Rare-Book.gif | Bin .../img/itemtypeimg/{ => npl}/Reference.gif | Bin .../prog/img/itemtypeimg/{ => npl}/SIRS.gif | Bin .../prog/img/itemtypeimg/{ => npl}/SS.gif | Bin .../{ => npl}/ScienceFictionFantasy.gif | Bin .../img/itemtypeimg/{ => npl}/Video-disc.gif | Bin .../Videocassette-juvenile-non-fiction.gif | Bin .../{ => npl}/Videocassette-juvenile.gif | Bin .../{ => npl}/Videocassette-non-fiction.gif | Bin .../itemtypeimg/{ => npl}/Videocassette.gif | Bin .../{ => npl}/Vinyl-Sound-Recordings.gif | Bin .../prog/img/itemtypeimg/{ => npl}/WEB.gif | Bin .../img/itemtypeimg/{ => npl}/Western.gif | Bin .../prog/img/itemtypeimg/{ => npl}/YA.gif | Bin .../prog/img/itemtypeimg/{ => npl}/YAC.gif | Bin .../{ => npl}/Young-Adult-fiction.gif | Bin .../{ => npl}/Young-Adult-non-fiction.gif | Bin .../prog/itemtypeimg/bridge/2d_art.gif | Bin 0 -> 978 bytes .../prog/itemtypeimg/bridge/3d_art.gif | Bin 0 -> 988 bytes .../prog/itemtypeimg/bridge/archive.gif | Bin 0 -> 986 bytes .../prog/itemtypeimg/bridge/book.gif | Bin 0 -> 1051 bytes .../prog/itemtypeimg/bridge/cd_music.gif | Bin 0 -> 883 bytes .../prog/itemtypeimg/bridge/computer_file.gif | Bin 0 -> 880 bytes .../prog/itemtypeimg/bridge/digital_audio.gif | Bin 0 -> 1032 bytes .../opac-tmpl/prog/itemtypeimg/bridge/dvd.gif | Bin 0 -> 895 bytes .../prog/itemtypeimg/bridge/e_book.gif | Bin 0 -> 1145 bytes .../prog/itemtypeimg/bridge/e_journal.gif | Bin 0 -> 898 bytes .../opac-tmpl/prog/itemtypeimg/bridge/kit.gif | Bin 0 -> 878 bytes .../prog/itemtypeimg/bridge/laserdisk.gif | Bin 0 -> 976 bytes .../opac-tmpl/prog/itemtypeimg/bridge/map.gif | Bin 0 -> 1333 bytes .../prog/itemtypeimg/bridge/periodical.gif | Bin 0 -> 977 bytes .../prog/itemtypeimg/bridge/score.gif | Bin 0 -> 833 bytes .../prog/itemtypeimg/bridge/sound.gif | Bin 0 -> 1041 bytes .../prog/itemtypeimg/bridge/tape_music.gif | Bin 0 -> 1119 bytes .../opac-tmpl/prog/itemtypeimg/bridge/vhs.gif | Bin 0 -> 836 bytes .../prog/itemtypeimg/bridge/vinyl_music.gif | Bin 0 -> 1340 bytes .../opac-tmpl/prog/itemtypeimg/bridge/web.gif | Bin 0 -> 1943 bytes .../prog/itemtypeimg/liblime-kids/.DS_Store | Bin 0 -> 15364 bytes .../itemtypeimg/liblime-kids/addtobasket.gif | Bin 0 -> 2540 bytes .../itemtypeimg/liblime-kids/addtoshelf.gif | Bin 0 -> 2956 bytes .../itemtypeimg/liblime-kids/audiobook-cd.gif | Bin 0 -> 2927 bytes .../itemtypeimg/liblime-kids/audiobook.gif | Bin 0 -> 2867 bytes .../liblime-kids/beginner-reader-book.gif | Bin 0 -> 2936 bytes .../liblime-kids/big-book-icon.gif | Bin 0 -> 3193 bytes .../itemtypeimg/liblime-kids/book-bag.gif | Bin 0 -> 3047 bytes .../liblime-kids/book-icon-60px.gif | Bin 0 -> 2255 bytes .../liblime-kids/book-icon-author-search.gif | Bin 0 -> 5399 bytes .../liblime-kids/book-icon-biography.gif | Bin 0 -> 3135 bytes .../liblime-kids/book-icon-call-number.gif | Bin 0 -> 3982 bytes .../liblime-kids/book-icon-mystery.gif | Bin 0 -> 3009 bytes .../liblime-kids/book-icon-mystery2.gif | Bin 0 -> 3006 bytes .../liblime-kids/book-icon-non-fiction.gif | Bin 0 -> 2840 bytes .../liblime-kids/book-icon-scifi-60px.gif | Bin 0 -> 2892 bytes .../liblime-kids/book-icon-subject-search.gif | Bin 0 -> 5595 bytes .../liblime-kids/book-icon-title-search.gif | Bin 0 -> 5467 bytes .../liblime-kids/book-icon-western.gif | Bin 0 -> 2966 bytes .../liblime-kids/book-large-print.gif | Bin 0 -> 3037 bytes .../prog/itemtypeimg/liblime-kids/brief..gif | Bin 0 -> 1843 bytes .../prog/itemtypeimg/liblime-kids/card.gif | Bin 0 -> 2324 bytes .../liblime-kids/clear-book-bag.gif | Bin 0 -> 3081 bytes .../prog/itemtypeimg/liblime-kids/detail.gif | Bin 0 -> 1866 bytes .../liblime-kids/faculty-course-materials.gif | Bin 0 -> 1969 bytes .../liblime-kids/icon-reference.gif | Bin 0 -> 3111 bytes .../liblime-kids/keyword-search.gif | Bin 0 -> 4334 bytes .../itemtypeimg/liblime-kids/music-CD.gif | Bin 0 -> 2832 bytes .../liblime-kids/newspaper-icon.gif | Bin 0 -> 3461 bytes .../liblime-kids/videocassette.gif | Bin 0 -> 3572 bytes .../liblime-kids/vinyl-sound-recordings.gif | Bin 0 -> 2875 bytes .../prog/itemtypeimg/{ => npl}/AF.gif | Bin .../prog/itemtypeimg/{ => npl}/AV.gif | Bin .../prog/itemtypeimg/{ => npl}/AVA.gif | Bin .../prog/itemtypeimg/{ => npl}/AVJ.gif | Bin .../prog/itemtypeimg/{ => npl}/AVJNF.gif | Bin .../prog/itemtypeimg/{ => npl}/AVNF.gif | Bin .../prog/itemtypeimg/{ => npl}/Audiobook.gif | Bin .../prog/itemtypeimg/{ => npl}/Biography.gif | Bin .../prog/itemtypeimg/{ => npl}/Book-on-CD.gif | Bin .../itemtypeimg/{ => npl}/Book-on-Tape.gif | Bin .../itemtypeimg/{ => npl}/CD-ROM-software.gif | Bin .../prog/itemtypeimg/{ => npl}/CDM.gif | Bin .../prog/itemtypeimg/{ => npl}/DVD.gif | Bin .../prog/itemtypeimg/{ => npl}/EASY.gif | Bin .../prog/itemtypeimg/{ => npl}/EDLS.gif | Bin .../itemtypeimg/{ => npl}/Ed.-Curriculum.gif | Bin .../prog/itemtypeimg/{ => npl}/FLAG.gif | Bin .../{ => npl}/Faculty-Course-Materials.gif | Bin .../{ => npl}/Fiction-large-print.gif | Bin .../prog/itemtypeimg/{ => npl}/Fiction.gif | Bin .../prog/itemtypeimg/{ => npl}/JB.gif | Bin .../prog/itemtypeimg/{ => npl}/JF.gif | Bin .../prog/itemtypeimg/{ => npl}/JNF.gif | Bin .../prog/itemtypeimg/{ => npl}/JREF.gif | Bin .../{ => npl}/Juvenile-audiobook.gif | Bin .../{ => npl}/Juvenile-biography.gif | Bin .../{ => npl}/Juvenile-book-tape-kit.gif | Bin .../{ => npl}/Juvenile-fiction.gif | Bin .../{ => npl}/Juvenile-non-fiction.gif | Bin .../{ => npl}/Juvenile-picture-books.gif | Bin .../{ => npl}/Juvenile-reference.gif | Bin .../prog/itemtypeimg/{ => npl}/KIT.gif | Bin .../prog/itemtypeimg/{ => npl}/LP.gif | Bin .../prog/itemtypeimg/{ => npl}/LPNF.gif | Bin .../itemtypeimg/{ => npl}/Local-history.gif | Bin .../prog/itemtypeimg/{ => npl}/MAG.gif | Bin .../prog/itemtypeimg/{ => npl}/MFLM.gif | Bin .../prog/itemtypeimg/{ => npl}/MZ.gif | Bin .../prog/itemtypeimg/{ => npl}/Magazine.gif | Bin .../prog/itemtypeimg/{ => npl}/Microfiche.gif | Bin .../prog/itemtypeimg/{ => npl}/Microfilm.gif | Bin .../prog/itemtypeimg/{ => npl}/Music-CD.gif | Bin .../prog/itemtypeimg/{ => npl}/Mystery.gif | Bin .../{ => npl}/Non-fiction-large-print.gif | Bin .../itemtypeimg/{ => npl}/Non-fiction.gif | Bin .../prog/itemtypeimg/{ => npl}/PB.gif | Bin .../prog/itemtypeimg/{ => npl}/PF.gif | Bin .../prog/itemtypeimg/{ => npl}/Pamphlet.gif | Bin .../{ => npl}/Paperback-romance.gif | Bin .../prog/itemtypeimg/{ => npl}/Rare-Book.gif | Bin .../prog/itemtypeimg/{ => npl}/Reference.gif | Bin .../prog/itemtypeimg/{ => npl}/SIRS.gif | Bin .../prog/itemtypeimg/{ => npl}/SS.gif | Bin .../{ => npl}/ScienceFictionFantasy.gif | Bin .../prog/itemtypeimg/{ => npl}/Video-disc.gif | Bin .../Videocassette-juvenile-non-fiction.gif | Bin .../{ => npl}/Videocassette-juvenile.gif | Bin .../{ => npl}/Videocassette-non-fiction.gif | Bin .../itemtypeimg/{ => npl}/Videocassette.gif | Bin .../{ => npl}/Vinyl-Sound-Recordings.gif | Bin .../prog/itemtypeimg/{ => npl}/WEB.gif | Bin .../prog/itemtypeimg/{ => npl}/Western.gif | Bin .../prog/itemtypeimg/{ => npl}/YA.gif | Bin .../prog/itemtypeimg/{ => npl}/YAC.gif | Bin .../{ => npl}/Young-Adult-fiction.gif | Bin .../{ => npl}/Young-Adult-non-fiction.gif | Bin t/icondirectories.t | 62 +++++++++++++++ 238 files changed, 134 insertions(+), 24 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/bridge/2d_art.gif create mode 100644 koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/bridge/3d_art.gif create mode 100644 koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/bridge/archive.gif create mode 100644 koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/bridge/book.gif create mode 100644 koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/bridge/cd_music.gif create mode 100644 koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/bridge/computer_file.gif create mode 100644 koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/bridge/digital_audio.gif create mode 100644 koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/bridge/dvd.gif create mode 100644 koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/bridge/e_book.gif create mode 100644 koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/bridge/e_journal.gif create mode 100644 koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/bridge/kit.gif create mode 100644 koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/bridge/laserdisk.gif create mode 100644 koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/bridge/map.gif create mode 100644 koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/bridge/periodical.gif create mode 100644 koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/bridge/score.gif create mode 100644 koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/bridge/sound.gif create mode 100644 koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/bridge/tape_music.gif create mode 100644 koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/bridge/vhs.gif create mode 100644 koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/bridge/vinyl_music.gif create mode 100644 koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/bridge/web.gif create mode 100644 koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/liblime-kids/.DS_Store create mode 100644 koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/liblime-kids/addtobasket.gif create mode 100644 koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/liblime-kids/addtoshelf.gif create mode 100644 koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/liblime-kids/audiobook-cd.gif create mode 100644 koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/liblime-kids/audiobook.gif create mode 100644 koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/liblime-kids/beginner-reader-book.gif create mode 100644 koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/liblime-kids/big-book-icon.gif create mode 100644 koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/liblime-kids/book-bag.gif create mode 100644 koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/liblime-kids/book-icon-60px.gif create mode 100644 koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/liblime-kids/book-icon-author-search.gif create mode 100644 koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/liblime-kids/book-icon-biography.gif create mode 100644 koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/liblime-kids/book-icon-call-number.gif create mode 100644 koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/liblime-kids/book-icon-mystery.gif create mode 100644 koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/liblime-kids/book-icon-mystery2.gif create mode 100644 koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/liblime-kids/book-icon-non-fiction.gif create mode 100644 koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/liblime-kids/book-icon-scifi-60px.gif create mode 100644 koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/liblime-kids/book-icon-subject-search.gif create mode 100644 koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/liblime-kids/book-icon-title-search.gif create mode 100644 koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/liblime-kids/book-icon-western.gif create mode 100644 koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/liblime-kids/book-large-print.gif create mode 100644 koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/liblime-kids/brief..gif create mode 100644 koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/liblime-kids/card.gif create mode 100644 koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/liblime-kids/clear-book-bag.gif create mode 100644 koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/liblime-kids/detail.gif create mode 100644 koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/liblime-kids/faculty-course-materials.gif create mode 100644 koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/liblime-kids/icon-reference.gif create mode 100644 koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/liblime-kids/keyword-search.gif create mode 100644 koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/liblime-kids/music-CD.gif create mode 100644 koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/liblime-kids/newspaper-icon.gif create mode 100644 koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/liblime-kids/videocassette.gif create mode 100644 koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/liblime-kids/vinyl-sound-recordings.gif rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/AF.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/AV.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/AVA.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/AVJ.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/AVJNF.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/AVNF.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/Audiobook.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/Biography.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/Book-on-CD.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/Book-on-Tape.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/CD-ROM-software.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/CDM.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/DVD.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/EASY.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/EDLS.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/Ed.-Curriculum.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/FLAG.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/Faculty-Course-Materials.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/Fiction-large-print.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/Fiction.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/JB.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/JF.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/JNF.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/JREF.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/Juvenile-audiobook.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/Juvenile-biography.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/Juvenile-book-tape-kit.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/Juvenile-fiction.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/Juvenile-non-fiction.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/Juvenile-picture-books.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/Juvenile-reference.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/KIT.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/LP.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/LPNF.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/Local-history.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/MAG.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/MFLM.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/MZ.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/Magazine.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/Microfiche.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/Microfilm.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/Music-CD.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/Mystery.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/Non-fiction-large-print.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/Non-fiction.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/PB.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/PF.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/Pamphlet.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/Paperback-romance.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/Rare-Book.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/Reference.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/SIRS.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/SS.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/ScienceFictionFantasy.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/Video-disc.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/Videocassette-juvenile-non-fiction.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/Videocassette-juvenile.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/Videocassette-non-fiction.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/Videocassette.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/Vinyl-Sound-Recordings.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/WEB.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/Western.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/YA.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/YAC.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/Young-Adult-fiction.gif (100%) rename koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/{ => npl}/Young-Adult-non-fiction.gif (100%) create mode 100644 koha-tmpl/opac-tmpl/prog/itemtypeimg/bridge/2d_art.gif create mode 100644 koha-tmpl/opac-tmpl/prog/itemtypeimg/bridge/3d_art.gif create mode 100644 koha-tmpl/opac-tmpl/prog/itemtypeimg/bridge/archive.gif create mode 100644 koha-tmpl/opac-tmpl/prog/itemtypeimg/bridge/book.gif create mode 100644 koha-tmpl/opac-tmpl/prog/itemtypeimg/bridge/cd_music.gif create mode 100644 koha-tmpl/opac-tmpl/prog/itemtypeimg/bridge/computer_file.gif create mode 100644 koha-tmpl/opac-tmpl/prog/itemtypeimg/bridge/digital_audio.gif create mode 100644 koha-tmpl/opac-tmpl/prog/itemtypeimg/bridge/dvd.gif create mode 100644 koha-tmpl/opac-tmpl/prog/itemtypeimg/bridge/e_book.gif create mode 100644 koha-tmpl/opac-tmpl/prog/itemtypeimg/bridge/e_journal.gif create mode 100644 koha-tmpl/opac-tmpl/prog/itemtypeimg/bridge/kit.gif create mode 100644 koha-tmpl/opac-tmpl/prog/itemtypeimg/bridge/laserdisk.gif create mode 100644 koha-tmpl/opac-tmpl/prog/itemtypeimg/bridge/map.gif create mode 100644 koha-tmpl/opac-tmpl/prog/itemtypeimg/bridge/periodical.gif create mode 100644 koha-tmpl/opac-tmpl/prog/itemtypeimg/bridge/score.gif create mode 100644 koha-tmpl/opac-tmpl/prog/itemtypeimg/bridge/sound.gif create mode 100644 koha-tmpl/opac-tmpl/prog/itemtypeimg/bridge/tape_music.gif create mode 100644 koha-tmpl/opac-tmpl/prog/itemtypeimg/bridge/vhs.gif create mode 100644 koha-tmpl/opac-tmpl/prog/itemtypeimg/bridge/vinyl_music.gif create mode 100644 koha-tmpl/opac-tmpl/prog/itemtypeimg/bridge/web.gif create mode 100644 koha-tmpl/opac-tmpl/prog/itemtypeimg/liblime-kids/.DS_Store create mode 100644 koha-tmpl/opac-tmpl/prog/itemtypeimg/liblime-kids/addtobasket.gif create mode 100644 koha-tmpl/opac-tmpl/prog/itemtypeimg/liblime-kids/addtoshelf.gif create mode 100644 koha-tmpl/opac-tmpl/prog/itemtypeimg/liblime-kids/audiobook-cd.gif create mode 100644 koha-tmpl/opac-tmpl/prog/itemtypeimg/liblime-kids/audiobook.gif create mode 100644 koha-tmpl/opac-tmpl/prog/itemtypeimg/liblime-kids/beginner-reader-book.gif create mode 100644 koha-tmpl/opac-tmpl/prog/itemtypeimg/liblime-kids/big-book-icon.gif create mode 100644 koha-tmpl/opac-tmpl/prog/itemtypeimg/liblime-kids/book-bag.gif create mode 100644 koha-tmpl/opac-tmpl/prog/itemtypeimg/liblime-kids/book-icon-60px.gif create mode 100644 koha-tmpl/opac-tmpl/prog/itemtypeimg/liblime-kids/book-icon-author-search.gif create mode 100644 koha-tmpl/opac-tmpl/prog/itemtypeimg/liblime-kids/book-icon-biography.gif create mode 100644 koha-tmpl/opac-tmpl/prog/itemtypeimg/liblime-kids/book-icon-call-number.gif create mode 100644 koha-tmpl/opac-tmpl/prog/itemtypeimg/liblime-kids/book-icon-mystery.gif create mode 100644 koha-tmpl/opac-tmpl/prog/itemtypeimg/liblime-kids/book-icon-mystery2.gif create mode 100644 koha-tmpl/opac-tmpl/prog/itemtypeimg/liblime-kids/book-icon-non-fiction.gif create mode 100644 koha-tmpl/opac-tmpl/prog/itemtypeimg/liblime-kids/book-icon-scifi-60px.gif create mode 100644 koha-tmpl/opac-tmpl/prog/itemtypeimg/liblime-kids/book-icon-subject-search.gif create mode 100644 koha-tmpl/opac-tmpl/prog/itemtypeimg/liblime-kids/book-icon-title-search.gif create mode 100644 koha-tmpl/opac-tmpl/prog/itemtypeimg/liblime-kids/book-icon-western.gif create mode 100644 koha-tmpl/opac-tmpl/prog/itemtypeimg/liblime-kids/book-large-print.gif create mode 100644 koha-tmpl/opac-tmpl/prog/itemtypeimg/liblime-kids/brief..gif create mode 100644 koha-tmpl/opac-tmpl/prog/itemtypeimg/liblime-kids/card.gif create mode 100644 koha-tmpl/opac-tmpl/prog/itemtypeimg/liblime-kids/clear-book-bag.gif create mode 100644 koha-tmpl/opac-tmpl/prog/itemtypeimg/liblime-kids/detail.gif create mode 100644 koha-tmpl/opac-tmpl/prog/itemtypeimg/liblime-kids/faculty-course-materials.gif create mode 100644 koha-tmpl/opac-tmpl/prog/itemtypeimg/liblime-kids/icon-reference.gif create mode 100644 koha-tmpl/opac-tmpl/prog/itemtypeimg/liblime-kids/keyword-search.gif create mode 100644 koha-tmpl/opac-tmpl/prog/itemtypeimg/liblime-kids/music-CD.gif create mode 100644 koha-tmpl/opac-tmpl/prog/itemtypeimg/liblime-kids/newspaper-icon.gif create mode 100644 koha-tmpl/opac-tmpl/prog/itemtypeimg/liblime-kids/videocassette.gif create mode 100644 koha-tmpl/opac-tmpl/prog/itemtypeimg/liblime-kids/vinyl-sound-recordings.gif rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/AF.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/AV.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/AVA.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/AVJ.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/AVJNF.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/AVNF.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/Audiobook.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/Biography.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/Book-on-CD.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/Book-on-Tape.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/CD-ROM-software.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/CDM.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/DVD.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/EASY.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/EDLS.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/Ed.-Curriculum.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/FLAG.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/Faculty-Course-Materials.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/Fiction-large-print.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/Fiction.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/JB.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/JF.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/JNF.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/JREF.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/Juvenile-audiobook.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/Juvenile-biography.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/Juvenile-book-tape-kit.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/Juvenile-fiction.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/Juvenile-non-fiction.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/Juvenile-picture-books.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/Juvenile-reference.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/KIT.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/LP.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/LPNF.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/Local-history.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/MAG.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/MFLM.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/MZ.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/Magazine.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/Microfiche.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/Microfilm.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/Music-CD.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/Mystery.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/Non-fiction-large-print.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/Non-fiction.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/PB.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/PF.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/Pamphlet.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/Paperback-romance.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/Rare-Book.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/Reference.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/SIRS.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/SS.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/ScienceFictionFantasy.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/Video-disc.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/Videocassette-juvenile-non-fiction.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/Videocassette-juvenile.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/Videocassette-non-fiction.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/Videocassette.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/Vinyl-Sound-Recordings.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/WEB.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/Western.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/YA.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/YAC.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/Young-Adult-fiction.gif (100%) rename koha-tmpl/opac-tmpl/prog/itemtypeimg/{ => npl}/Young-Adult-non-fiction.gif (100%) create mode 100644 t/icondirectories.t diff --git a/admin/itemtypes.pl b/admin/itemtypes.pl index daec44ee82..5ac15f93b3 100755 --- a/admin/itemtypes.pl +++ b/admin/itemtypes.pl @@ -44,6 +44,7 @@ use strict; use CGI; use List::Util qw/min/; +use File::Spec; use C4::Koha; use C4::Context; @@ -63,6 +64,35 @@ sub StringSearch { # like [ fetchrow_hashref(), fetchrow_hashref() ... ] } +sub getImagesFromDirectory { + my $directoryname = shift; + return unless defined $directoryname; + return unless -d $directoryname; + + if ( opendir ( my $dh, $directoryname ) ) { + my @images = grep { /\.(gif|png)$/i } readdir( $dh ); + closedir $dh; + return @images; + } else { + warn "unable to opendir $directoryname: $!"; + return; + } +} +sub getSubdirectoryNames { + my $directoryname = shift; + return unless defined $directoryname; + return unless -d $directoryname; + + if ( opendir ( my $dh, $directoryname ) ) { + my @directories = grep { -d File::Spec->catfile( $directoryname, $_ ) && ! ( /^\./ ) } readdir( $dh ); + closedir $dh; + return @directories; + } else { + warn "unable to opendir $directoryname: $!"; + return; + } +} + my $input = new CGI; my $searchfield = $input->param('description'); my $script_name = "/cgi-bin/koha/admin/itemtypes.pl"; @@ -105,31 +135,35 @@ if ( $op eq 'add_form' ) { my $src = "intranet"; # so that the getitemtypeimage functions know where they were called from -fbcit my $imagedir_filesystem = getitemtypeimagedir($src); my $imagedir_web = getitemtypeimagesrc($src); - opendir( DIR, $imagedir_filesystem ) - or warn "cannot opendir " . $imagedir_filesystem . ": " . $!; - my @imagelist; - my $i = 0; - my $image_per_line = 12; - while ( my $line = readdir(DIR) ) { - $i++; - if ( $line =~ /\.(gif|png)$/i ) { + + my @imagesets = (); # list of hasrefs of image set data to pass to template + my @subdirectories = getSubdirectoryNames( $imagedir_filesystem ); + + foreach my $imagesubdir ( @subdirectories ) { + my @imagelist = (); # hashrefs of image info + my $i = 0; # counter + my $image_per_line = 12; # max images in a line? + my @imagenames = getImagesFromDirectory( File::Spec->catfile( $imagedir_filesystem, $imagesubdir ) ); + foreach my $thisimage ( @imagenames ) { + $i++; if ( $i == $image_per_line ) { $i = 0; push @imagelist, { KohaImage => '', KohaImageSrc => '' }; - } - else { + } else { push( - @imagelist, - { - KohaImage => $line, - KohaImageSrc => $imagedir_web . '/' . $line, - checked => $line eq $data->{imageurl} ? 1 : 0, - } - ); + @imagelist, + { + KohaImage => "$imagesubdir/$thisimage", + KohaImageSrc => join( '/', $imagedir_web, $imagesubdir, $thisimage ), + checked => "$imagesubdir/$thisimage" eq $data->{imageurl} ? 1 : 0, + } + ); } } + push @imagesets, { imagesetname => $imagesubdir, + images => \@imagelist }; + } - closedir DIR; my $remote_image = undef; if ( defined $data->{imageurl} and $data->{imageurl} =~ /^http/i ) { @@ -145,7 +179,7 @@ if ( $op eq 'add_form' ) { imageurl => $data->{'imageurl'}, template => C4::Context->preference('template'), summary => $data->{summary}, - IMAGESLOOP => \@imagelist, + imagesets => \@imagesets, remote_image => $remote_image, ); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tmpl index 068ae93cec..23a99f0ef8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tmpl @@ -76,7 +76,7 @@

Development team