Changeset 969

Show
Ignore:
Timestamp:
03/24/07 15:25:40 (20 months ago)
Author:
kake
Message:

Apply content_above_navbar_in_html content option to Recent Changes page as well; and add a CSS ID for the atom/RSS feeds paragraph.

Location:
trunk
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/Changes

    r966 r969  
    1919        Add a new div to wrap the entire body; also, use header.tt in 
    2020          home_node.tt instead of copy/paste. 
     21        Add a new div for the atom/RSS feed links on the recent changes page. 
    2122        Add config option to place content above navbar in HTML. 
    2223        Add config option to suppress inline maps on geotagged nodes. 
  • trunk/README.CSS

    r968 r969  
    197197    contain an edit link. 
    198198 
     199div#recent_changes_feeds 
     200    Used in: recent_changes.tt 
     201    Purpose: Display links to atom/RSS feeds of the recent changes. 
     202 
    199203div#search_form 
    200204    Used in: footer.tt 
  • trunk/t/47_navbar_placement.t

    r964 r969  
    1717} 
    1818 
    19 plan tests => 9; 
     19plan tests => 12; 
    2020 
    2121# NB These tests don't actually test the placement - but they do test that 
     
    126126                         "...ditto if content_above_navbar_in_html set to 1" ); 
    127127 
     128# Make sure navbar appears on recent changes. 
     129$config = OpenGuides::Test->make_basic_config; # get a fresh config 
     130$guide = OpenGuides->new( config => $config ); # make sure the guide sees it 
     131$output = $guide->display_recent_changes( 
     132                                          return_output => 1, 
     133                                        ); 
     134$output =~ s/^Content-Type.*[\r\n]+//m; 
     135Test::HTML::Content::tag_ok( $output, "div", { id => "navbar" }, 
     136                             "navbar appears on recent changes" ); 
     137 
     138$config->content_above_navbar_in_html( 0 ); 
     139$output = $guide->display_recent_changes( 
     140                                          return_output => 1, 
     141                                        ); 
     142$output =~ s/^Content-Type.*[\r\n]+//m; 
     143Test::HTML::Content::tag_ok( $output, "div", { id => "navbar" }, 
     144                         "...ditto if content_above_navbar_in_html set to 0" ); 
     145 
     146$config->content_above_navbar_in_html( 1 ); 
     147$output = $guide->display_recent_changes( 
     148                                          return_output => 1, 
     149                                        ); 
     150$output =~ s/^Content-Type.*[\r\n]+//m; 
     151Test::HTML::Content::tag_ok( $output, "div", { id => "navbar" }, 
     152                         "...ditto if content_above_navbar_in_html set to 1" ); 
     153 
  • trunk/templates/recent_changes.tt

    r867 r969  
    33 
    44<div id="content"> 
    5 [% INCLUDE navbar.tt %] 
     5 
     6[% IF !config.content_above_navbar_in_html %] 
     7  [% INCLUDE navbar.tt %] 
     8[% END %] 
     9 
    610<div id="maincontent"> 
    711  <h2>Recent site changes</h2> 
     
    8286</div> 
    8387 
    84 <p> 
    85   This list is available as a 
    86   <a href="[% cgi_url %]?action=rc;format=rss">rss feed</a> 
    87   and as an 
    88   <a href="[% cgi_url %]?action=rc;format=atom">atom feed</a>. 
    89 </p> 
     88[% IF config.content_above_navbar_in_html %] 
     89  [% INCLUDE navbar.tt %] 
     90[% END %] 
     91 
     92<div id="recent_changes_feeds"> 
     93  <p> 
     94    This list is available as a 
     95    <a href="[% cgi_url %]?action=rc;format=rss">rss feed</a> 
     96    and as an 
     97    <a href="[% cgi_url %]?action=rc;format=atom">atom feed</a>. 
     98  </p> 
     99</div> 
     100 
    90101[% INCLUDE footer.tt %]