Changeset 1086
- Timestamp:
- 06/17/07 03:15:31 (16 months ago)
- Location:
- trunk
- Files:
-
- 1 added
- 1 removed
- 6 modified
-
. (modified) (1 prop)
-
Changes (modified) (1 diff)
-
lib/OpenGuides.pm (modified) (2 diffs)
-
newpage.cgi (modified) (1 diff)
-
t/58_navbar_common_locales_categories.t (added)
-
t/58_recent_changes_navbar.t (deleted)
-
templates/navbar_categories.tt (modified) (2 diffs)
-
templates/navbar_locales.tt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
trunk/Changes
r1085 r1086 23 23 The "Look for nearby geocaches" preference and link now actually work 24 24 (#216). 25 Move the common categories/locales navbar display decision into the 26 templates (#214). 25 27 26 28 0.60 13 May 2007 -
trunk/lib/OpenGuides.pm
r1070 r1086 259 259 && $self->get_cookie( "display_google_maps" ) ) { 260 260 $tt_vars{display_google_maps} = 1; 261 }262 263 # Should we include a standard list of categories or locales?264 if ($config->enable_common_categories || $config->enable_common_locales) {265 $tt_vars{common_catloc} = 1;266 $tt_vars{common_categories} = $config->enable_common_categories;267 $tt_vars{common_locales} = $config->enable_common_locales;268 $tt_vars{catloc_link} = $config->script_url . $config->script_name269 . "?id=";270 261 } 271 262 … … 671 662 } 672 663 $tt_vars{not_editable} = 1; 673 if ($config->enable_common_categories || $config->enable_common_locales) {674 $tt_vars{common_catloc} = 1;675 $tt_vars{common_categories} = $config->enable_common_categories;676 $tt_vars{common_locales} = $config->enable_common_locales;677 $tt_vars{catloc_link} = $config->script_url . $config->script_name678 . "?id=";679 }680 664 $tt_vars{recent_changes} = \%recent_changes; 681 665 my %processing_args = ( -
trunk/newpage.cgi
r1045 r1086 31 31 32 32 sub show_form { 33 my %tt_vars = (34 not_editable => 1,35 not_deletable => 1,36 deter_robots => 1,37 disallowed_chars => \@badchars,38 pagename => $pagename,39 );40 if ($config->enable_common_categories || $config->enable_common_locales) {41 $tt_vars{common_catloc} = 1;42 $tt_vars{common_categories} = $config->enable_common_categories;43 $tt_vars{common_locales} = $config->enable_common_locales;44 $tt_vars{catloc_link} = $config->script_url . $config->script_name45 . "?id=";46 }47 33 print OpenGuides::Template->output( wiki => $wiki, 48 34 config => $config, 49 35 template => "newpage.tt", 50 vars => \%tt_vars, 36 vars => { 37 not_editable => 1, 38 not_deletable => 1, 39 deter_robots => 1, 40 disallowed_chars => \@badchars, 41 pagename => $pagename } 51 42 ); 52 43 } -
trunk/templates/navbar_categories.tt
r988 r1086 1 [% IF co mmon_categories %]1 [% IF config.enable_common_categories %] 2 2 <div id="navbar_categories"> 3 3 <div class="navbar_group_title">Categories:</div> … … 5 5 [% FOREACH cat = [ 'Cafes', 'Coffee Shops', 'Pubs', 'Restaurants', 6 6 'Supermarkets', 'Cinemas', 'Theatres' ] %] 7 <li><a href="[% c atloc_link %]Category_[% cat %]">[% cat %]</a></li>7 <li><a href="[% config.script_url _ config.script_name %]?id=Category_[% cat %]">[% cat %]</a></li> 8 8 [% END %] 9 9 </ul> -
trunk/templates/navbar_locales.tt
r988 r1086 1 [% IF co mmon_locales %]1 [% IF config.enable_common_locales %] 2 2 <div id="navbar_locales"> 3 3 <div class="navbar_group_title">Locales:</div> 4 4 <ul class="navbar_group"> 5 5 [% FOREACH loc = [ 'North', 'South', 'East', 'West', 'Central' ] %] 6 <li><a href="[% c atloc_link %]Locale_[% loc %]">[% loc %]</a></li>6 <li><a href="[% config.script_url _ config.script_name %]?id=Locale_[% loc %]">[% loc %]</a></li> 7 7 [% END %] 8 8 </ul>
