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