Author: kake Date: 2012-05-02 17:04:06 +0100 (Wed, 02 May 2012) New Revision: 1375
Added: trunk/templates/edit_form_preview.tt Modified: trunk/Build.PL trunk/MANIFEST trunk/README.CSS trunk/templates/edit_form.tt trunk/templates/edit_form_actions.tt Log: Added a few more CSS hooks to the edit form, also added anchor link to jump from preview to form (fixes #202).
Modified: trunk/Build.PL =================================================================== --- trunk/Build.PL 2012-05-02 13:39:43 UTC (rev 1374) +++ trunk/Build.PL 2012-05-02 16:04:06 UTC (rev 1375) @@ -393,6 +393,7 @@ "metadata.tt", "edit_form.tt", "edit_form_actions.tt", + "edit_form_preview.tt", "error.tt", "footer.tt", "header.tt",
Modified: trunk/MANIFEST =================================================================== --- trunk/MANIFEST 2012-05-02 13:39:43 UTC (rev 1374) +++ trunk/MANIFEST 2012-05-02 16:04:06 UTC (rev 1375) @@ -42,6 +42,7 @@ templates/display_metadata.tt templates/edit_form.tt templates/edit_form_actions.tt +templates/edit_form_preview.tt templates/error.tt templates/footer.tt templates/header.tt
Modified: trunk/README.CSS =================================================================== --- trunk/README.CSS 2012-05-02 13:39:43 UTC (rev 1374) +++ trunk/README.CSS 2012-05-02 16:04:06 UTC (rev 1375) @@ -36,7 +36,7 @@ Used in: edit_form_actions.tt Purpose: Contains a button for previewing an edit. div.cancel_edit - Used in: edit_form_actions.tt + Used in: edit_form_actions.tt, edit_form_preview.tt Purpose: Contains a link for cancelling an edit. div.commit_edit Used in: edit_form_actions.tt @@ -59,6 +59,11 @@ Used in: edit_form.tt node_image_fields.tt Purpose: Contains details of an edit conflict for a single type of data.
+div.jump_to_edit_form + Used in: edit_form_preview.tt + Purpose: Contains a link to jump up or down the page to the edit form, + when previewing one's edits. + div.licence_and_moderation_notes Used in: edit_form.tt Purpose: Contains a description of the guide's licence and details of any @@ -82,6 +87,16 @@ Used in: navbar_*.tt Purpose: Defines an item in the navigation bar
+div.preview + Used in: edit_form_preview.tt + Purpose: Container for use with #maincontent when the content is being + previewed while editing. + +div.preview_actions + Used in: edit_form_preview.tt + Purpose: Groups together links for cancelling an edit and for jumping + up/down the page to the edit form, when previewing one's edits. + div.warning_text Used in: edit_form.tt Purpose: Warns the user that there is an edit conflict
Modified: trunk/templates/edit_form.tt =================================================================== --- trunk/templates/edit_form.tt 2012-05-02 13:39:43 UTC (rev 1374) +++ trunk/templates/edit_form.tt 2012-05-02 16:04:06 UTC (rev 1375) @@ -29,18 +29,10 @@ [% END %]
[% IF preview_html AND preview_above_edit_box %] - <div id="maincontent"> - <h2>Preview</h2> - [% IF summary %] - <div id="summary">[% summary %]</div> - [% END %] - [% INCLUDE node_image.tt %] - [% INCLUDE display_metadata.tt %] - [% preview_html %] - </div> - <br clear="all" /> + [% INCLUDE edit_form_preview.tt %] [% END %]
+ <a name="edit_form_anchor"></a> <form id="edit_page_form" action="[% cgi_url %]" method="post" enctype="application/x-www-form-urlencoded">
@@ -412,16 +404,7 @@ </form>
[% IF preview_html AND NOT preview_above_edit_box %] - <div id="maincontent"> - <h2>Preview</h2> - [% IF summary %] - <div id="summary">[% summary %]</div> - [% END %] - [% INCLUDE node_image.tt %] - [% INCLUDE display_metadata.tt %] - [% preview_html %] - </div> - <br clear="all" /> + [% INCLUDE edit_form_preview.tt %] [% END %] [% END %] [% INCLUDE footer.tt omit_footer_search_form = 1 %]
Modified: trunk/templates/edit_form_actions.tt =================================================================== --- trunk/templates/edit_form_actions.tt 2012-05-02 13:39:43 UTC (rev 1374) +++ trunk/templates/edit_form_actions.tt 2012-05-02 16:04:06 UTC (rev 1375) @@ -4,7 +4,7 @@ class="form_button" /> </div> <div class="cancel_edit"> - (<a href="[% cgi_url %]?[% node_param %]">cancel edit</a>) + <a href="[% cgi_url %]?[% node_param %]">Cancel edit</a> </div> <div class="commit_edit"> [% IF moderate %]
Added: trunk/templates/edit_form_preview.tt =================================================================== --- trunk/templates/edit_form_preview.tt (rev 0) +++ trunk/templates/edit_form_preview.tt 2012-05-02 16:04:06 UTC (rev 1375) @@ -0,0 +1,18 @@ +<div id="maincontent" class="preview"> + <h2>Preview</h2> + <div class="preview_actions"> + <div class="cancel_edit"> + <a href="[% cgi_url %]?[% node_param %]">Cancel edit</a> + </div> + <div class="jump_to_edit_form"> + <a href="#edit_form_anchor">Jump to edit form</a> + </div> + </div> + [% IF summary %] + <div id="summary">[% summary %]</div> + [% END %] + [% INCLUDE node_image.tt %] + [% INCLUDE display_metadata.tt %] + [% preview_html %] +</div> +<br clear="all" />