summaryrefslogtreecommitdiffstats
path: root/app/views/wiki
diff options
context:
space:
mode:
authorEric Davis <edavis@littlestreamsoftware.com>2010-10-27 16:27:06 +0000
committerEric Davis <edavis@littlestreamsoftware.com>2010-10-27 16:27:06 +0000
commite9efa5b9814bbeddd9956b8478ed26af02b0eeca (patch)
treed2b8c54194c7410edd114483d3645d9945aff17a /app/views/wiki
parent70bf0706b2f7933f72cbd4daab8e43b0ac9de4e9 (diff)
downloadredmine-e9efa5b9814bbeddd9956b8478ed26af02b0eeca.tar.gz
redmine-e9efa5b9814bbeddd9956b8478ed26af02b0eeca.zip
Refactor: use :id instead of :page when linking to Wiki Pages
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4296 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/wiki')
-rw-r--r--app/views/wiki/_sidebar.rhtml2
-rw-r--r--app/views/wiki/annotate.rhtml8
-rw-r--r--app/views/wiki/date_index.html.erb2
-rw-r--r--app/views/wiki/destroy.rhtml2
-rw-r--r--app/views/wiki/diff.rhtml6
-rw-r--r--app/views/wiki/edit.rhtml4
-rw-r--r--app/views/wiki/history.rhtml4
-rw-r--r--app/views/wiki/show.rhtml30
8 files changed, 29 insertions, 29 deletions
diff --git a/app/views/wiki/_sidebar.rhtml b/app/views/wiki/_sidebar.rhtml
index 7f60825aa..9a24963f2 100644
--- a/app/views/wiki/_sidebar.rhtml
+++ b/app/views/wiki/_sidebar.rhtml
@@ -4,6 +4,6 @@
<h3><%= l(:label_wiki) %></h3>
-<%= link_to l(:field_start_page), {:action => 'show', :page => nil} %><br />
+<%= link_to l(:field_start_page), {:action => 'show', :id => nil} %><br />
<%= link_to l(:label_index_by_title), {:action => 'index'} %><br />
<%= link_to l(:label_index_by_date), {:action => 'date_index'} %><br />
diff --git a/app/views/wiki/annotate.rhtml b/app/views/wiki/annotate.rhtml
index 1e664fb84..dfea19581 100644
--- a/app/views/wiki/annotate.rhtml
+++ b/app/views/wiki/annotate.rhtml
@@ -1,12 +1,12 @@
<div class="contextual">
-<%= link_to(l(:button_edit), {:action => 'edit', :page => @page.title}, :class => 'icon icon-edit') %>
-<%= link_to(l(:label_history), {:action => 'history', :page => @page.title}, :class => 'icon icon-history') %>
+<%= link_to(l(:button_edit), {:action => 'edit', :id => @page.title}, :class => 'icon icon-edit') %>
+<%= link_to(l(:label_history), {:action => 'history', :id => @page.title}, :class => 'icon icon-history') %>
</div>
<h2><%= @page.pretty_title %></h2>
<p>
-<%= l(:label_version) %> <%= link_to @annotate.content.version, :action => 'show', :page => @page.title, :version => @annotate.content.version %>
+<%= l(:label_version) %> <%= link_to @annotate.content.version, :action => 'show', :id => @page.title, :version => @annotate.content.version %>
<em>(<%= @annotate.content.author ? @annotate.content.author.name : "anonyme" %>, <%= format_time(@annotate.content.updated_on) %>)</em>
</p>
@@ -18,7 +18,7 @@
<% @annotate.lines.each do |line| -%>
<tr class="bloc-<%= colors[line[0]] %>">
<th class="line-num"><%= line_num %></th>
- <td class="revision"><%= link_to line[0], :controller => 'wiki', :action => 'show', :project_id => @project, :page => @page.title, :version => line[0] %></td>
+ <td class="revision"><%= link_to line[0], :controller => 'wiki', :action => 'show', :project_id => @project, :id => @page.title, :version => line[0] %></td>
<td class="author"><%= h(line[1]) %></td>
<td class="line-code"><pre><%=h line[2] %></pre></td>
</tr>
diff --git a/app/views/wiki/date_index.html.erb b/app/views/wiki/date_index.html.erb
index 086d8f632..01385bc49 100644
--- a/app/views/wiki/date_index.html.erb
+++ b/app/views/wiki/date_index.html.erb
@@ -12,7 +12,7 @@
<h3><%= format_date(date) %></h3>
<ul>
<% @pages_by_date[date].each do |page| %>
- <li><%= link_to page.pretty_title, :action => 'show', :page => page.title %></li>
+ <li><%= link_to page.pretty_title, :action => 'show', :id => page.title %></li>
<% end %>
</ul>
<% end %>
diff --git a/app/views/wiki/destroy.rhtml b/app/views/wiki/destroy.rhtml
index 99f470320..400230f89 100644
--- a/app/views/wiki/destroy.rhtml
+++ b/app/views/wiki/destroy.rhtml
@@ -15,5 +15,5 @@
</div>
<%= submit_tag l(:button_apply) %>
-<%= link_to l(:button_cancel), :controller => 'wiki', :action => 'show', :project_id => @project, :page => @page.title %>
+<%= link_to l(:button_cancel), :controller => 'wiki', :action => 'show', :project_id => @project, :id => @page.title %>
<% end %>
diff --git a/app/views/wiki/diff.rhtml b/app/views/wiki/diff.rhtml
index a9eebdb9a..90478ed86 100644
--- a/app/views/wiki/diff.rhtml
+++ b/app/views/wiki/diff.rhtml
@@ -1,14 +1,14 @@
<div class="contextual">
-<%= link_to(l(:label_history), {:action => 'history', :page => @page.title}, :class => 'icon icon-history') %>
+<%= link_to(l(:label_history), {:action => 'history', :id => @page.title}, :class => 'icon icon-history') %>
</div>
<h2><%= @page.pretty_title %></h2>
<p>
-<%= l(:label_version) %> <%= link_to @diff.content_from.version, :action => 'show', :page => @page.title, :version => @diff.content_from.version %>
+<%= l(:label_version) %> <%= link_to @diff.content_from.version, :action => 'show', :id => @page.title, :version => @diff.content_from.version %>
<em>(<%= @diff.content_from.author ? @diff.content_from.author.name : "anonyme" %>, <%= format_time(@diff.content_from.updated_on) %>)</em>
&#8594;
-<%= l(:label_version) %> <%= link_to @diff.content_to.version, :action => 'show', :page => @page.title, :version => @diff.content_to.version %>/<%= @page.content.version %>
+<%= l(:label_version) %> <%= link_to @diff.content_to.version, :action => 'show', :id => @page.title, :version => @diff.content_to.version %>/<%= @page.content.version %>
<em>(<%= @diff.content_to.author ? @diff.content_to.author.name : "anonyme" %>, <%= format_time(@diff.content_to.updated_on) %>)</em>
</p>
diff --git a/app/views/wiki/edit.rhtml b/app/views/wiki/edit.rhtml
index b14bfb720..a140e2088 100644
--- a/app/views/wiki/edit.rhtml
+++ b/app/views/wiki/edit.rhtml
@@ -1,6 +1,6 @@
<h2><%=h @page.pretty_title %></h2>
-<% form_for :content, @content, :url => {:action => 'update', :page => @page.title}, :html => {:multipart => true, :id => 'wiki_form'} do |f| %>
+<% form_for :content, @content, :url => {:action => 'update', :id => @page.title}, :html => {:multipart => true, :id => 'wiki_form'} do |f| %>
<%= f.hidden_field :version %>
<%= error_messages_for 'content' %>
@@ -10,7 +10,7 @@
<p><%= submit_tag l(:button_save) %>
<%= link_to_remote l(:label_preview),
- { :url => { :controller => 'wiki', :action => 'preview', :project_id => @project, :page => @page.title },
+ { :url => { :controller => 'wiki', :action => 'preview', :project_id => @project, :id => @page.title },
:method => 'post',
:update => 'preview',
:with => "Form.serialize('wiki_form')",
diff --git a/app/views/wiki/history.rhtml b/app/views/wiki/history.rhtml
index 1f73fd173..5d44598f9 100644
--- a/app/views/wiki/history.rhtml
+++ b/app/views/wiki/history.rhtml
@@ -19,13 +19,13 @@
<% line_num = 1 %>
<% @versions.each do |ver| %>
<tr class="<%= cycle("odd", "even") %>">
- <td class="id"><%= link_to ver.version, :action => 'show', :page => @page.title, :version => ver.version %></td>
+ <td class="id"><%= link_to ver.version, :action => 'show', :id => @page.title, :version => ver.version %></td>
<td class="checkbox"><%= radio_button_tag('version', ver.version, (line_num==1), :id => "cb-#{line_num}", :onclick => "$('cbto-#{line_num+1}').checked=true;") if show_diff && (line_num < @versions.size) %></td>
<td class="checkbox"><%= radio_button_tag('version_from', ver.version, (line_num==2), :id => "cbto-#{line_num}") if show_diff && (line_num > 1) %></td>
<td align="center"><%= format_time(ver.updated_on) %></td>
<td><%= link_to_user ver.author %></td>
<td><%=h ver.comments %></td>
- <td align="center"><%= link_to l(:button_annotate), :action => 'annotate', :page => @page.title, :version => ver.version %></td>
+ <td align="center"><%= link_to l(:button_annotate), :action => 'annotate', :id => @page.title, :version => ver.version %></td>
</tr>
<% line_num += 1 %>
<% end %>
diff --git a/app/views/wiki/show.rhtml b/app/views/wiki/show.rhtml
index d8bc8c55e..173ac9ee2 100644
--- a/app/views/wiki/show.rhtml
+++ b/app/views/wiki/show.rhtml
@@ -1,25 +1,25 @@
<div class="contextual">
<% if @editable %>
-<%= link_to_if_authorized(l(:button_edit), {:action => 'edit', :page => @page.title}, :class => 'icon icon-edit', :accesskey => accesskey(:edit)) if @content.version == @page.content.version %>
+<%= link_to_if_authorized(l(:button_edit), {:action => 'edit', :id => @page.title}, :class => 'icon icon-edit', :accesskey => accesskey(:edit)) if @content.version == @page.content.version %>
<%= watcher_tag(@page, User.current) %>
-<%= link_to_if_authorized(l(:button_lock), {:action => 'protect', :page => @page.title, :protected => 1}, :method => :post, :class => 'icon icon-lock') if !@page.protected? %>
-<%= link_to_if_authorized(l(:button_unlock), {:action => 'protect', :page => @page.title, :protected => 0}, :method => :post, :class => 'icon icon-unlock') if @page.protected? %>
-<%= link_to_if_authorized(l(:button_rename), {:action => 'rename', :page => @page.title}, :class => 'icon icon-move') if @content.version == @page.content.version %>
-<%= link_to_if_authorized(l(:button_delete), {:action => 'destroy', :page => @page.title}, :method => :delete, :confirm => l(:text_are_you_sure), :class => 'icon icon-del') %>
-<%= link_to_if_authorized(l(:button_rollback), {:action => 'edit', :page => @page.title, :version => @content.version }, :class => 'icon icon-cancel') if @content.version < @page.content.version %>
+<%= link_to_if_authorized(l(:button_lock), {:action => 'protect', :id => @page.title, :protected => 1}, :method => :post, :class => 'icon icon-lock') if !@page.protected? %>
+<%= link_to_if_authorized(l(:button_unlock), {:action => 'protect', :id => @page.title, :protected => 0}, :method => :post, :class => 'icon icon-unlock') if @page.protected? %>
+<%= link_to_if_authorized(l(:button_rename), {:action => 'rename', :id => @page.title}, :class => 'icon icon-move') if @content.version == @page.content.version %>
+<%= link_to_if_authorized(l(:button_delete), {:action => 'destroy', :id => @page.title}, :method => :delete, :confirm => l(:text_are_you_sure), :class => 'icon icon-del') %>
+<%= link_to_if_authorized(l(:button_rollback), {:action => 'edit', :id => @page.title, :version => @content.version }, :class => 'icon icon-cancel') if @content.version < @page.content.version %>
<% end %>
-<%= link_to_if_authorized(l(:label_history), {:action => 'history', :page => @page.title}, :class => 'icon icon-history') %>
+<%= link_to_if_authorized(l(:label_history), {:action => 'history', :id => @page.title}, :class => 'icon icon-history') %>
</div>
-<%= breadcrumb(@page.ancestors.reverse.collect {|parent| link_to h(parent.pretty_title), {:page => parent.title}}) %>
+<%= breadcrumb(@page.ancestors.reverse.collect {|parent| link_to h(parent.pretty_title), {:id => parent.title}}) %>
<% if @content.version != @page.content.version %>
<p>
- <%= link_to(('&#171; ' + l(:label_previous)), :action => 'show', :page => @page.title, :version => (@content.version - 1)) + " - " if @content.version > 1 %>
+ <%= link_to(('&#171; ' + l(:label_previous)), :action => 'show', :id => @page.title, :version => (@content.version - 1)) + " - " if @content.version > 1 %>
<%= "#{l(:label_version)} #{@content.version}/#{@page.content.version}" %>
- <%= '(' + link_to('diff', :controller => 'wiki', :action => 'diff', :page => @page.title, :version => @content.version) + ')' if @content.version > 1 %> -
- <%= link_to((l(:label_next) + ' &#187;'), :action => 'show', :page => @page.title, :version => (@content.version + 1)) + " - " if @content.version < @page.content.version %>
- <%= link_to(l(:label_current_version), :action => 'show', :page => @page.title) %>
+ <%= '(' + link_to('diff', :controller => 'wiki', :action => 'diff', :id => @page.title, :version => @content.version) + ')' if @content.version > 1 %> -
+ <%= link_to((l(:label_next) + ' &#187;'), :action => 'show', :id => @page.title, :version => (@content.version + 1)) + " - " if @content.version < @page.content.version %>
+ <%= link_to(l(:label_current_version), :action => 'show', :id => @page.title) %>
<br />
<em><%= @content.author ? @content.author.name : "anonyme" %>, <%= format_time(@content.updated_on) %> </em><br />
<%=h @content.comments %>
@@ -35,7 +35,7 @@
<div id="wiki_add_attachment">
<p><%= link_to l(:label_attachment_new), {}, :onclick => "Element.show('add_attachment_form'); Element.hide(this); Element.scrollTo('add_attachment_form'); return false;",
:id => 'attach_files_link' %></p>
-<% form_tag({ :controller => 'wiki', :action => 'add_attachment', :project_id => @project, :page => @page.title }, :multipart => true, :id => "add_attachment_form", :style => "display:none;") do %>
+<% form_tag({ :controller => 'wiki', :action => 'add_attachment', :project_id => @project, :id => @page.title }, :multipart => true, :id => "add_attachment_form", :style => "display:none;") do %>
<div class="box">
<p><%= render :partial => 'attachments/form' %></p>
</div>
@@ -46,8 +46,8 @@
<% end %>
<% other_formats_links do |f| %>
- <%= f.link_to 'HTML', :url => {:page => @page.title, :version => @content.version} %>
- <%= f.link_to 'TXT', :url => {:page => @page.title, :version => @content.version} %>
+ <%= f.link_to 'HTML', :url => {:id => @page.title, :version => @content.version} %>
+ <%= f.link_to 'TXT', :url => {:id => @page.title, :version => @content.version} %>
<% end if User.current.allowed_to?(:export_wiki_pages, @project) %>
<% content_for :header_tags do %>