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