Project

General

Profile

Bug #8177 ยป package.xsl

Harry Coin, 12/09/2017 07:02 PM

 
1
<?xml version="1.0" encoding="utf-8"?>
2
<!DOCTYPE packagegui SYSTEM "../schema/packages.dtd">
3
<!--
4
/* $Id$ */
5
/* ========================================================================== */
6
/*
7
    package.xsl
8
    part of pfSense (https://www.pfsense.org)
9
    Copyright (C) 2004-2014 Electric Sheep Fencing, LLC
10
    Copyright (C) 2007 Daniel S. Haischt <me@daniel.stefan.haischt.name>
11
    All rights reserved.
12

    
13
    Based on m0n0wall (http://m0n0.ch/wall)
14
    Copyright (C) 2003-2006 Manuel Kasper <mk@neon1.net>.
15
    All rights reserved.
16
                                                                              */
17
/* ========================================================================== */
18
/*
19
    Redistribution and use in source and binary forms, with or without
20
    modification, are permitted provided that the following conditions are met:
21

    
22
     1. Redistributions of source code must retain the above copyright notice,
23
        this list of conditions and the following disclaimer.
24

    
25
     2. Redistributions in binary form must reproduce the above copyright
26
        notice, this list of conditions and the following disclaimer in the
27
        documentation and/or other materials provided with the distribution.
28

    
29
    THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
30
    INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
31
    AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
    AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
33
    OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
34
    SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
35
    INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
36
    CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
37
    ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
38
    POSSIBILITY OF SUCH DAMAGE.
39
                                                                              */
40
/* ========================================================================== */
41
-->
42
<xsl:stylesheet
43
    version="1.0"
44
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
45
    xmlns:html="http://www.w3.org/1999/xhtml"
46
    xmlns="http://www.w3.org/1999/xhtml"
47
>
48
    <xsl:output
49
        method="xml"
50
        doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"
51
        doctype-public="-//W3C//DTD XHTML 1.1//EN"
52
    />
53
 
54
    <xsl:template match="/packagegui">
55
        <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
56
            <head>
57
                <meta name="DC.title">
58
                    <xsl:attribute name="content"><xsl:value-of select="//name"/></xsl:attribute>
59
                </meta>
60
                <meta name="DC.creator" content="Daniel S. Haischt" />
61
                <meta name="DC.subject" content="Meta Data" />
62
                <meta name="DC.description" content="Next gen user and group manager for pfSense" />
63
                <meta name="DC.publisher" content="pfSense" />
64
                <meta name="DC.date" content="2007-08-28T21:00:00+02:00" scheme="DCTERMS.W3CDTF" />
65
                <meta name="DC.type" content="Text" scheme="DCTERMS.DCMIType" />
66
                <meta name="DC.format" content="text/html" scheme="DCTERMS.IMT" />
67
                <meta name="DC.language" content="en" scheme="DCTERMS.RFC3066" />
68
                <meta name="DC.relation" content="http://dublincore.org/" scheme="DCTERMS.URI" />
69
                <meta name="DC.coverage" content="Munich" scheme="DCTERMS.TGN" />
70
                <meta name="DC.rights" content="All rights reserved" />
71
                <meta http-equiv="Keywords" content="bsd license, altq, traffic shaping, packet, rule, Linux, OpenBSD, DragonFlyBSD, freebsd 5.3, vpn, stateful failover, carp, packet filter, m0n0wall, firewall" />
72
                <style type="text/css">
73
                </style>
74
                <script type="text/javascript" language="utf-8">
75
                //<![CDATA[
76
                    function toggleContentItem(whichItem) {
77
                        var element = document.getElementById(whichItem);
78

    
79
                        element.style.visibility = 'visible';
80
                        element.style.display = 'block';
81
                        element.style.top = '0';
82
                        element.className = 'highLight';
83

    
84
                        if (whichItem != 'info-div') {
85
                            document.getElementById('info-div').style.visibility = 'hidden';
86
                            document.getElementById('info-div').style.display = 'none';
87
                            document.getElementById('info-div').className = '';
88
                        }
89
                        if (whichItem != 'license-div') {
90
                            document.getElementById('license-div').style.visibility = 'hidden';
91
                            document.getElementById('license-div').style.display = 'none';
92
                            document.getElementById('license-div').className = '';
93
                        }
94
                        if (whichItem != 'desc-div') {
95
                            document.getElementById('desc-div').style.visibility = 'hidden';
96
                            document.getElementById('desc-div').style.display = 'none';
97
                            document.getElementById('desc-div').className = '';
98
                        }
99
                        if (whichItem != 'req-div') {
100
                            document.getElementById('req-div').style.visibility = 'hidden';
101
                            document.getElementById('req-div').style.display = 'none';
102
                            document.getElementById('req-div').className = '';
103
                        }
104
                        if (whichItem != 'faq-div') {
105
                            document.getElementById('faq-div').style.visibility = 'hidden';
106
                            document.getElementById('faq-div').style.display = 'none';
107
                            document.getElementById('faq-div').className = '';
108
                        }
109
                        if (whichItem != 'files-div') {
110
                            document.getElementById('files-div').style.visibility = 'hidden';
111
                            document.getElementById('files-div').style.display = 'none';
112
                            document.getElementById('files-div').className = '';
113
                        }
114
                        if (whichItem != 'menu-div') {
115
                            document.getElementById('menu-div').style.visibility = 'hidden';
116
                            document.getElementById('menu-div').style.display = 'none';
117
                            document.getElementById('menu-div').className = '';
118
                        }
119
                        if (whichItem != 'tab-div') {
120
                            document.getElementById('tab-div').style.visibility = 'hidden';
121
                            document.getElementById('tab-div').style.display = 'none';
122
                            document.getElementById('tab-div').className = '';
123
                        }
124
                        if (whichItem != 'service-div') {
125
                            document.getElementById('service-div').style.visibility = 'hidden';
126
                            document.getElementById('service-div').style.display = 'none';
127
                            document.getElementById('service-div').className = '';
128
                        }
129
                        if (whichItem != 'rsync-div') {
130
                            document.getElementById('rsync-div').style.visibility = 'hidden';
131
                            document.getElementById('rsync-div').style.display = 'none';
132
                            document.getElementById('rsync-div').className = '';
133
                        }
134
                        if (whichItem != 'install-div') {
135
                            document.getElementById('install-div').style.visibility = 'hidden';
136
                            document.getElementById('install-div').style.display = 'none';
137
                            document.getElementById('install-div').className = '';
138
                        }
139
                        if (whichItem != 'deinstall-div') {
140
                            document.getElementById('deinstall-div').style.visibility = 'hidden';
141
                            document.getElementById('deinstall-div').style.display = 'none';
142
                            document.getElementById('deinstall-div').className = '';
143
                        }
144
                    }
145
                ]]>
146
                </script>
147
            </head>
148
            <body style="color: rgb(0, 0, 0); background-color: rgb(51, 51, 51);" alink="#cc0000" link="#cc0000" vlink="#cc0000">
149
                <table style="width: 802px; text-align: left; margin-left: auto; margin-right: auto;" border="0" cellpadding="0" cellspacing="0">
150
                    <tbody>
151
                        <tr>
152
                        </tr>
153
                        <tr>
154
                                <font color="#ffffff"><span class="headers"></span></font>
155
                   
156
                        </tr>
157
                        <tr>
158
                            <td>
159
                                <table style="text-align: left; width: 802px;" border="0" cellpadding="0" cellspacing="0">
160
                                    <tbody>
161
                                        <tr>
162
                                            <td style="width: 200px; text-align: center; vertical-align: top;">
163
                                                <table style="width: 90%; text-align: left; margin-left: auto; margin-right: auto;" border="0" cellpadding="0" cellspacing="1">
164
                                                    <tbody>
165
                                                        <tr>
166
                                                            <td class="navigationHead" style="background-color: rgb(153, 0, 0);">Navigation</td>
167
                                                        </tr>
168
                                                        <tr style="padding: 0px; margin: 0px;">
169
                                                            <td height="100%" align="left" valign="top" class="navigation" style="padding: 0px; margin: 0px;">
170
                                                                <br />
171
                                                                <a href='#' id="infoa" onclick="toggleContentItem('info-div');">Info</a>
172
                                                                <a href='#' id="licensea" onclick="toggleContentItem('license-div');">License</a>
173
                                                                <a href='#' id="desca" onclick="toggleContentItem('desc-div');">Description</a>
174
                                                                <a href='#' id="reqa" onclick="toggleContentItem('req-div');">Minimum requirements</a>
175
                                                                <a href='#' id="faqa" onclick="toggleContentItem('faq-div');">FAQ</a>
176
                                                                <a href='#' id="addfilea" onclick="toggleContentItem('files-div');">Additional Files Being Installed</a>
177
                                                                <a href='#' id="addmenua" onclick="toggleContentItem('menu-div');">Menu Items Being Installed</a>
178
                                                                <a href='#' id="addtaba" onclick="toggleContentItem('tab-div');">Tabs Being Installed</a>
179
                                                                <a href='#' id="servicesa" onclick="toggleContentItem('service-div');">Services Being Installed</a>
180
                                                                <a href='#' id="rsynca" onclick="toggleContentItem('rsync-div');">custom_php_resync_config_command</a>
181
                                                                <a href='#' id="installa" onclick="toggleContentItem('install-div');">custom_php_install_command</a>
182
                                                                <a href='#' id="deinstalla" onclick="toggleContentItem('deinstall-div');">custom_php_deinstall_command</a>
183
                                                            </td>
184
                                                        </tr>
185
                                                    </tbody>
186
                                                </table>
187
                                            </td>
188
                                            <td style="text-align: left; vertical-align: top;">
189
                                                <div id="info-div" style="padding-left: 6px; width: 500px;">
190
                                                    <h1>
191
                                                        <xsl:text>Info for package: </xsl:text> 
192
                                                        <xsl:value-of select="//name"/>
193
                                                    </h1>
194
                                                    <h2>Version</h2>
195
                                                    <p>
196
                                                        <xsl:value-of select="//version" />
197
                                                    </p>
198
                                                    <h2>Title</h2>
199
                                                    <p>
200
                                                        <xsl:value-of select="//title" />
201
                                                    </p>
202
                                                    <h2>Include File</h2>
203
                                                    <p>
204
                                                        <xsl:value-of select="//include_file" />
205
                                                    </p>
206
                                                    <h2>Configpath</h2>
207
                                                    <p>
208
                                                        <code>
209
                                                            <xsl:value-of select="//configpath" />
210
                                                        </code>
211
                                                    </p>
212
                                                </div>
213
                                                <div id="license-div" style="padding-left: 6px; width: 500px; display: none; visibility: hidden;">
214
                                                    <h1>License</h1>
215
                                                    <p>
216
                                                        <pre style="font-size: 0.95em;">
217
                                                            <xsl:value-of select="//copyright" />
218
                                                        </pre>
219
                                                    </p>
220
                                                </div>
221
                                                <div id="desc-div" style="padding-left: 6px; width: 500px; display: none; visibility: hidden;">
222
                                                    <h1>Package Description</h1>
223
                                                    <xsl:value-of select="//description" />
224
                                                </div>
225
                                                <div id="req-div" style="padding-left: 6px; width: 500px; display: none; visibility: hidden;">
226
                                                    <h1>Requirements</h1>
227
                                                    <xsl:value-of select="//requirements" />
228
                                                </div>
229
                                                <div id="faq-div" style="padding-left: 6px; width: 500px; display: none; visibility: hidden;">
230
                                                    <h1>Frequently Asked Question</h1>
231
                                                    <xsl:value-of select="//faq" />
232
                                                </div>
233
                                                <div id="files-div" style="padding-left: 6px; width: 500px; display: none; visibility: hidden;">
234
                                                    <h1>Additional Files Being Installed</h1>
235
                                                    <xsl:for-each select="//additional_files_needed">
236
                                                        <p>
237
                                                            <b><xsl:text>Prefix: </xsl:text></b><xsl:value-of select="prefix" /><br />
238
                                                            <b><xsl:text>Chmod: </xsl:text></b><xsl:value-of select="chmod" /><br />
239
                                                            <b><xsl:text>Item: </xsl:text></b><xsl:value-of select="item" /><br />
240
                                                        </p>
241
                                                    </xsl:for-each>
242
                                                </div>
243
                                                <div id="menu-div" style="padding-left: 6px; width: 500px; display: none; visibility: hidden;">
244
                                                    <h1>Menu Items Being Installed</h1>
245
                                                    <xsl:for-each select="//menu">
246
                                                        <p>
247
                                                            <b><xsl:text>Name: </xsl:text></b><xsl:value-of select="name" /><br />
248
                                                            <b><xsl:text>Section: </xsl:text></b><xsl:value-of select="section" /><br />
249
                                                            <b><xsl:text>URL: </xsl:text></b><xsl:value-of select="url" /><br />
250
                                                        </p>
251
                                                    </xsl:for-each>
252
                                                </div> 
253
                                                <div id="tab-div" style="padding-left: 6px; width: 500px; display: none; visibility: hidden;">
254
                                                    <h1>Tabs Being Installed</h1>
255
                                                    <xsl:for-each select="//tabs/tab">
256
                                                        <p>
257
                                                            <b><xsl:text>Text: </xsl:text></b><xsl:value-of select="text" /><br />
258
                                                            <b><xsl:text>URL: </xsl:text></b><xsl:value-of select="url" /><br />
259
                                                            <xsl:if test="active">
260
                                                                <b><xsl:text>Active: </xsl:text></b><xsl:text>YES</xsl:text><br />
261
                                                            </xsl:if>
262
                                                        </p>
263
                                                    </xsl:for-each>
264
                                                </div>
265
                                                <div id="service-div" style="padding-left: 6px; width: 500px; display: none; visibility: hidden;">
266
                                                    <h1>Services Being Installed</h1>
267
                                                    <xsl:for-each select="//service">
268
                                                        <p>
269
                                                            <b><xsl:text>Name: </xsl:text></b><xsl:value-of select="name" /><br />
270
                                                            <b><xsl:text>RC File: </xsl:text></b><xsl:value-of select="rcfile" /><br />
271
                                                        </p>
272
                                                    </xsl:for-each>
273
                                                </div>
274
                                                <div id="rsync-div" style="padding-left: 6px; width: 500px; display: none; visibility: hidden;">
275
                                                    <h1>custom_php_install_command</h1>
276
                                                    <p>
277
                                                        <pre><xsl:value-of select="custom_php_install_command" /></pre>
278
                                                    </p>
279
                                                </div>
280
                                                <div id="install-div" style="padding-left: 6px; width: 500px; display: none; visibility: hidden;">
281
                                                    <h1>custom_php_install_command</h1>
282
                                                    <p>
283
                                                        <pre><xsl:value-of select="custom_php_deinstall_command" /></pre>
284
                                                    </p>
285
                                                </div>
286
                                                <div id="deinstall-div" style="padding-left: 6px; width: 500px; display: none; visibility: hidden;">
287
                                                    <h1>custom_php_deinstall_command</h1>
288
                                                    <p>
289
                                                        <pre><xsl:value-of select="custom_php_deinstall_command" /></pre>
290
                                                    </p>
291
                                                </div>
292
                                            </td>
293
                                            <td width="30px"></td>
294
                                        </tr>
295
                                    </tbody>
296
                                </table>
297
                            </td>
298
                        </tr>
299
                        <tr style="color: rgb(255, 255, 255);">
300
                                pfSense is Copyright 2004-2014 Electric Sheep Fencing LLC. All Rights Reserved.
301
                                <br />
302

    
303
                        </tr>
304
                    </tbody>
305
                </table>
306
            </body>
307
        </html>
308
    </xsl:template>
309
</xsl:stylesheet>
310

    
    (1-1/1)