Changeset 942


Ignore:
Timestamp:
Mar 17, 2007, 4:39:51 PM (15 years ago)
Author:
kake
Message:

Split out "modules" from navbar.tt into separate templates - navbar_*.tt - to make it easier for people to change their order in a custom template.

Location:
trunk
Files:
7 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Build.PL

    r941 r942  
    337337                      "moderate_password_wrong.tt",
    338338                      "navbar.tt",
     339                      "navbar_help.tt",
     340                      "navbar_home_link.tt",
     341                      "navbar_options.tt",
     342                      "navbar_revision_info.tt",
     343                      "navbar_search.tt",
     344                      "navbar_this_page.tt",
     345                      "navbar_tools.tt",
    339346                      "needing_moderation.tt",
    340347                      "newpage.tt",
  • trunk/Changes

    r941 r942  
    1414          URL for node images (#179).
    1515        Add config option to omit recent changes from home page.
     16        Split out "modules" from navbar.tt into separate templates navbar_*.tt
     17          to make it easier for people to change the order in a custom template
    1618        Write tests for and fix:
    1719          #48 (Edit conflict page erroneously converts lat/lon to os_x, os_y).
  • trunk/MANIFEST

    r941 r942  
    4949templates/moderate_password_wrong.tt
    5050templates/navbar.tt
     51templates/navbar_help.tt
     52templates/navbar_home_link.tt
     53templates/navbar_options.tt
     54templates/navbar_revision_info.tt
     55templates/navbar_search.tt
     56templates/navbar_this_page.tt
     57templates/navbar_tools.tt
    5158templates/needing_moderation.tt
    5259templates/newpage.tt
  • trunk/README.CSS

    r941 r942  
    99    Purpose: Link to the home page of the site, in the search results page
    1010
    11 div.edit_page_link
    12     Used in: navbar.tt
     11a.edit_page_link
     12    Used in: navbar_this_page.tt
    1313    Purpose: Link to the edit page function, in the navbar
    1414
    1515div.navbar_group
    16     Used in: navbar.tt
     16    Used in: navbar_*.tt
    1717    Purpose: Defines a related set of navigation bar functions
    1818
    1919div.navbar_group_title
    20     Used in: navbar.tt
     20    Used in: navbar_*.tt
    2121    Purpose: Titles a related set of navigation bar functions
    2222
    2323div.navbar_item
    24     Used in: navbar.tt
     24    Used in: navbar_*.tt
    2525    Purpose: Defines an item in the navigation bar
    2626
     
    3030
    3131input.form_button
    32     Used in: differences.tt, edit_form.tt, footer.tt, navbar.tt, newpage.tt,
    33             node.tt, preferences.tt, search.tt
     32    Used in: differences.tt, edit_form.tt, footer.tt, navbar_search.tt,
     33             newpage.tt, node.tt, preferences.tt, search.tt
    3434    Purpose: A standard form button
    3535
    3636label.hidden
    37     Used in: navbar.tt
     37    Used in: navbar_search.tt
    3838    Purpose: A label for the search box that will be hidden for users with
    3939             a CSS-conforming user agent
     
    5454    Purpose: Displays the node name
    5555
    56 span.hidden
    57     Used in: navbar.tt
     56input.hidden
     57    Used in: navbar_search.tt
    5858    Purpose: Defines content that will be hidden for users with a
    5959             CSS-conforming user agent
     
    131131    Purpose: The navigation bar
    132132
     133div#navbar_current_version_link
     134    Used in: navbar_revision_info.tt
     135    Purpose: Display a link to the current version when showing a historical
     136    version of an editable node.
     137
     138div#navbar_last_edited
     139    Used in: navbar_revision_info.tt
     140    Purpose: Display the last edited time when showing the current version of
     141    an editable node.
     142
     143div#navbar_this_revision_info
     144    Used in: navbar_revision_info.tt
     145    Purpose: Display the version number and edit time when showing a historical
     146    version of an editable node.
     147
     148div#navbar_version
     149    Used in: navbar_revision_info.tt
     150    Purpose: Display the version number when showing the current version of
     151    an editable node.
     152
    133153div#rdf_link
    134154    Used in: node.tt
     
    239259
    240260input#nav_search
    241     Used in: navbar.tt
     261    Used in: navbar_search.tt
    242262    Purpose: The search input portion of the navigation bar
    243263
  • trunk/templates/navbar.tt

    r739 r942  
    11<div id="navbar">
    22
    3   [% UNLESS node_param == 'Home' %]
    4   <div class="navbar_site_name"><a href="[% full_cgi_url %]">[% site_name %]</a></div>
    5   [% END %]
    6 
    7   <div class="navbar_group_title">Tools:</div>
    8 
    9   <ul>
    10     <li><a href="[% full_cgi_url %]?action=rc">Recent Changes</a></li>
    11     <li><a href="newpage.cgi">Create New Page</a></li>
    12     <li><a href="[% full_cgi_url %]?action=random">Random Page</a></li>
    13     <li><a href="[% full_cgi_url %]?action=show_wanted_pages">Wanted Pages</a></li>
    14     [% IF geocache_link AND latitude AND longitude %]
    15       <li><a href="http://www.geocaching.com/seek/nearest_cache.asp?origin_lat=[% latitude %];origin_long=[% longitude %]">Look for nearby geocaches</a></li>
    16     [% END %]
    17   </ul>
    18 
    19   [% UNLESS omit_help_links %]
    20 
    21   <div class="navbar_group_title">Help:</div>
    22 
    23   <ul>
    24     <li><a href="[% full_cgi_url %]?FAQ">FAQ</a></li>
    25     <li><a href="[% full_cgi_url %]?How_To_Get_Started">How To Get Started</a></li>
    26     [% IF formatting_rules_link %]
    27       <li><a href="[% formatting_rules_link %]">[% formatting_rules_node %]</a></li>
    28     [% END %]
    29     <li><a href="[% full_cgi_url %]?Wiki_Etiquette">Wiki Etiquette</a></li>
    30   </ul>
    31 
    32   [% END %]
    33 
    34   <div class="navbar_group_title">Options:</div>
    35 
    36   <ul>
    37     <li><a href="preferences.cgi">Set username/prefs</a></li>
    38   </ul>
    39 
    40   <div class="navbar_group_title">Search:</div>
    41 
    42   <ul>
    43     <li>
    44       <form method="post" action="search.cgi" enctype="application/x-www-form-urlencoded">
    45         <input type="hidden" name="action" value="search" />
    46         <input type="text" size="15" name="search" id="nav_search" value="Search text" onfocus="this.value=''" /> <label for="nav_search" class="hidden">Search text</label>
    47         <input type="submit" value="Go" class="form_button" />
    48       </form>
    49     </li>
    50     <li><a href="search.cgi">Advanced Search</a></li>
    51   </ul>
    52 
    53   [% UNLESS not_editable %]
    54     <div class="navbar_group_title">This page:</div>
    55 
    56     <ul>
    57       <li><a class="edit_page_link" href="[% source_site or full_cgi_url %]?id=[% node_param %];action=edit">Edit this page</a></li>
    58       <li><a href="[% cgi_url %]?action=show_backlinks;id=[% node_param %]">Show pages linking here</a></li>
    59       [% IF version AND version > 1 %]
    60         <li><a href="[% cgi_url %]?action=list_all_versions;id=[% node_param %]">List all revisions</a></li>
    61       [% END %]
    62         <li><a href="[% cgi_url %]?id=[% node_param %];format=rdf">RDF/XML version</a></li>
    63       [% IF enable_page_deletion %]
    64         <li><a href="[% full_cgi_url %]?id=[% node_param %];action=delete">Delete (admin only)</a></li>
    65       [% END %]
    66     </ul>
    67 
    68     <div class="navbar_revision">
    69       [% IF current %]
    70         Revision [% version %]. Last edited [% last_modified %].
    71       [% ELSE %]
    72         This is revision [% version %] (as of [% last_modified %]).<br />
    73         <a href="[% cgi_url %]?[% node_param %]">View current version.</a>
    74       [% END %]
    75     </div>
    76   [% END %]
     3  [% INCLUDE navbar_home_link.tt %]
     4  [% INCLUDE navbar_tools.tt %]
     5  [% INCLUDE navbar_help.tt %]
     6  [% INCLUDE navbar_options.tt %]
     7  [% INCLUDE navbar_search.tt %]
     8  [% INCLUDE navbar_this_page.tt %]
     9  [% INCLUDE navbar_revision_info.tt %]
    7710
    7811</div>
Note: See TracChangeset for help on using the changeset viewer.