<%= params[:title] %>
- - <% if params[:redirected_from].present? %> -This wiki page does not exist. <%= link_to "Create new wiki page", new_wiki_page_path(:wiki_page => {:title => params[:title]}) %>.
diff --git a/app/assets/stylesheets/specific/wiki_pages.css.scss b/app/assets/stylesheets/specific/wiki_pages.css.scss index feab83c89..6c114ec19 100644 --- a/app/assets/stylesheets/specific/wiki_pages.css.scss +++ b/app/assets/stylesheets/specific/wiki_pages.css.scss @@ -27,9 +27,4 @@ div#c-wiki-pages { margin-left: 15em; padding-left: 1em; } - - div.redirected-from { - font-size: 0.8em; - margin-bottom: 1em; - } } diff --git a/app/controllers/wiki_pages_controller.rb b/app/controllers/wiki_pages_controller.rb index ce2690368..a3ca8ee28 100644 --- a/app/controllers/wiki_pages_controller.rb +++ b/app/controllers/wiki_pages_controller.rb @@ -67,12 +67,8 @@ class WikiPagesController < ApplicationController def show_or_new @wiki_page = WikiPage.find_by_title(params[:title]) - tag_alias = TagAlias.where("status = 'active' and antecedent_name = ?", params[:title]).first - - if tag_alias && params[:no_redirect].blank? - redirect_to show_or_new_wiki_pages_path(:title => tag_alias.consequent_name, :redirected_from => params[:title]) - elsif @wiki_page - redirect_to wiki_page_path(@wiki_page, :redirected_from => params[:redirected_from]) + if @wiki_page + redirect_to wiki_page_path(@wiki_page) else @wiki_page = WikiPage.new(:title => params[:title]) respond_with(@wiki_page) diff --git a/app/helpers/wiki_pages_helper.rb b/app/helpers/wiki_pages_helper.rb index c0506de35..382b6ae9b 100644 --- a/app/helpers/wiki_pages_helper.rb +++ b/app/helpers/wiki_pages_helper.rb @@ -15,7 +15,7 @@ module WikiPagesHelper if consequent_aliases.any? html << "
The following tags are aliased to this tag: " - html << raw(consequent_aliases.map {|x| link_to(x.antecedent_name, show_or_new_wiki_pages_path(:title => x.antecedent_name, :no_redirect => true))}.join(", ")) + html << raw(consequent_aliases.map {|x| link_to(x.antecedent_name, show_or_new_wiki_pages_path(:title => x.antecedent_name))}.join(", ")) html << ".
" end diff --git a/app/views/wiki_pages/show.html.erb b/app/views/wiki_pages/show.html.erb index 0a739d067..4b4f37bb4 100644 --- a/app/views/wiki_pages/show.html.erb +++ b/app/views/wiki_pages/show.html.erb @@ -12,10 +12,6 @@ <% end %> - <% if params[:redirected_from].present? %> -This wiki page does not exist. <%= link_to "Create new wiki page", new_wiki_page_path(:wiki_page => {:title => params[:title]}) %>.