Changeset 1008


Ignore:
Timestamp:
Mar 30, 2007, 6:26:31 PM (15 years ago)
Author:
kake
Message:

Use full URLs for all links in navbar, so people can INCLUDE navbar.tt in their own scripts.

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/OpenGuides.pm

    r997 r1008  
    254254        $tt_vars{common_categories} = $config->enable_common_categories;
    255255        $tt_vars{common_locales} = $config->enable_common_locales;
    256         $tt_vars{catloc_link} = $config->script_name . "?id=";
     256        $tt_vars{catloc_link} = $config->script_url . $config->script_name
     257                                . "?id=";
    257258    }
    258259   
  • trunk/lib/OpenGuides/Template.pm

    r994 r1008  
    150150        site_name             => $config->site_name,
    151151        cgi_url               => $script_name,
     152        script_url            => $script_url,
    152153        full_cgi_url          => $script_url . $script_name,
    153154        contact_email         => $config->contact_email,
  • trunk/templates/navbar_options.tt

    r952 r1008  
    22  <div class="navbar_group_title">Options:</div>
    33  <ul>
    4     <li><a href="preferences.cgi">Set username/prefs</a></li>
     4    <li><a href="[% script_url %]preferences.cgi">Set username/prefs</a></li>
    55  </ul>
    66</div>
  • trunk/templates/navbar_search.tt

    r952 r1008  
    33  <ul>
    44    <li>
    5       <form method="post" action="search.cgi" enctype="application/x-www-form-urlencoded">
     5      <form method="post" action="[% script_url %]search.cgi" enctype="application/x-www-form-urlencoded">
    66        <input type="hidden" name="action" value="search" />
    77        <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>
     
    99      </form>
    1010    </li>
    11     <li><a href="search.cgi">Advanced Search</a></li>
     11    <li><a href="[% script_url %]search.cgi">Advanced Search</a></li>
    1212  </ul>
    1313</div>
  • trunk/templates/navbar_this_page.tt

    r952 r1008  
    44    <ul>
    55      <li><a class="edit_page_link" href="[% source_site or full_cgi_url %]?id=[% node_param %];action=edit">Edit this page</a></li>
    6       <li><a href="[% cgi_url %]?action=show_backlinks;id=[% node_param %]">Show pages linking here</a></li>
     6      <li><a href="[% full_cgi_url %]?action=show_backlinks;id=[% node_param %]">Show pages linking here</a></li>
    77      [% IF version AND version > 1 %]
    8         <li><a href="[% cgi_url %]?action=list_all_versions;id=[% node_param %]">List all revisions</a></li>
     8        <li><a href="[% full_cgi_url %]?action=list_all_versions;id=[% node_param %]">List all revisions</a></li>
    99      [% END %]
    10       <li><a href="[% cgi_url %]?id=[% node_param %];format=rdf">RDF/XML version</a></li>
     10      <li><a href="[% full_cgi_url %]?id=[% node_param %];format=rdf">RDF/XML version</a></li>
    1111      [% IF enable_page_deletion %]
    1212        <li><a href="[% full_cgi_url %]?id=[% node_param %];action=delete">Delete (admin only)</a></li>
  • trunk/templates/navbar_tools.tt

    r952 r1008  
    33  <ul>
    44    <li><a href="[% full_cgi_url %]?action=rc">Recent Changes</a></li>
    5     <li><a href="newpage.cgi">Create New Page</a></li>
     5    <li><a href="[% script_url %]newpage.cgi">Create New Page</a></li>
    66    <li><a href="[% full_cgi_url %]?action=random">Random Page</a></li>
    77    <li><a href="[% full_cgi_url %]?action=show_wanted_pages">Wanted Pages</a></li>
Note: See TracChangeset for help on using the changeset viewer.