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