Changeset 937
- Timestamp:
- 03/14/07 23:30:34 (21 months ago)
- Location:
- trunk
- Files:
-
- 1 added
- 8 modified
-
Build.PL (modified) (1 diff)
-
Changes (modified) (1 diff)
-
MANIFEST (modified) (1 diff)
-
README.CSS (modified) (1 diff)
-
lib/OpenGuides/Template.pm (modified) (1 diff)
-
lib/OpenGuides/Test.pm (modified) (2 diffs)
-
templates/display_metadata.tt (modified) (2 diffs)
-
templates/edit_form.tt (modified) (1 diff)
-
templates/node_image_fields.tt (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Build.PL
r936 r937 340 340 "node.tt", 341 341 "node_history.tt", 342 "node_image_fields.tt", 342 343 "node_photo_notes.tt", 343 344 "openguides_information_boxes.tt", -
trunk/Changes
r936 r937 11 11 Add some extra test utilities to OpenGuides::Test 12 12 Allow Guide admins to control the content of autocreated nodes (#47). 13 Let people add name of copyright holder, licence URL, and info page 14 URL for node images (#179). 13 15 Write tests for and fix: 14 16 #48 (Edit conflict page erroneously converts lat/lon to os_x, os_y). -
trunk/MANIFEST
r928 r937 53 53 templates/node.tt 54 54 templates/node_history.tt 55 templates/node_image_fields.tt 55 56 templates/node_photo_notes.tt 56 57 templates/openguides_information_boxes.tt -
trunk/README.CSS
r928 r937 157 157 Used in: display_metadata.tt 158 158 Purpose: To display the image for a node 159 div#node_image_copyright 160 Used in: display_metadata.tt 161 Purpose: To display the name of the copyright holder of a node image, and 162 optionally a link to the licence we're using it under. 159 163 160 164 div#common_navigation -
trunk/lib/OpenGuides/Template.pm
r928 r937 326 326 ); 327 327 328 my $node_image = $args{metadata} ? $metadata{node_image}[0] 329 : $q->param("node_image"); 330 if ($config->enable_node_image && $node_image) { 331 $vars{node_image} = $node_image; 328 if ($config->enable_node_image ) { 329 foreach my $key ( qw( node_image node_image_licence node_image_url 330 node_image_copyright ) ) { 331 my $value = $args{metadata} ? $metadata{$key}[0] 332 : $q->param( $key ); 333 $vars{$key} = $value if $value; 334 } 332 335 } 333 336 -
trunk/lib/OpenGuides/Test.pm
r935 r937 168 168 You can supply values for the following keys: C<content>, 169 169 C<categories>, C<locales>, C<os_x>, C<os_y>, C<osie_x>, C<osie_y>, 170 C<latitude>, C<longitude>, C<summary>. You should supply them exactly as they 171 would come from a CGI form, eg lines in a textarea are separated by C<\r\n>. 170 C<latitude>, C<longitude>, C<summary>, C<node_image>, C<node_image_licence>, 171 C<node_image_copyright>, C<node_image_url>. You should supply them exactly 172 as they would come from a CGI form, eg lines in a textarea are separated 173 by C<\r\n>. 172 174 173 175 =cut … … 182 184 $q->param( -name => "categories", -value => $args{categories} || "" ); 183 185 $q->param( -name => "locales", -value => $args{locales} || "" ); 186 $q->param( -name => "node_image", -value => $args{node_image} || "" ); 187 $q->param( -name => "node_image_licence", 188 -value => $args{node_image_licence} || "" ); 189 $q->param( -name => "node_image_copyright", 190 -value => $args{node_image_copyright} || "" ); 191 $q->param( -name => "node_image_url", 192 -value => $args{node_image_url} || "" ); 184 193 $q->param( -name => "phone", -value => "" ); 185 194 $q->param( -name => "fax", -value => "" ); -
trunk/templates/display_metadata.tt
r885 r937 7 7 [% IF node_image %] 8 8 <div id="node_image_box"> 9 [% IF website %]<a href="[% website %]">[% END %] 10 <img id="node_image" src="[% node_image %]" alt="Picture of [% node_name %]" /> 11 [% IF website %]</a>[% END %] 9 [% IF node_image_url %]<a href="[% node_image_url %]">[% END %] 10 <img id="node_image" src="[% node_image %]" 11 alt="Picture of [% node_name %]" /> 12 [% IF node_image_url %]</a>[% END %] 13 [% IF node_image_copyright %] 14 <div id="node_image_copyright"> 15 [% IF node_image_licence %] 16 <a href="[% node_image_licence %]">© 17 [% node_image_copyright %]</a> 18 [% ELSE %] 19 © [% node_image_copyright %] 20 [% END %] 21 </div> 22 [% END %] 12 23 </div> 13 24 [% ELSE %] … … 15 26 [% END %] 16 27 17 <!-- - For the vcard --->28 <!-- For the vcard --> 18 29 <span class="fn" style="display:none">[% node_name %]</span> 19 30 [% IF phone OR fax OR address OR postcode OR formatted_website_text -
trunk/templates/edit_form.tt
r935 r937 89 89 <legend>Metadata (optional)</legend> 90 90 <table summary="Form for entering metadata about the subject of this node"> 91 [% IF config.enable_node_image %] 92 <tr> 93 <td class="label"><label for="node_image">URL to node Image:</label></td> 94 <td> 95 <input type="text" size="50" id="node_image" name="node_image" value="[% node_image %]" /> 96 [% INCLUDE node_photo_notes.tt %] 97 </td> 98 [% IF conflict %] 99 <td>[% CGI.escapeHTML(new_node_image) %]</td> 100 [% END %] 101 </tr> 102 [% END %] 91 [% IF config.enable_node_image %] 92 [% INCLUDE node_image_fields.tt %] 93 [% END %] 94 103 95 <tr> 104 96 <td class="label"><label for="phone">Phone:</label></td>
