WIP
[ikiwiki.git] / templates / editpage.tmpl
1 <link rel="stylesheet" href="http://localhost/~joey/tmp/blueimp-jQuery-File-Upload-7f89121/jquery-ui.css" id="theme"> 
2 <link rel="stylesheet" href="http://localhost/~joey/tmp/blueimp-jQuery-File-Upload-7f89121/jquery.fileupload-ui.css"> 
3 <TMPL_VAR JAVASCRIPT>
4 <TMPL_VAR MESSAGE>
5 <br />
6 <TMPL_VAR FORM-START>
7 <TMPL_VAR FIELD-DO>
8 <TMPL_VAR FIELD-SID>
9 <TMPL_VAR FIELD-FROM>
10 <TMPL_VAR FIELD-RCSINFO>
11 <TMPL_VAR FIELD-NEWFILE>
12 <TMPL_IF NAME="PAGE_SELECT">
13 <label for="page" class="inline">Page location:</label><TMPL_VAR FIELD-PAGE>
14 <label for="type" class="inline">Page type:</label><TMPL_VAR FIELD-TYPE>
15 <TMPL_ELSE>
16 <TMPL_VAR FIELD-PAGE>
17 <TMPL_VAR FIELD-TYPE>
18 </TMPL_IF>
19 <div class="editcontentdiv">
20 <TMPL_VAR FIELD-EDITCONTENT><br />
21 </div>
22 <TMPL_IF NAME="CAN_COMMIT">
23 <label for="editmessage" class="block">Optional comment about this change:</label>
24 <TMPL_VAR FIELD-EDITMESSAGE><br />
25 </TMPL_IF>
26 <TMPL_VAR FORM-SUBMIT>
27 <TMPL_VAR HELPONFORMATTINGLINK>
28 <TMPL_IF NAME="FIELD-ATTACHMENT">
29 <a class="toggle" href="#attachments">Attachments</a>
30 <noscript>
31 <tr><td colspan="5"><TMPL_VAR FIELD-ATTACHMENT><TMPL_VAR FIELD-UPLOAD></td></tr>
32 </noscript>
33 <div class="<TMPL_VAR ATTACHMENTS-CLASS>" id="attachments">
34 <div id="fileupload"> 
35 <div class="fileupload-buttonbar"> 
36 <label class="fileinput-button"> 
37 <span>Add files...</span> 
38 <input type="file" name="attachments" multiple> 
39 </label> 
40 <button type="submit" class="start">Start upload</button> 
41 <button type="reset" class="cancel">Cancel upload</button> 
42 <TMPL_IF NAME="ATTACHMENT_LIST">
43 <TMPL_VAR FIELD-LINK><TMPL_VAR FIELD-RENAME><TMPL_VAR FIELD-REMOVE>
44 </TMPL_IF>
45 </div> 
46 <script id="template-upload" type="text/x-jquery-tmpl"> 
47     <tr class="template-upload{{if error}} ui-state-error{{/if}}">
48         <td><input type="checkbox" name="dummy" />${name}</td>
49         <td>${sizef}</td>
50         {{if error}}
51             <td class="error" colspan="2">Error:
52                 {{if error === 'maxFileSize'}}File is too big
53                 {{else error === 'minFileSize'}}File is too small
54                 {{else error === 'acceptFileTypes'}}Filetype not allowed
55                 {{else error === 'maxNumberOfFiles'}}Max number of files exceeded
56                 {{else}}${error}
57                 {{/if}}
58             </td>
59         {{else}}
60             <td class="progress"><div></div></td>
61             <td class="start"><button>Start</button></td>
62         {{/if}}
63         <td class="cancel"><button>Cancel</button></td>
64     </tr>
65 </script> 
66 <script id="template-download" type="text/x-jquery-tmpl"> 
67     <tr class="template-download{{if error}} ui-state-error{{/if}}">
68         <td><input type="checkbox" name="attachment_select" value="${name}" />${name}</td>
69         <td>${humansize}</td>
70         {{if error}}
71             <td class="error" colspan="2">Error:
72                 {{if error === 1}}File exceeds upload_max_filesize (php.ini directive)
73                 {{else error === 2}}File exceeds MAX_FILE_SIZE (HTML form directive)
74                 {{else error === 3}}File was only partially uploaded
75                 {{else error === 4}}No File was uploaded
76                 {{else error === 5}}Missing a temporary folder
77                 {{else error === 6}}Failed to write file to disk
78                 {{else error === 7}}File upload stopped by extension
79                 {{else error === 'maxFileSize'}}File is too big
80                 {{else error === 'minFileSize'}}File is too small
81                 {{else error === 'acceptFileTypes'}}Filetype not allowed
82                 {{else error === 'maxNumberOfFiles'}}Max number of files exceeded
83                 {{else error === 'uploadedBytes'}}Uploaded bytes exceed file size
84                 {{else error === 'emptyResult'}}Empty file upload result
85                 {{else}}${error}
86                 {{/if}}
87             </td>
88         {{else}}
89             <td>${stored_msg}</td>
90         {{/if}}
91     </tr>
92 </script> 
93 <script src="http://localhost/~joey/tmp/blueimp-jQuery-File-Upload-7f89121/jquery.min.js"></script> 
94 <script src="http://localhost/~joey/tmp/blueimp-jQuery-File-Upload-7f89121/jquery-ui.min.js"></script> 
95 <script src="http://localhost/~joey/tmp/blueimp-jQuery-File-Upload-7f89121/jquery.tmpl.min.js"></script> 
96 <script src="http://localhost/~joey/tmp/blueimp-jQuery-File-Upload-7f89121/jquery.iframe-transport.js"></script> 
97 <script src="http://localhost/~joey/tmp/blueimp-jQuery-File-Upload-7f89121/jquery.fileupload.js"></script> 
98 <script src="http://localhost/~joey/tmp/blueimp-jQuery-File-Upload-7f89121/jquery.fileupload-ui.js"></script> 
99 <script>
100 $(function () { $('#fileupload').fileupload(); }); // initialize upload widget
101 </script>
102 <div class="fileupload-content">
103 <table class="files">
104 <TMPL_LOOP NAME="ATTACHMENT_LIST">
105 <tr><td><input type="checkbox" name="attachment_select" value="<TMPL_VAR NAME ESCAPE="HTML">" /><TMPL_VAR LINK></td><td><TMPL_VAR SIZE></td><td><TMPL_VAR MTIME></td></tr>
106 </TMPL_LOOP>
107 </table>
108 </div>
109 </div> 
110 </div>
111 </TMPL_IF>
112 <TMPL_VAR FORM-END>
113 <TMPL_VAR WMD_PREVIEW>
114 <TMPL_IF NAME="PAGE_PREVIEW">
115 <hr />
116 <div class="header">
117 <span>Page preview:</span>
118 </div>
119 <div id="preview">
120 <TMPL_VAR PAGE_PREVIEW>
121 </div>
122 </TMPL_IF>
123 <TMPL_IF NAME="PAGE_DIFF">
124 <hr />
125 <div class="header">
126 <span>Diff:</span>
127 </div>
128 <div id="diff">
129 <TMPL_VAR PAGE_DIFF>
130 </div>
131 </TMPL_IF>