JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
metaform: auto-add "back to listing" links
[wfpl.git] / metaform / template.html
index cf0ffcb..c1e5396 100644 (file)
@@ -4,31 +4,15 @@
 <head>
        <title><!--~~title show {~~-->~plural cap~<!--~~}~~--></title>
        <link rel="stylesheet" href="style.css" type="text/css"><!--~html_editor_headers {~--><!--~~extra_headers {~~-->
-       <script type="text/javascript" src="code/tiny_mce/tiny_mce.js"></script>
+       <script type="text/javascript" src="code/ckeditor/ckeditor.js"></script>
        <script language="javascript" type="text/javascript">
-//<![CDATA[
-               tinyMCE.init({
-                       mode : 'textareas',
-                       theme : 'advanced',
-                       plugins : 'contextmenu,table,filemanager',
-                       file_browser_callback : "fileBrowserCallBack",
-                       editor_selector : 'html_editor',
-                       gecko_spellcheck : true,
-                       object_resizing : false,
-                       theme_advanced_toolbar_location : "top",
-                       theme_advanced_toolbar_align : "left",
-                       theme_advanced_path_location : "bottom",
-                       inline_styles : true,
-                       theme_advanced_blockformats : "p,h1,h2,h3,pre",
-                       theme_advanced_buttons3 : "hr,removeformat,visualaid,|,tablecontrols,|,charmap",
-                       doctype: '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',
-                       content_css : 'style.css',
-                       button_tile_map : true,
-                       //document_base_url : 'http://example.com/',
-                       width: '448',
-                       height: '550',
-               });
-//]]>
+               function make_wysiwyg(name) {
+                       CKEDITOR.replace(name, {
+                               'uiColor': '#ccccff',
+                               'removePlugins': 'forms,templates,smiley,pagebreak,save,newpage,preview,print',
+                               'height': '300px'
+                       });
+               }
        </script><!--~~}~~--><!--~}~-->
 </head>
 
        <!--~~}~~--><!--~opt_display {~-->
 
        <!--~~display {~~-->
-               <h2>~singular cap~ details</h2>
+               <h2>~singular cap~ details</h2><!--~opt_listing {~-->
+
+               <p><a href="~file_name~?~file_name~_new=1">Add another ~singular attr~</a></p>
+
+               <p><a href="~file_name~">Back to ~plural attr~</a></p><!--~}~-->
 
                <p><a href="~file_name~?~file_name~_edit_id=~~id attr~~">Edit</a></p>
 
@@ -68,7 +56,9 @@
 <!--~}~--><!--~textarea {~-->
                        <tr><td class="caption">~caption html~:</td><td>~~~name~ htmlbrtab~~</td></tr>
 <!--~}~--><!--~}~-->
-               </table>
+               </table><!--~opt_listing {~-->
+
+               <p><a href="~file_name~">Back to ~plural attr~</a></p><!--~}~-->
 
                <p><a href="~file_name~?~file_name~_edit_id=~~id attr~~">Edit</a></p>
        <!--~~}~~--><!--~}~-->
                        <div class="caption">~caption html~</div>
                        <div class="field"><textarea rows="9" cols="22" name="~name~">~~~name~ html~~</textarea></div><!--~}~--><!--~html {~-->
                        <div class="caption">~caption html~</div>
-                       <div class="field"><textarea class="html_editor" rows="20" cols="50" name="~name~">~~~name~ html~~</textarea></div><!--~}~--><!--~pulldown {~-->
+                               <div class="field_notes">
+                                       <ul>
+                                               <li>If you don't see an editor below (with buttons in it) then please try this page in <a href="http://getfirefox.com">Mozilla FireFox</a> or <a href="http://www.google.com/chrome/">Google Chrome</a>.</li>
+                                               <li>If you're pasting from Microsoft Word, please use the "paste from word" button (4 right of the scissors) instead of the normal paste.</li>
+                                       </ul>
+                               </div>
+                               <div class="field"><textarea class="html_editor" rows="20" cols="50" id="content" name="~name~">~~~name~ html~~</textarea><script type="text/javascript">make_wysiwyg('~name~');</script></div><!--~}~--><!--~pulldown {~-->
                        <div class="caption">~caption html~</div>
                        <div class="field"><select name="~name~"><option value="">Choose One:</option><!--~~~name~ options~~--></select></div><!--~}~--><!--~states {~-->
                        <div class="caption">~caption html~</div>