Fixed a bug: URLs should contain web address, not name

This commit is contained in:
Alexey Verkhovsky 2005-02-19 02:45:28 +00:00
parent 414ed31a58
commit f389d84453
5 changed files with 17 additions and 17 deletions

View file

@ -20,7 +20,7 @@
<input type="text" name="author" id="authorName" value="<%= @author %>"
onClick="this.value == 'AnonymousCoward' ? this.value = '' : true" />
|
<%= link_to('Cancel', {:web => @web.name, :action => 'cancel_edit', :id => @page.name},
<%= link_to('Cancel', {:web => @web.address, :action => 'cancel_edit', :id => @page.name},
{:accesskey => 'c'})
%>
<small>(unlocks page)</small>

View file

@ -28,17 +28,17 @@
<div class="navigation">
<% if @page.name == "HomePage" %>
<%= link_to('Edit Page',
{:web => @web.name, :action => 'edit', :id => @page.name},
{:web => @web.address, :action => 'edit', :id => @page.name},
{:class => 'navlink', :accesskey => 'E'})
%>
|
<%= link_to('Edit Web',
{:web => @web.name, :action => 'edit_web'},
{:web => @web.address, :action => 'edit_web'},
{:class => 'navlink'})
%>
<% else %>
<%= link_to('Edit',
{:web => @web.name, :action => 'edit', :id => @page.name},
{:web => @web.address, :action => 'edit', :id => @page.name},
{:class => 'navlink', :accesskey => 'E'})
%>
<% end %>
@ -46,7 +46,7 @@
<% if @page.revisions.length > 1 %>
|
<%= link_to('Back in time',
{:web => @web.name, :action => 'edit', :id => @page.name,
{:web => @web.address, :action => 'edit', :id => @page.name,
:rev => @page.revisions.length - 2},
{:class => 'navlink', :accesskey => 'R'})
%>
@ -65,13 +65,13 @@
<small>
| Views:
<%= link_to('Print',
{:web => @web.name, :action => 'print', :id => @page.name},
{:web => @web.address, :action => 'print', :id => @page.name},
{:accesskey => 'p'}) %>
<% if defined? RedClothForTex and RedClothForTex.available? and @web.markup == :textile %>
|
<%= link_to 'TeX', :web => @web.name, :action => 'tex', :id => @page.name %>
<%= link_to 'TeX', :web => @web.address, :action => 'tex', :id => @page.name %>
|
<%= link_to 'PDF', :web => @web.name, :action => 'pdf', :id => @page.name %>
<%= link_to 'PDF', :web => @web.address, :action => 'pdf', :id => @page.name %>
<% end %>
</small>

View file

@ -20,7 +20,7 @@
<ul>
<% end %>
<li>
<%= link_to page.name, :web => @web.name, :action => 'show', :id => page.name %>
<%= link_to page.name, :web => @web.address, :action => 'show', :id => page.name %>
<div class="byline" style="margin-bottom: 0px">
by <%= page.author_link %>
at <%= page.created_at.strftime "%H:%M" %>

View file

@ -26,13 +26,13 @@
<% if @revision.next_revision %>
<% if @revision.next_revision.number < (@page.revisions.length - 1) %>
<%= link_to('Forward in time',
{:web => @web.name, :action => 'revision', :id => @page.name,
{:web => @web.address, :action => 'revision', :id => @page.name,
:rev => @revision.next_revision.number},
{:class => 'navlink'})
%>
<% else %>
<%= link_to('Forward in time',
{:web => @web.name, :action => 'show', :id => @page.name},
{:web => @web.address, :action => 'show', :id => @page.name},
{:class => 'navlink'})
%>
<% end %>
@ -45,7 +45,7 @@
<% if @revision.previous_revision %>
<%= link_to('Back in time',
{:web => @web.name, :action => 'revision', :id => @page.name,
{:web => @web.address, :action => 'revision', :id => @page.name,
:rev => @revision.previous_revision.number},
{:class => 'navlink'})
%>
@ -53,7 +53,7 @@
<% end %>
|
<%= link_to('See current', {:web => @web.name, :action => 'show', :id => @page.name},
<%= link_to('See current', {:web => @web.address, :action => 'show', :id => @page.name},
{:class => 'navlink'})
%>
@ -69,7 +69,7 @@
|
<%= link_to('Rollback',
{:web => @web.name, :action => 'rollback', :id => @page.name, :rev => @revision.number},
{:web => @web.address, :action => 'rollback', :id => @page.name, :rev => @revision.number},
{:class => 'navlink'})
%>
@ -77,7 +77,7 @@
<small>
| Linked from:
<%= @page.references.collect { |ref|
link_to ref.name, :web => @web.name, :action => 'show', :id => ref.name
link_to ref.name, :web => @web.address, :action => 'show', :id => ref.name
}.join(", ")
%>
</small>

View file

@ -5,7 +5,7 @@
<ul>
<% for page in @title_results %>
<li>
<%= link_to page.plain_name, :web => @web.name, :action => 'show', :id => page.name %>
<%= link_to page.plain_name, :web => @web.address, :action => 'show', :id => page.name %>
</li>
<% end %>
</ul>
@ -17,7 +17,7 @@
<ul>
<% for page in @results %>
<li>
<%= link_to page.plain_name, :web => @web.name, :action => 'show', :id => page.name %>
<%= link_to page.plain_name, :web => @web.address, :action => 'show', :id => page.name %>
</li>
<% end %>
</ul>