]> git.evergreen-ils.org Git - Evergreen.git/blob - docs-antora/modules/admin_initial_setup/pages/KidsOPAC.adoc
LP#1848524: Docs: Add missing file from TechRef directory
[Evergreen.git] / docs-antora / modules / admin_initial_setup / pages / KidsOPAC.adoc
1 == Kid's OPAC Configuration ==
2
3 === Configuration ===
4
5 ==== Apache ====
6
7 The KPAC is already included and ready to be used with new Evergreen installs.  So you only need to change the apache config
8 if you need to change template locations or if you want to use a different *kpac.xml* config file.  The defaults for the KPAC are set
9 in */etc/apache2/eg_vhosts.conf*.
10
11 ------------------------------------------------------------------------------
12 <Location /eg/kpac>
13     PerlSetVar OILSWebContextLoader "OpenILS::WWW::EGKPacLoader"
14     PerlSetVar KPacConfigFile "/openils/conf/kpac.xml.example"
15 </Location>
16 ------------------------------------------------------------------------------
17
18 ==== XML Configuration File ====
19
20     * The XML configuration file defines the layout of the kid's OPAC.
21     * It is read with each restart/reload of the Apache web server.
22     * The file lives by default at /openils/conf/kpac.xml.example
23     * There are two top-level elements: <pages> and <layout>.
24     * The layout defines the owning org unit and the start page, both by ID.
25     * At runtime, the layout is determined by the context org unit.  If no 
26       configuration is defined for the context org unit, the layout for the 
27       closest ancestor is used.
28
29 [source, xml]
30 ------------------------------------------------------------------------------
31 <layout owner="1" page="1"/>
32 ------------------------------------------------------------------------------
33
34     * The pages section is a container for <page> elements.
35     * Each page defines an ID, the number of columns to display for the page, 
36       the page name, and an icon.
37
38 [source, xml]
39 ------------------------------------------------------------------------------
40 <page id="1" columns="5" name="Home" img="/images/home.jpg">
41 ------------------------------------------------------------------------------
42
43     * Each page is a container of cells
44     * Each cell defines
45         ** type (topic, search, link)
46         ** name
47         ** icon
48         ** content
49     * The content for type="topic" cells is the ID of the page this topic
50       jumps to.  The name and img for the referenced page is used as the 
51       display content.
52
53 [source, xml]
54 ------------------------------------------------------------------------------
55 <cell type="topic">12</cell>
56 ------------------------------------------------------------------------------
57
58     * The content for type="search" cells is the search query.  The name and 
59       img are used for the display content.
60
61 [source, xml]
62 ------------------------------------------------------------------------------
63 <cell name="Piano" img="category.png" type="search">su:piano</cell>
64 ------------------------------------------------------------------------------
65
66     * The content for type="link" cells is the URL.  The name and img are used 
67     for the display content.
68
69 [source, xml]
70 ------------------------------------------------------------------------------
71 <cell name="Clarinet" img="category.png" 
72     type="link">http://en.wikipedia.org/wiki/Clarinet</cell>
73 ------------------------------------------------------------------------------
74
75
76 ==== Skin Configuration ====
77
78 The following example enables you to configure the alternate skin (Monster Skin, kpac2) for the Kids
79 Catalog.
80
81 You should be familiar with how the <<_how_to_override_templates,Evergreen TPAC handles template folders>> 
82 before you make these changes.
83
84 If you already have a custom template directory setup you can copy the *Open-ILS/examples/web/templates/kpac* 
85 files to that directory instead, and then skip any Apache config changes. 
86
87 [source, bash]
88 ------------------------------------------------------------------------------
89 % cp -r Open-ILS/examples/web/css/skin/kpac2 /openils/var/web/css/skin/
90 % cp -r Open-ILS/examples/web/images/kpac/* /openils/var/web/images/kpac/ #does not clobber
91 % mkdir /openils/var/templates_kpac2
92 % cp -r Open-ILS/examples/web/templates/kpac /openils/var/templates_kpac2/
93 % cp -r /openils/var/web/css/skin/default/kpac/fonts /openils/var/web/css/skin/kpac2/kpac
94 ------------------------------------------------------------------------------
95
96 Then set up 443/80 vhosts for serving the alternate skin in eg.conf, something
97 along the lines of:
98
99 ------------------------------------------------------------------------------
100 <VirtualHost *:80>
101     ServerName xyz.dev198.esilibrary.com:80
102     DocumentRoot /openils/var/web/
103     DirectoryIndex index.html index.xhtml
104     Include eg_vhost.conf
105     <Location /eg/kpac>
106         #Point to a different kpac.xml config file if needed
107         #PerlSetVar KPacConfigFile "/openils/conf/kpac.xml.example"
108         PerlAddVar OILSWebTemplatePath "/openils/var/templates_kpac2"
109     </Location>
110 </VirtualHost>
111 ------------------------------------------------------------------------------
112
113 === Considerations for Community Adoption ===
114
115 The templates for the Kid's OPAC were developed long before the TPAC was 
116 integrated into Evergreen and it has many of the same limitations that 
117 were part of the TPAC.  
118
119     * Fixed width elements (divs, images, etc.), which complicates the 
120       addition of new features and local customizations.  
121     * Images with text, which prevents l10n/i18n.
122     * While the KPAC does not attempt to match the color scheme of any one
123       institution, it's inconsistent with the standard Evergreen color 
124       palette.  Creating an additional skin to act as the Evergreen default
125       my be necessary.
126
127 === Outstanding Development (Unsponsored) ===
128
129     ** Port the XML configuration file to a DB structure, complete with UI for
130        managing the various components and upgrade path.
131