JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
metaform: fix form action with opt_public_form
[wfpl.git] / metaform / template.html
index b2e791f..5bbcb2f 100644 (file)
@@ -75,7 +75,7 @@
        <!--~~form {~~--><!--~form {~-->
                <h2><!--~opt_db {~--><!--~~id unset {~~-->Add a new ~singular~<!--~~}~~--><!--~~id {~~-->Edit ~singular~ "~~~always_field~ html~~"<!--~~}~~--><!--~}~--><!--~opt_db unset {~-->Submit a ~singular~<!--~}~--></h2>
 
-               <form action="~file_name attr~" method="post~enctype_attr~"><!--~opt_db {~--><!--~~id {~~--><div style="display: none"><input type="hidden" name="edit_id" value="~~id attr~~"></div><!--~~}~~--><!--~}~--><!--~uploads {~--><input type="hidden" name="MAX_FILE_SIZE" value="~~$upload_max_filesize~~"><!--~}~--><!--~hidden_fields {~--><!--~ first {~-->
+               <form action="~opt_public_form {~~~$basename~~~}~~opt_public_form unset {~~file_name attr~~}~" method="post~enctype_attr~"><!--~opt_db {~--><!--~~id {~~--><div style="display: none"><input type="hidden" name="edit_id" value="~~id attr~~"></div><!--~~}~~--><!--~}~--><!--~uploads {~--><input type="hidden" name="MAX_FILE_SIZE" value="~~$upload_max_filesize~~"><!--~}~--><!--~hidden_fields {~--><!--~ first {~-->
                        <div style="display: none"><!--~}~--><input type="hidden" name="~name~" value="~~~name~ attr~~"><!--~ last {~--></div><!--~}~--><!--~}~-->
 <!--~visible_fields {~--><!--~fieldset {~-->
                        <fieldset><legend>~caption html~</legend><!--~}~--><!--~end_fieldset {~-->
                <div class="field"><a href="~file_name attr~~~id {~~?id=~~id~~~~}~~">Cancel</a></div><!--~}~-->
        <!--~}~--><!--~~}~~--><!--~opt_listing {~-->
 
-       <!--~~listings once {~~-->
+       <!--~~listings {~~-->
                <h2>~plural cap~ Listing</h2>
 
-               <!--~~listings once_if {~~-->
+               <!--~~rows once_if {~~-->
                        <p><a href="~file_name~?new=1">[Add a new ~singular~]</a></p>
 
                        <table cellspacing="0" cellpadding="4" border="1" summary="">
-                               <tr><!--~listing_headers {~--><th>~caption~</th><!--~}~--><th>&nbsp;</th></tr><!--~~listings {~~-->
+                               <tr><!--~listing_headers {~--><th><a href="?sort=~~sorting-by-~name~~~~name~">~caption~</a></th><!--~}~--><th>&nbsp;</th></tr><!--~~rows {~~-->
                                <tr><!--~listing_fields {~-->
                                        <td class="listing"><a href="~file_name~?~opt_display unset {~edit_~}~id=~~id~~"><!--~enc {~-->~~~name~ ~enc~~~<!--~~~name~ empty {~~--><em>(blank)</em><!--~~}~~--><!--~}~--><!--~thumb {~--><!--~~~name~ nonempty {~~--><img src="~~~name~ thumb_src~~" width="~~~name~ thumb_width~~" height="~~~name~ thumb_height~~" alt=""><!--~~}~~--><!--~}~--></a></td><!--~}~-->
                                        <td><a href="~file_name~?~file_name~_delete_id=~~id~~" onclick="return confirm('Permanently delete?')">[delete this ~singular~]</a></td>
                                </tr><!--~~}~~-->
 
                        </table>
+                       <p><a href="?download_csv=1">Download as CSV file</a></p>
                <!--~~}~~-->
-               <!--~~listings once_else {~~-->
+               <!--~~rows once_else {~~-->
                        <p>No ~plural~ in database.</p>
                <!--~~}~~-->