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