- Work around JS problem in NS 2.0 (no joke)
[privoxy.git] / templates / edit-actions-list
1 ##############################################################################
2 #
3 # File        :  $Source: /cvsroot/ijbswa/current/templates/edit-actions-list,v $
4 #
5 # Purpose     :  Template used to edit the actions file.
6
7 #
8 # Copyright   :  Written by and Copyright (C) 2001 the SourceForge
9 #                Privoxy team. http://www.privoxy.org/
10 #
11 #                Original Author: Copyright (C) 2001 Jonathan Foster
12 #                http://www.jon-foster.co.uk/
13 #
14 #                This program is free software; you can redistribute it 
15 #                and/or modify it under the terms of the GNU General
16 #                Public License as published by the Free Software
17 #                Foundation; either version 2 of the License, or (at
18 #                your option) any later version.
19 #
20 #                This program is distributed in the hope that it will
21 #                be useful, but WITHOUT ANY WARRANTY; without even the
22 #                implied warranty of MERCHANTABILITY or FITNESS FOR A
23 #                PARTICULAR PURPOSE.  See the GNU General Public
24 #                License for more details.
25 #
26 #                The GNU General Public License should be included with
27 #                this file.  If not, you can view it at
28 #                http://www.gnu.org/copyleft/gpl.html
29 #                or write to the Free Software Foundation, Inc., 59
30 #                Temple Place - Suite 330, Boston, MA  02111-1307, USA.
31 #
32 # Revisions   :
33 #    $Log: edit-actions-list,v $
34 #    Revision 1.27  2002/09/05 16:14:59  oes
35 #    Synced with stable branch:
36 #        Revision 1.26.2.2  2002/08/23 02:22:53  hal9
37 #        Fix a perl brain fart with <li> in comments
38 #
39 #        Revision 1.26.2.1  2002/08/22 23:31:54  hal9
40 #        Add Documentation Link to menu.
41 #
42 #    Revision 1.26  2002/05/23 23:37:25  oes
43 #    Nit
44 #
45 #    Revision 1.25  2002/05/21 21:02:52  oes
46 #    Added more help links
47 #
48 #    Revision 1.24  2002/05/21 19:11:40  oes
49 #     - Added client-side JavaScript versions of edit and add URL forms
50 #     - Moved jump targets to before container table cell
51 #     - Let earu determine the jump target when removing URLs via JS
52 #     - Fixed broken help link
53 #
54 #    Revision 1.23  2002/05/12 15:53:10  jongfoster
55 #    Restoring CVS log information accidentally removed in
56 #    my previous commit.
57 #
58 #    Revision 1.22  2002/05/12 15:45:33  jongfoster
59 #    Applying [Patch 552094] New templates for edit-actions-list
60 #    This cleans up the templates by:
61 #    - Removing the (confusing) alternating color scheme.
62 #    - Making everything left-justified.
63 #
64 #    Revision 1.21  2002/05/03 22:58:15  jongfoster
65 #    Fixing link target in all URLs section
66 #
67 #    Revision 1.20  2002/04/26 12:57:18  oes
68 #     - Central "button" link style in cgi-style.css
69 #     - Help links now dynamic
70 #
71 #    Revision 1.19  2002/04/24 02:19:16  oes
72 #     - Show name of actions file being edited
73 #     - Show context sensitive help
74 #     - Add buttons for easy changing of defaults
75 #     - Cosmetics and clarifications
76 #
77 #    Revision 1.18  2002/04/18 19:21:09  jongfoster
78 #    Added code to detect "conventional" action files, that start
79 #    with a set of actions for all URLs (the pattern "/").
80 #    These are special-cased in the "edit-actions-list" CGI, so
81 #    that a special UI can be written for them.
82 #
83 #    Revision 1.17  2002/04/10 13:32:53  oes
84 #    Made templates modular
85 #
86 #    Revision 1.16  2002/04/08 17:08:14  oes
87 #    Cosmetic: make status in title lowercase
88 #
89 #    Revision 1.15  2002/04/05 16:01:32  oes
90 #    Correct HTML, external Stylesheets, eye candy, some fixes
91 #
92 #    Revision 1.14  2002/03/26 22:29:56  swa
93 #    we have a new homepage!
94 #
95 #    Revision 1.13  2002/03/24 15:23:33  jongfoster
96 #    Name changes
97 #
98 #    Revision 1.12  2002/03/24 11:01:06  swa
99 #    name change
100 #
101 #    Revision 1.11  2002/03/23 16:18:15  swa
102 #    renamed every reference to the old name with foobar.
103 #    fixed "application foobar application" tag, fixed
104 #    "the foobar" with "foobar". left junkbuster in cvs
105 #    comments and remarks to history untouched. should
106 #    make final rename easier.
107 #
108 #    Revision 1.10  2002/03/16 15:22:19  jongfoster
109 #    Moving 'alpha' warning to the end of the page
110 #
111 #    Revision 1.9  2002/03/05 00:24:51  jongfoster
112 #    Patch to always edit the current actions file.
113 #
114 #    Revision 1.8  2002/03/03 10:29:12  swa
115 #    point users to the right feedback forms,
116 #    not necessarily the developer list.
117 #
118 #    Revision 1.7  2002/01/23 00:26:45  jongfoster
119 #    Reducing length of URLs
120 #    Where encoded and unencoded versions of a string existed, removing
121 #    the unencoded one.
122 #
123 #    Revision 1.6  2002/01/17 21:33:00  jongfoster
124 #    Replacing all references to the URL of the config interface
125 #    with @default-cgi@
126 #
127 #    Revision 1.5  2002/01/17 21:21:05  jongfoster
128 #    DOS->Unix line endings
129 #
130 #    Revision 1.4  2001/11/13 00:58:18  jongfoster
131 #    New version of actions file editor templates
132 #
133 #
134 ##############################################################################
135 #
136 # Browser support for the CSS on this page:
137 #   MS Internet Explorer 5.5 - Yes - everything works.
138 #   Netscape 6.2             - Yes - everything works.
139 #   Netscape 4.75            - No  - CSS buttons look really bad, but they are
140 #                                    usable.  Everything else works.
141 #   Opera 5.12               - Yes - everything works.
142 #   MS Internet Explorer 4+  - Untested
143 #   MS IE 3.x, NS3.x         - Untested (Don't support CSS, so everything
144 #                              should work, but will look ugly).
145 #   Mozilla >=0.6            - Yes - everything works.
146 #
147 # All browsers should work, you just might not get the pretty CSS buttons.
148 #
149 # If your favorite browser isn't listed/tested, please test and add it.
150 #
151 #
152 #############################################################################
153 #
154 # Standard support:
155 #
156 # This file currently produces valid HTML 4.01 Strict.
157 #
158 # If you change it, please save the generated page from your web browser
159 # and then upload it to http://validator.w3.org/ for checking.
160 #
161 #############################################################################
162 #
163 # Available variables include:
164 #
165 # filename
166 # ver
167 #
168 #
169 #############################################################################
170 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
171 <html>
172
173 <head>
174   <meta http-equiv="Content-Style-Type" content="text/css">
175   <meta http-equiv="Content-Script-Type" content="text/javascript">
176   <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
177   <meta name="robots" content="noindex,nofollow">
178   <link rel="stylesheet" type="text/css" href="@default-cgi@send-stylesheet">
179
180   <title>Privoxy: Edit actions file @f@.action</title>
181
182   <style type="text/css">
183
184 table.framed {
185   border: solid black 1px;
186   margin: 10px 0px;
187 }
188 tr.actions {
189   background-color: #eeffee;
190 }
191 tr.url {
192   background-color: #ddddff;
193 }
194 tr.adv {
195   background-color: #FFFFD0;
196 }
197 td.header {
198   font-weight: bold;
199   font-size: 110%;
200   padding: 10px 15px 2px 15px;
201 }
202 td.url {
203   font-weight: bold;
204 }
205 td.action {
206   font-weight: bold;
207   font-style: italic;
208   padding: 2px 30px;
209 }
210 td.nbr, td.buttons {
211   white-space: nowrap;
212 }
213 td.indentbuttons {
214   padding: 2px 30px;
215 }
216 </style>
217
218 <script type="text/javascript">
219 <!--
220
221 // Non-JS capable browsers will follow the link to a HTML "are you sure?" page
222 // JavaScript-capable browsers will call this function, which does a
223 // client-side prompt for speed.  It may kick off the delete directly.
224 // It always returns false to cancel following the link.
225 function rm_p(pattern,curtext)
226 {
227    if (window.confirm("Are you sure you want to delete this URL pattern?\nPattern is: "+unescape(curtext)))
228    { window.location.href="edit-actions-remove-url?f=@f@&v=@v@&p="+pattern; }
229    return false;
230 }
231
232 function e_p(pattern,curtext)
233 {
234    if ((newtext=window.prompt("Edit the pattern to your needs:", unescape(curtext))) != null)
235    {
236       if (newtext != "")
237       { window.location.href="edit-actions-url?f=@f@&v=@v@&p="+pattern+"&u="+escape(newtext); }
238       else
239       { window.location.href="edit-actions-remove-url?f=@f@&v=@v@&p="+pattern; }
240    }
241    return false;
242 }
243
244 function a_p(section)
245 {
246    if (((newtext=window.prompt("Enter the new pattern:", "")) != null ) && (newtext != ""))
247    { window.location.href="edit-actions-add-url?f=@f@&v=@v@&s="+section+"&u="+escape(newtext); }
248    return false;
249 }
250
251 //-->
252 </script>
253 </head>
254
255 <body>
256
257   <table cellpadding="20" cellspacing="10" border="0" width="100%">
258     <tr>
259       <td class="title">
260
261 #include mod-title
262
263       </td>
264     </tr>
265
266 <!-- @if-unstable-start -->
267 # This will only appear if CODE_STATUS is "alpha" or "beta". See configure.in
268     <tr>
269       <td class="warning">
270
271 #include mod-unstable-warning
272
273       </td>
274     </tr>
275 <!-- if-unstable-end@ -->
276
277     <tr>
278       <td class="info">
279         <h2>What is all this?</h2>
280         <p>
281          If you haven't already done so, it is <b>strongly recommended</b> that you at 
282          least skim <a href="@user-manual@@actions-help-prefix@ACTIONS-FILE">the
283          chapter on actions files</a> in the <a href="@user-manual@">user manual</a>
284          before making any changes. You will also find a comprehensive list of all available actions
285          there.
286         </p>
287          <!-- @if-all-urls-present-then@ -->
288         <p>
289          Please note that <b>the first section has special importance</b>. It sets the default actions for
290          all URLs. The resulting actions for a particular URL may differ from these defaults if that
291          URL matches again further down, but this section is largely responsible for your browsing
292          experience. Edit manually with great care, or choose from the predefined sets of actions.
293         </p>
294         <!-- @else-not-all-urls-present@@endif-all-urls-present@ -->
295         <!-- @if-default-action-then@ -->
296         <p>
297          This is the default action file. Updates for it are available from
298          <a href="http://www.privoxy.org/">Privoxy.org</a> on a regular basis. 
299          It is therefore <b>not recommended</b> that you add your private
300          rules here, since they will be lost if you install an update in the future.
301          Put your rules in a separate actions file, like <tt>user.action</tt> instead.
302         </p>
303         <!-- @else-not-default-action@@endif-default-action@ -->
304       </td>
305     </tr>
306
307     <tr>
308       <td class="box">
309         <div class="buttons">
310           <h2>Editing Actions File @f@.action</h2>
311           <!-- @if-all-urls-present-then@@else-not-all-urls-present@ -->
312           <p><a class="cmd" href="edit-actions-section-add?f=@f@&amp;v=@v@&amp;s=0">Insert new section at top</a></p>
313           <!-- @endif-all-urls-present@ -->
314         </div>
315       </td>
316     </tr>
317
318     <!-- @if-all-urls-present-then@ -->
319     <tr>
320       <td class="container"><a name="l@all-urls-s@"></a>
321         <table border="0" width="100%" cellspacing="2" cellpadding="3" class="framed">
322           <tr class="actions"><td class="header"><a href="@user-manual@@actions-help-prefix@ACTIONS">Actions</a>:</td></tr>
323           <tr class="actions">
324             <td class="indentbuttons">
325               <a href="eafu?f=@f@&amp;v=@v@&amp;s=@all-urls-s@">Edit</a>
326               @all-urls-buttons@
327             </td>
328           </tr>
329           <tr class="actions"><td class="action">@all-urls-actions@</td></tr>
330           <tr class="url"><td class="header"><a href="@user-manual@@actions-help-prefix@AF-PATTERNS">URL patterns</a>:</td></tr>
331           <tr class="url"><td class="indentbuttons">/ &nbsp; <i>(Matches all requests)</a></td></tr>
332           <tr class="adv"><td class="header">Advanced:</td></tr>
333           <tr class="adv">
334             <td class="indentbuttons">
335               <a href="easa?f=@f@&amp;v=@v@&amp;s=@all-urls-s@#l@all-urls-s-next@">Insert new section below</a>
336             </td>
337           </tr>
338         </table>
339       </td>
340     </tr>
341     <!-- @else-not-all-urls-present@@endif-all-urls-present@ -->
342
343 @sections@
344
345     <tr>
346       <td class="box">
347         <h2>More Privoxy:</h2>
348         <ul>@menu@<li><a href="@user-manual@">Documentation</a></li></ul>
349       </td>
350     </tr>
351
352     <tr>
353       <td class="info">
354
355 #include mod-support-and-service
356
357       </td>
358     </tr>
359
360 <!-- @if-have-help-info-start -->
361     <tr>
362       <td class="info">
363
364 #include mod-local-help
365
366       </td>
367     </tr>
368 <!-- if-have-help-info-end@ -->
369
370     <tr>
371       <td>
372         <small><small>Valid <a href="http://validator.w3.org/">HTML 4.01 Strict</a></small></small>
373       </td>
374     </tr>
375
376   </table>
377 </body>
378
379 </html>