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