Changeset 1020


Ignore:
Timestamp:
Apr 18, 2007, 4:26:14 PM (14 years ago)
Author:
kake
Message:

Rewrote the HTML of the edit page to use <div>s instead of tables, and to be vaguely more sane in general.

Location:
trunk
Files:
1 added
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Build.PL

    r1016 r1020  
    333333                      "display_metadata.tt",
    334334                      "edit_form.tt",
     335                      "edit_form_actions.tt",
    335336                      "error.tt",
    336337                      "footer.tt",
  • trunk/Changes

    r1017 r1020  
    55
    660.60
     7        Rewrote the HTML of the edit page to use <div>s rather than tables.
     8          Note that you will probably want to provide at least basic styling
     9          for these classes.  As part of this, added a new template,
     10          edit_form_actions.tt
     11        Moved node image boxes below phone/address/etc on the edit form, and
     12          moved summary field from openguides information section into main
     13          section.
     14        Made div#maincontent on the edit form wrap the preview view only, not
     15          the whole form.
    716        Add JavaScript to the Create New Page page so the prefilled
    817          "New page name" disappears when you click in the field (it doesn't
  • trunk/MANIFEST

    r1016 r1020  
    3939templates/display_metadata.tt
    4040templates/edit_form.tt
     41templates/edit_form_actions.tt
    4142templates/error.tt
    4243templates/footer.tt
  • trunk/README.CSS

    r1013 r1020  
    2828    Used in: newpage.tt
    2929    Purpose: Contains a list of characters that aren't allowed in node names.
     30
     31div.edit_form_actions
     32    Used in: edit_form_actions.tt
     33    Purpose: Contains widgets for previewing, cancelling, and committing an
     34             edit.
     35div.preview_edit
     36    Used in: edit_form_actions.tt
     37    Purpose: Contains a button for previewing an edit.
     38div.cancel_edit
     39    Used in: edit_form_actions.tt
     40    Purpose: Contains a link for cancelling an edit.
     41div.commit_edit
     42    Used in: edit_form_actions.tt
     43    Purpose: Contains a button for committing an edit.
     44
     45div.edit_form_group
     46    Used in: edit_form.tt openguides_information_boxes.tt node_image_fields.tt
     47    Purpose: Handles a single type of data (e.g. locales, phone number,
     48             latitude, etc) in the edit form.  Contains a label, an
     49             input/select/textarea, and a space where any edit conflict will
     50             be flagged up.
     51div.edit_box
     52    Used in: edit_form.tt openguides_information_boxes.tt node_image_fields.tt
     53    Purpose: Contains a input, select, or textarea.
     54div.conflict_group
     55    Used in: edit_form.tt node_image_fields.tt
     56    Purpose: Contains a label and details of an edit conflict for a single
     57             type of data.
     58div.conflict_box
     59    Used in: edit_form.tt node_image_fields.tt
     60    Purpose: Contains details of an edit conflict for a single type of data.
     61
     62div.licence_and_moderation_notes
     63    Used in: edit_form.tt
     64    Purpose: Contains a description of the guide's licence and details of any
     65             moderation of the current node.
     66div.licence_notes
     67    Used in: edit_form.tt
     68    Purpose: Contains a description of the guide's licence.
     69div.moderation_warning
     70    Used in: edit_form.tt
     71    Purpose: Contains details of any moderation of the current node.
    3072
    3173div.navbar_group
     
    295337    Purpose: A common category / locale
    296338
     339fieldset#additional_information
     340    Used in: edit_form.tt
     341    Purpose: Contains input fields for phone, address, geodata, etc.
     342
     343fieldset#main_information
     344    Used in: edit_form.tt
     345    Purpose: Contains input fields for content, categories, locales, and
     346             page summary.
     347
     348fieldset#node_image_fields
     349    Used in: node_image_fields.tt
     350    Purpose: contains input fields for node image, copyright, etc.
     351
     352fieldset#openguides_information
     353    Used in: openguides_information_boxes.tt
     354    Purpose: Contains input widgets for username, comment, and edit type.
     355
    297356form#new_page_form
    298357    Used in: newpage.tt
  • trunk/UPGRADING

    r995 r1020  
     10.60    The edit form now uses stylable <div>s rather than tables.  You will
     2        probably want to provide at least basic styling for these.
     3
    140.59    Some CSS was altered; you should check and update your stylesheets.
    25        See README.CSS for details.
  • trunk/templates/edit_form.tt

    r937 r1020  
    33<div id="content">
    44
    5 <div id="maincontent">
    6 <h1 align="center">Edit &quot;[% node_name %]&quot;</h1>
    7 
    8 [% IF conflict %]
    9   <div class="warning_text">
    10     Someone has committed changes to this node since you began editing.
    11     You will need to manually merge your changes into the new version.
    12   </div>
    13 [% END %]
    14 
    15 [% IF preview_html AND preview_above_edit_box %]
    16   <h2>Preview</h2>
    17   [% IF summary %]
    18     <div id="summary">[% summary %]</div>
     5  <h1 align="center">Edit &quot;[% node_name %]&quot;</h1>
     6
     7  [% IF conflict %]
     8    <div class="warning_text">
     9      Someone has committed changes to this page since you began editing.
     10      You will need to manually merge your changes into the new version.
     11    </div>
    1912  [% END %]
    20   [% INCLUDE display_metadata.tt %]
    21   [% preview_html %]
    22   <br clear="all" />
    23 [% END %]
    24 
    25 <form action="[% cgi_url %]" method="POST" enctype="application/x-www-form-urlencoded">
    26   <table summary="Form for editing page attributes">
    27     <tr>
    28       <td colspan="[% IF conflict %]3[% ELSE %]2[% END %]">
    29         [%# Put the td outside the TRY-CATCH because TT will print everything
    30             up to where it gets the error - avoid mismatched tags. %]
     13
     14  [% IF preview_html AND preview_above_edit_box %]
     15    <div id="maincontent">
     16      <h2>Preview</h2>
     17      [% IF summary %]
     18        <div id="summary">[% summary %]</div>
     19      [% END %]
     20      [% INCLUDE display_metadata.tt %]
     21      [% preview_html %]
     22    </div>
     23    <br clear="all" />
     24  [% END %]
     25
     26  <form id="edit_page_form" action="[% cgi_url %]" method="post"
     27   enctype="application/x-www-form-urlencoded">
     28
     29    <div class="licence_and_moderation_notes">
     30      <div class="licence_notes">
    3131        [% TRY %]
    3232          [% INCLUDE custom_licence.tt %]
    3333        [% CATCH %]
    3434        [% END %]
    35         [% IF moderate %]
    36         <p>Please note that this node is moderated so your changes will not
    37         appear immediately. Please be patient.</p>
    38         [% END %]
    39       </td>
    40     </tr>
    41     <tr>
    42       <td align="center"><input type="submit" name="preview" value="Preview changes" class="form_button" /></td>
    43       <td align="center">
     35      </div>
    4436      [% IF moderate %]
    45       <input type="submit" name="Save" value="Save changes for moderation" class="form_button" />
    46       [% ELSE %]
    47       <input type="submit" name="Save" value="Save changes" class="form_button" />
     37        <div class="moderation_warning">
     38          Please note that this page is moderated so your changes will not
     39          appear immediately. Please be patient.
     40        </div>
    4841      [% END %]
    49       </td>
    50     </tr>
    51     <tr>
    52       <td colspan="[% IF conflict %]3[% ELSE %]2[% END %]" align="center"><a href="[% cgi_url %]?[% node_param %]">(cancel edit)</a></td>
    53     </tr>
    54     <tr>
    55       <td colspan="[% IF conflict %]3[% ELSE %]2[% END %]">
    56         <fieldset>
    57           <legend>Main information (required)</legend>
    58           <table summary="Fields containing the node's main content and its category and locale listings">
    59             <tr>
    60               <td class="label"><label for="content">Content:</label></td>
    61               <td><textarea name="content" id="content_textarea" rows="21" cols="70" wrap="virtual">[% content %]</textarea></td>
    62               [% IF conflict %]
    63                 <td><small>[% CGI.escapeHTML(new_content) %]</small></td>
     42    </div>
     43
     44    [% INCLUDE edit_form_actions.tt %]
     45
     46    <fieldset id="main_information">
     47      <legend>Main information</legend>
     48
     49      <div class="edit_form_group" id="content_group">
     50        <label for="content">
     51          [% IF conflict %]
     52            Current content:
     53          [% ELSE %]
     54            Content:
     55          [% END %]
     56        </label>
     57        <div class="edit_box">
     58          <textarea name="content" id="content_textarea" rows="21"
     59           cols="70" wrap="virtual">[% content %]</textarea>
     60        </div>
     61        [% IF conflict %]
     62          <div class="conflict_group">
     63            <label>Your content:</label>
     64            <div class="conflict_box">
     65              [% CGI.escapeHTML(new_content) %]
     66            </div>
     67          </div>
     68        [% END %]
     69      </div>
     70
     71      [%# NOTE: The whitespace in the next two textareas is deliberate, to
     72          avoid getting bogus tabs and blank lines in the textarea content.
     73          Please do not reintroduce this bug.  Test on more than one
     74          browser. #%]
     75
     76      <div class="edit_form_group" id="locales_group">
     77        <label for="locales">
     78          [% IF conflict %]
     79            Current locales:
     80          [% ELSE %]
     81            Locales (one per line):
     82          [% END %]
     83        </label>
     84        <div class="edit_box">
     85          <textarea name="locales" id="locales" rows="5" cols="70">[% FOREACH locale = locales %][% locale.name %]
     86[% END %]</textarea>
     87        </div>
     88        [% IF conflict %]
     89          <div class="conflict_group">
     90            <label>Your locales:</label>
     91            <div class="conflict_box">
     92              [% FOREACH locale = new_locales %]
     93                [% CGI.escapeHTML(locale) %]<br/>
    6494              [% END %]
    65             </tr>
    66             <tr>
    67               <td class="label"><label for="locales">Locales:<br />(one per line)</label></td>
    68 [%# NOTE: The whitespace in the next two textareas is deliberate, to avoid
    69   getting bogus tabs and blank lines in the textarea content.  Please
    70   do not reintroduce this bug.  Test on more than one browser. #%]
    71               <td><textarea name="locales" id="locales" rows="5" cols="70">[% FOREACH locale = locales %][% locale.name %]
    72 [% END %]</textarea></td>
    73               [% IF conflict %]
    74                 <td>[% FOREACH locale = new_locales %][% CGI.escapeHTML(locale) %]<br/>[% END %]</td>
     95            </div>
     96          </div>
     97        [% END %]
     98      </div>
     99
     100      <div class="edit_form_group" id="categories_group">
     101        <label for="categories">
     102          [% IF conflict %]
     103            Current categories:
     104          [% ELSE %]
     105            Categories (one per line):
     106          [% END %]
     107        </label>
     108        <div class="edit_box">
     109          <textarea name="categories" id="categories" rows="5" cols="70">[% FOREACH category = categories %][% category.name %]
     110[% END %]</textarea>
     111        </div>
     112        [% IF conflict %]
     113          <div class="conflict_group">
     114            <label>Your categories:</label>
     115            <div class="conflict_box">
     116              [% FOREACH category = new_categories %]
     117                [% CGI.escapeHTML(category) %]<br/>
    75118              [% END %]
    76             </tr>
    77             <tr>
    78               <td class="label"><label for="categories">Categories:<br />(one per line)</label></td>
    79               <td><textarea name="categories" id="categories" rows="5" cols="70">[% FOREACH category = categories %][% category.name %]
    80 [% END %]</textarea></td>
    81               [% IF conflict %]
    82                 <td>[% FOREACH category = new_categories %][% CGI.escapeHTML(category) %]<br/>[% END %]</td>
    83               [% END %]
    84             </tr>
    85           </table>
    86         </fieldset>
    87         &nbsp;
    88         <fieldset>
    89           <legend>Metadata (optional)</legend>
    90           <table summary="Form for entering metadata about the subject of this node">
    91             [% IF config.enable_node_image %]
    92               [% INCLUDE node_image_fields.tt %]
     119            </div>
     120          </div>
     121        [% END %]
     122      </div>
     123
     124      <div class="edit_form_group" id="summary_group">
     125        [% IF conflict %]
     126          <label for="summary">Current summary:</label>
     127        [% ELSE %]
     128          <label for="summary">One-line summary of this page:</label>
     129        [% END %]
     130        <div class="edit_box">
     131          <input type="text" size="50" id="summary" name="summary"
     132           value="[% summary %]" />
     133        </div>
     134        [% IF conflict %]
     135          <div class="conflict_group">
     136            <label>Your summary:</label>
     137            <div class="conflict_box">
     138              [% new_summary %]
     139            </div>
     140          </div>
     141        [% END %]
     142      </div>
     143    </fieldset>
     144
     145    <fieldset id="additional_information">
     146      <legend>Additional information</legend>
     147
     148      <div class="edit_form_group" id="phone_group">
     149        [% IF conflict %]
     150          <label for="phone">Current phone:</label>
     151        [% ELSE %]
     152          <label for="phone">Phone:</label>
     153        [% END %]
     154        <div class="edit_box">
     155          <input type="text" size="50" id="phone" name="phone"
     156           value="[% phone %]" />
     157        </div>
     158        [% IF conflict %]
     159          <div class="conflict_group">
     160            <label>Your phone:</label>
     161            <div class="conflict_box">
     162              [% CGI.escapeHTML(new_phone) %]
     163            </div>
     164          </div>
     165        [% END %]
     166      </div>
     167
     168      <div class="edit_form_group" id="fax_group">
     169        [% IF conflict %]
     170          <label for="fax">Current fax:</label>
     171        [% ELSE %]
     172          <label for="fax">Fax:</label>
     173        [% END %]
     174        <div class="edit_box">
     175          <input type="text" size="50" id="fax" name="fax"
     176            value="[% fax %]" />
     177        </div>
     178        [% IF conflict %]
     179          <div class="conflict_group">
     180            <label>Your fax:</label>
     181            <div class="conflict_box">
     182              [% CGI.escapeHTML(new_fax) %]
     183            </div>
     184          </div>
     185        [% END %]
     186      </div>
     187
     188      <div class="edit_form_group" id="website_group">
     189        [% IF conflict %]
     190          <label for="website">Current website:</label>
     191        [% ELSE %]
     192          <label for="website">Website:</label>
     193        [% END %]
     194        <div class="edit_box">
     195          <input type="text" size="50" id="website" name="website"
     196           value="[% website %]" />
     197        </div>
     198        [% IF conflict %]
     199          <div class="conflict_group">
     200            <label>Your website:</label>
     201            <div class="conflict_box">
     202              [% CGI.escapeHTML(new_website) %]
     203            </div>
     204          </div>
     205        [% END %]
     206      </div>
     207
     208      <div class="edit_form_group" id="hours_group">
     209        <label for="hours">
     210          [% IF conflict %]
     211            Current opening hours:
     212          [% ELSE %]
     213            Opening hours:
     214          [% END %]
     215        </label>
     216        <div class="edit_box">
     217          <input type="text" size="50" id="hours" name="hours_text"
     218           value="[% hours_text %]" />
     219        </div>
     220        [% IF conflict %]
     221          <div class="conflict_group">
     222            <label>Your opening hours:</label>
     223            <div class="conflict_box">
     224              [% CGI.escapeHTML(new_hours_text) %]
     225            </div>
     226          </div>
     227        [% END %]
     228      </div>
     229
     230      <div class="edit_form_group" id="address_group">
     231        <label for="address">
     232          [% IF conflict %]
     233            Current address:
     234          [% ELSE %]
     235            Address:
     236          [% END %]
     237        </label>
     238        <div class="edit_box">
     239          <input type="text" size="50" id="address" name="address"
     240           value="[% address %]" />
     241        </div>
     242        [% IF conflict %]
     243          <div class="conflict_group">
     244            <label>Your address:</label>
     245            <div class="conflict_box">
     246              [% CGI.escapeHTML(new_address) %]
     247            </div>
     248          </div>
     249        [% END %]
     250      </div>
     251
     252      <div class="edit_form_group" id="postcode_group">
     253        <label for="postcode">
     254          [% IF conflict %]
     255            Current postcode:
     256          [% ELSE %]
     257            Postcode:
     258          [% END %]
     259        </label>
     260        <div class="edit_box">
     261          <input type="text" size="50" id="postcode" name="postcode"
     262           value="[% postcode %]" />
     263        </div>
     264        [% IF conflict %]
     265          <div class="conflict_group">
     266            <label>Your postcode:</label>
     267            <div class="conflict_box">
     268              [% CGI.escapeHTML(new_postcode) %]
     269            </div>
     270          </div>
     271        [% END %]
     272      </div>
     273
     274      <div id="coord_fields_group">
     275
     276        <div class="edit_form_group" id="coord_field_1_group">
     277          <label for="[% coord_field_1 %]">
     278            [% IF conflict %]
     279              Current [% coord_field_1_name %]:
     280            [% ELSE %]
     281              [% coord_field_1_name %]:
    93282            [% END %]
    94 
    95             <tr>
    96               <td class="label"><label for="phone">Phone:</label></td>
    97               <td><input type="text" size="50" id="phone" name="phone" value="[% phone %]" /></td>
    98               [% IF conflict %]
    99                 <td>[% CGI.escapeHTML(new_phone) %]</td>
    100               [% END %]
    101             </tr>
    102             <tr>
    103               <td class="label"><label for="fax">Fax:</label></td>
    104               <td><input type="text" size="50" id="fax" name="fax" value="[% fax %]" /></td>
    105               [% IF conflict %]
    106                 <td>[% CGI.escapeHTML(new_fax) %]</td>
    107               [% END %]
    108             </tr>
    109             <tr>
    110               <td class="label"><label for="website">Website:</label></td>
    111               <td><input type="text" size="50" id="website" name="website" value="[% website %]" /></td>
    112               [% IF conflict %]
    113                 <td>[% CGI.escapeHTML(new_website) %]</td>
    114               [% END %]
    115             </tr>
    116             <tr>
    117               <td class="label"><label for="hours">Opening hours:</label></td>
    118               <td><input type="text" size="50" id="hours" name="hours_text" value="[% hours_text %]" /></td>
    119               [% IF conflict %]
    120                 <td>[% CGI.escapeHTML(hours_text) %]</td>
    121               [% END %]
    122             </tr>
    123             <tr>
    124               <td class="label"><label for="address">Address:</label></td>
    125               <td><input type="text" size="50" id="address" name="address" value="[% address %]" /></td>
    126               [% IF conflict %]
    127                 <td>[% CGI.escapeHTML(new_address) %]</td>
    128               [% END %]
    129             </tr>
    130             <tr>
    131               <td class="label"><label for="postcode">Postcode:</label></td>
    132               <td><input type="text" size="50" id="postcode" name="postcode" value="[% postcode %]" /></td>
    133               [% IF conflict %]
    134                 <td>[% CGI.escapeHTML(new_postcode) %]</td>
    135               [% END %]
    136             </tr>
    137             <tr>
    138               <td class="label"><label for="[% coord_field_1 %]">[% coord_field_1_name %]:</label></td>
    139               <td><input type="text" size="50" id="[% coord_field_1 %]" name="[% coord_field_1 %]" value="[% coord_field_1_value %]" /></td>
    140               [% IF conflict %]
    141                 <td>[% CGI.escapeHTML(new_coord_field_1_value) %]</td>
    142               [% END %]
    143             </tr>
    144             <tr>
    145               <td class="label"><label for="[% coord_field_2 %]">[% coord_field_2_name %]:</label></td>
    146               <td><input type="text" size="50" id="[% coord_field_2 %]" name="[% coord_field_2 %]" value="[% coord_field_2_value %]" /></td>
    147               [% IF conflict %]
    148                 <td>[% CGI.escapeHTML(new_coord_field_2_value) %]</td>
    149               [% END %]
    150             </tr>
    151             <tr>
    152               <td class="label"><label for="map_link">Map link:</label></td>
    153               <td><input type="text" size="70" id="map_link" name="map_link" value="[% map_link %]" /></td>
    154             </tr>
    155           </table>
    156         </fieldset>
    157         &nbsp;
    158         [% INCLUDE openguides_information_boxes.tt %]
    159       </td>
    160     </tr>
    161     <tr>
    162       <td align="center"><input type="submit" name="preview" value="Preview changes" class="form_button" /></td>
    163       <td align="center">
    164       [% IF moderate %]
    165       <input type="submit" name="Save" value="Save changes for moderation" class="form_button" />
    166       [% ELSE %]
    167       <input type="submit" name="Save" value="Save changes" class="form_button" />
     283          </label>
     284          <div class="edit_box">
     285            <input type="text" size="50" id="[% coord_field_1 %]"
     286             name="[% coord_field_1 %]" value="[% coord_field_1_value %]" />
     287          </div>
     288          [% IF conflict %]
     289            <div class="conflict_group">
     290              <label>Your [% coord_field_1_name %]:</label>
     291              <div class="conflict_box">
     292                [% CGI.escapeHTML(new_coord_field_1_value) %]
     293              </div>
     294            </div>
     295          [% END %]
     296        </div>
     297
     298        <div class="edit_form_group" id="coord_field_2_group">
     299          <label for="[% coord_field_2 %]">
     300            [% IF conflict %]
     301              Current [% coord_field_2_name %]:
     302            [% ELSE %]
     303              [% coord_field_2_name %]:
     304            [% END %]
     305          </label>
     306          <div class="edit_box">
     307            <input type="text" size="50" id="[% coord_field_2 %]"
     308             name="[% coord_field_2 %]" value="[% coord_field_2_value %]" />
     309          </div>
     310          [% IF conflict %]
     311            <div class="conflict_group">
     312              <label>Your [% coord_field_2_name %]:</label>
     313              <div class="conflict_box">
     314                [% CGI.escapeHTML(new_coord_field_2_value) %]
     315              </div>
     316            </div>
     317          [% END %]
     318        </div>
     319
     320      </div>
     321
     322      <div class="edit_form_group" id="map_link_group">
     323        <label for="map_link">
     324          [% IF conflict %]
     325            Current map link:
     326          [% ELSE %]
     327            Map link:
     328          [% END %]
     329        </label>
     330        <div class="edit_box">
     331          <input type="text" size="70" id="map_link" name="map_link"
     332           value="[% map_link %]" />
     333        </div>
     334        [% IF conflict %]
     335          <div class="conflict_group">
     336            <label>Your map link:</label>
     337            <div class="conflict_box">
     338              [% CGI.escapeHTML( new_map_link ) %]
     339            </div>
     340          </div>
     341        [% END %]
     342      </div>
     343
     344    </fieldset>
     345
     346    [% IF config.enable_node_image %]
     347      [% INCLUDE node_image_fields.tt %]
     348    [% END %]
     349
     350    [% INCLUDE openguides_information_boxes.tt %]
     351
     352    [% INCLUDE edit_form_actions.tt %]
     353
     354    <input type="hidden" name="title" value="[% node_name %]" />
     355    <input type="hidden" name="checksum" value="[% checksum %]" />
     356  </form>
     357
     358  [% IF preview_html AND NOT preview_above_edit_box %]
     359    <div id="maincontent">
     360      <h2>Preview</h2>
     361      [% IF summary %]
     362        <div id="summary">[% summary %]</div>
    168363      [% END %]
    169       </td>
    170     </tr>
    171     <tr>
    172       <td colspan="[% IF conflict %]3[% ELSE %]2[% END %]" align="center">
    173         <a href="[% cgi_url %]?[% node_param %]">(cancel edit)</a>
    174       </td>
    175     </tr>
    176   </table>
    177   <input type="hidden" name="title" value="[% node_name %]" />
    178   <input type="hidden" name="checksum" value="[% checksum %]" />
    179 </form>
    180 
    181 [% IF preview_html AND NOT preview_above_edit_box %]
    182   <h2>Preview</h2>
    183   [% IF summary %]
    184     <div id="summary">[% summary %]</div>
     364      [% INCLUDE display_metadata.tt %]
     365      [% preview_html %]
     366    </div>
     367    <br clear="all" />
    185368  [% END %]
    186   [% INCLUDE display_metadata.tt %]
    187   [% preview_html %]
    188   <br clear="all" />
    189 [% END %]
    190 
    191 </div>
     369
    192370[% INCLUDE footer.tt %]
  • trunk/templates/node_image_fields.tt

    r937 r1020  
    1 <tr>
    2   <td class="label"><label for="node_image">URL to node Image:</label></td>
    3   <td>
    4     <input type="text" size="50" id="node_image" name="node_image" value="[% node_image %]" />
    5     [% INCLUDE node_photo_notes.tt %]
    6   </td>
    7   [% IF conflict %]
    8     <td>[% CGI.escapeHTML(new_node_image) %]</td>
    9   [% END %]
    10 </tr>
    11 <tr>
    12   <td class="label">
    13     <label for="node_image_copyright">Name of image copyright holder:</label>
    14   </td>
    15   <td>
    16     <input type="text" size="50" id="node_image_copyright"
    17      name="node_image_copyright" value="[% node_image_copyright %]" />
    18   </td>
    19   [% IF conflict %]
    20     <td>[% CGI.escapeHTML(new_node_image_copyright) %]</td>
    21   [% END %]
    22 </tr>
    23 <tr>
    24   <td class="label">
    25     <label for="node_image_licence">URL of image licence:</label>
    26   </td>
    27   <td>
    28     <input type="text" size="50" id="node_image_licence"
    29      name="node_image_licence" value="[% node_image_licence %]" />
    30   </td>
    31   [% IF conflict %]
    32     <td>[% CGI.escapeHTML(new_node_image_licence) %]</td>
    33   [% END %]
    34 </tr>
    35 <tr>
    36   <td class="label">
    37     <label for="node_image_url">URL of image's info page:</label>
    38   </td>
    39   <td>
    40     <input type="text" size="50" id="node_image_url"
    41      name="node_image_url" value="[% node_image_url %]" />
    42   </td>
    43   [% IF conflict %]
    44     <td>[% CGI.escapeHTML(new_node_image_url) %]</td>
    45   [% END %]
    46 </tr>
     1<fieldset id="node_image_fields">
     2  <legend>Image to illustrate this page</legend>
     3
     4  <div class="edit_form_group" id="node_image_group">
     5    <label for="node_image">
     6      [% IF conflict %]
     7        Current image:
     8      [% ELSE %]
     9        URL of image:
     10      [% END %]
     11    </label>
     12    <div class="edit_box">
     13      <input type="text" size="50" id="node_image" name="node_image"
     14       value="[% node_image %]" />
     15      [% INCLUDE node_photo_notes.tt %]
     16    </div>
     17    [% IF conflict %]
     18      <div class="conflict_group">
     19        <label>Your image:</label>
     20        <div class="conflict_box">
     21          [% CGI.escapeHTML(new_node_image) %]
     22        </div>
     23      </div>
     24    [% END %]
     25  </div>
     26 
     27  <div class="edit_form_group" id="node_image_copyright_group">
     28    <label for="node_image_copyright">
     29      [% IF conflict %]
     30        Current copyright holder:
     31      [% ELSE %]
     32        Name of image copyright holder:
     33      [% END %]
     34    </label>
     35    <div class="edit_box">
     36      <input type="text" size="50" id="node_image_copyright"
     37       name="node_image_copyright" value="[% node_image_copyright %]" />
     38    </div>
     39    [% IF conflict %]
     40      <div class="conflict_group">
     41        <label>Your copyright holder:</label>
     42        <div class="conflict_box">
     43          [% CGI.escapeHTML(new_node_image_copyright) %]
     44        </div>
     45      </div>
     46    [% END %]
     47  </div>
     48
     49  <div class="edit_form_group" id="node_image_licence_group">
     50    <label for="node_image_licence">
     51      [% IF conflict %]
     52        Current licence:
     53      [% ELSE %]
     54        URL of image licence:
     55      [% END %]
     56    </label>
     57    <div class="edit_box">
     58      <input type="text" size="50" id="node_image_licence"
     59       name="node_image_licence" value="[% node_image_licence %]" />
     60    </div>
     61    [% IF conflict %]
     62      <div class="conflict_group">
     63        <label>Your licence:</label>
     64        <div class="conflict_box">
     65          [% CGI.escapeHTML(new_node_image_licence) %]
     66        </div>
     67      </div>
     68    [% END %]
     69  </div>
     70
     71  <div class="edit_form_group" id="node_image_info_group">
     72    <label for="node_image_url">
     73      [% IF conflict %]
     74        Current info page:
     75      [% ELSE %]
     76        URL of image's info page:
     77      [% END %]
     78    </label>
     79    <div class="edit_box">
     80      <input type="text" size="50" id="node_image_url"
     81       name="node_image_url" value="[% node_image_url %]" />
     82    </div>
     83    [% IF conflict %]
     84      <div class="conflict_group">
     85        <label>Your info page:</label>
     86        <div class="conflict_box">
     87          [% CGI.escapeHTML(new_node_image_url) %]
     88        </div>
     89      </div>
     90    [% END %]
     91  </div>
     92</fieldset>
  • trunk/templates/openguides_information_boxes.tt

    r725 r1020  
    1 <fieldset>
    2   <legend>OpenGuides information</legend>
    3   <table summary="Fields for entering additional information summarising the node and the change being made to it">
    4     <tr>
    5       <td colspan="2"><label for="summary">One-line summary of this node:</label></td>
    6     </tr>
    7     <tr>
    8       <td colspan="2"><input type="text" size="50" id="summary" name="summary" value="[% summary %]" /></td>
    9     </tr>
    10     <tr>
    11       <td>
    12         <strong><label for="username">Your username</label> (<a href="preferences.cgi">set</a>)</strong>
    13       </td>
    14       <td>
    15         <input type="text" size="30" name="username" id="username" value="[% username %]" />
    16       </td>
    17     </tr>
    18     <tr>
    19       <td><strong><label for="comment">Comment about your changes:</label></strong></td>
    20       <td><input type="text" size="30" name="comment" id="comment" value="[% comment %]" /></td>
    21     </tr>
    22     <tr>
    23       <td><strong><label for="edit_type">Type of edit:</label></strong></td>
    24       <td>
    25         <select name="edit_type" id="edit_type">
    26           <option [% IF edit_type == "Normal edit" %] selected="1" [% END %] value="Normal edit">Normal edit</option>
    27           <option [% IF edit_type == "Minor tidying" %] selected="1" [% END %] value="Minor tidying">Minor tidying</option>
    28         </select>
    29       </td>
    30     </tr>
    31   </table>
     1<fieldset id="openguides_information">
     2  <legend>About your edit</legend>
     3
     4  <div class="edit_form_group" id="username_group">
     5    <label for="username">
     6      Your username (<a href="preferences.cgi">set it</a>):
     7    </label>
     8    <div class="edit_box">
     9      <input type="text" size="30" name="username" id="username"
     10       value="[% username %]" />
     11    </div>
     12  </div>
     13
     14  <div class="edit_form_group" id="comment_group">
     15    <label for="comment">
     16      Comment about your changes:
     17    </label>
     18    <div class="edit_box">
     19      <input type="text" size="30" name="comment" id="comment"
     20       value="[% comment %]" />
     21    </div>
     22  </div>
     23
     24  <div class="edit_form_group" id="edit_type_group">
     25    <label for="edit_type">
     26      Type of edit:
     27    </label>
     28    <div class="edit_box">
     29      <select name="edit_type" id="edit_type">
     30        <option [% IF edit_type == "Normal edit" %] selected="selected" [% END %] value="Normal edit">Normal edit</option>
     31        <option [% IF edit_type == "Minor tidying" %] selected="selected" [% END %] value="Minor tidying">Minor tidying</option>
     32      </select>
     33    </div>
     34  </div>
     35
    3236</fieldset>
    3337
Note: See TracChangeset for help on using the changeset viewer.