Fixed a bug: URLs should contain web address, not name
This commit is contained in:
parent
414ed31a58
commit
f389d84453
|
@ -20,7 +20,7 @@
|
||||||
<input type="text" name="author" id="authorName" value="<%= @author %>"
|
<input type="text" name="author" id="authorName" value="<%= @author %>"
|
||||||
onClick="this.value == 'AnonymousCoward' ? this.value = '' : true" />
|
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'})
|
{:accesskey => 'c'})
|
||||||
%>
|
%>
|
||||||
<small>(unlocks page)</small>
|
<small>(unlocks page)</small>
|
||||||
|
|
|
@ -28,17 +28,17 @@
|
||||||
<div class="navigation">
|
<div class="navigation">
|
||||||
<% if @page.name == "HomePage" %>
|
<% if @page.name == "HomePage" %>
|
||||||
<%= link_to('Edit Page',
|
<%= link_to('Edit Page',
|
||||||
{:web => @web.name, :action => 'edit', :id => @page.name},
|
{:web => @web.address, :action => 'edit', :id => @page.name},
|
||||||
{:class => 'navlink', :accesskey => 'E'})
|
{:class => 'navlink', :accesskey => 'E'})
|
||||||
%>
|
%>
|
||||||
|
|
|
|
||||||
<%= link_to('Edit Web',
|
<%= link_to('Edit Web',
|
||||||
{:web => @web.name, :action => 'edit_web'},
|
{:web => @web.address, :action => 'edit_web'},
|
||||||
{:class => 'navlink'})
|
{:class => 'navlink'})
|
||||||
%>
|
%>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to('Edit',
|
<%= link_to('Edit',
|
||||||
{:web => @web.name, :action => 'edit', :id => @page.name},
|
{:web => @web.address, :action => 'edit', :id => @page.name},
|
||||||
{:class => 'navlink', :accesskey => 'E'})
|
{:class => 'navlink', :accesskey => 'E'})
|
||||||
%>
|
%>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -46,7 +46,7 @@
|
||||||
<% if @page.revisions.length > 1 %>
|
<% if @page.revisions.length > 1 %>
|
||||||
|
|
|
|
||||||
<%= link_to('Back in time',
|
<%= 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},
|
:rev => @page.revisions.length - 2},
|
||||||
{:class => 'navlink', :accesskey => 'R'})
|
{:class => 'navlink', :accesskey => 'R'})
|
||||||
%>
|
%>
|
||||||
|
@ -65,13 +65,13 @@
|
||||||
<small>
|
<small>
|
||||||
| Views:
|
| Views:
|
||||||
<%= link_to('Print',
|
<%= link_to('Print',
|
||||||
{:web => @web.name, :action => 'print', :id => @page.name},
|
{:web => @web.address, :action => 'print', :id => @page.name},
|
||||||
{:accesskey => 'p'}) %>
|
{:accesskey => 'p'}) %>
|
||||||
<% if defined? RedClothForTex and RedClothForTex.available? and @web.markup == :textile %>
|
<% 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 %>
|
<% end %>
|
||||||
</small>
|
</small>
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
<ul>
|
<ul>
|
||||||
<% end %>
|
<% end %>
|
||||||
<li>
|
<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">
|
<div class="byline" style="margin-bottom: 0px">
|
||||||
by <%= page.author_link %>
|
by <%= page.author_link %>
|
||||||
at <%= page.created_at.strftime "%H:%M" %>
|
at <%= page.created_at.strftime "%H:%M" %>
|
||||||
|
|
|
@ -26,13 +26,13 @@
|
||||||
<% if @revision.next_revision %>
|
<% if @revision.next_revision %>
|
||||||
<% if @revision.next_revision.number < (@page.revisions.length - 1) %>
|
<% if @revision.next_revision.number < (@page.revisions.length - 1) %>
|
||||||
<%= link_to('Forward in time',
|
<%= 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},
|
:rev => @revision.next_revision.number},
|
||||||
{:class => 'navlink'})
|
{:class => 'navlink'})
|
||||||
%>
|
%>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to('Forward in time',
|
<%= link_to('Forward in time',
|
||||||
{:web => @web.name, :action => 'show', :id => @page.name},
|
{:web => @web.address, :action => 'show', :id => @page.name},
|
||||||
{:class => 'navlink'})
|
{:class => 'navlink'})
|
||||||
%>
|
%>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -45,7 +45,7 @@
|
||||||
|
|
||||||
<% if @revision.previous_revision %>
|
<% if @revision.previous_revision %>
|
||||||
<%= link_to('Back in time',
|
<%= 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},
|
:rev => @revision.previous_revision.number},
|
||||||
{:class => 'navlink'})
|
{:class => 'navlink'})
|
||||||
%>
|
%>
|
||||||
|
@ -53,7 +53,7 @@
|
||||||
<% end %>
|
<% 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'})
|
{:class => 'navlink'})
|
||||||
%>
|
%>
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@
|
||||||
|
|
|
|
||||||
|
|
||||||
<%= link_to('Rollback',
|
<%= 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'})
|
{:class => 'navlink'})
|
||||||
%>
|
%>
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@
|
||||||
<small>
|
<small>
|
||||||
| Linked from:
|
| Linked from:
|
||||||
<%= @page.references.collect { |ref|
|
<%= @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(", ")
|
}.join(", ")
|
||||||
%>
|
%>
|
||||||
</small>
|
</small>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<ul>
|
<ul>
|
||||||
<% for page in @title_results %>
|
<% for page in @title_results %>
|
||||||
<li>
|
<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>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
<ul>
|
<ul>
|
||||||
<% for page in @results %>
|
<% for page in @results %>
|
||||||
<li>
|
<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>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
Loading…
Reference in a new issue