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