diff --git a/app/presenters/user_presenter.rb b/app/presenters/user_presenter.rb index 3a3add269..1b63c7989 100644 --- a/app/presenters/user_presenter.rb +++ b/app/presenters/user_presenter.rb @@ -56,15 +56,15 @@ class UserPresenter end def upload_count(template) - template.link_to(user.post_upload_count, template.posts_path(:tags => "user:#{user.name}")) + template.link_to(user.post_upload_count, template.posts_path(tags: "user:#{user.name}"), rel: "nofollow") end def deleted_upload_count(template) - template.link_to(user.posts.deleted.count, template.posts_path(:tags => "status:deleted user:#{user.name}")) + template.link_to(user.posts.deleted.count, template.posts_path(tags: "status:deleted user:#{user.name}"), rel: "nofollow") end def favorite_count(template) - template.link_to(user.favorite_count, template.posts_path(tags: "ordfav:#{user.name}")) + template.link_to(user.favorite_count, template.posts_path(tags: "ordfav:#{user.name}"), rel: "nofollow") end def favorite_group_count(template) @@ -78,7 +78,7 @@ class UserPresenter def commented_posts_count(template) count = PostQueryBuilder.new("commenter:#{user.name}").fast_count count = "?" if count.nil? - template.link_to(count, template.posts_path(:tags => "commenter:#{user.name} order:comment_bumped")) + template.link_to(count, template.posts_path(tags: "commenter:#{user.name} order:comment_bumped"), rel: "nofollow") end def post_version_count(template) @@ -92,7 +92,7 @@ class UserPresenter def noted_posts_count(template) count = PostQueryBuilder.new("noteupdater:#{user.name}").fast_count count = "?" if count.nil? - template.link_to(count, template.posts_path(:tags => "noteupdater:#{user.name} order:note")) + template.link_to(count, template.posts_path(tags: "noteupdater:#{user.name} order:note"), rel: "nofollow") end def wiki_page_version_count(template) @@ -108,7 +108,7 @@ class UserPresenter end def forum_post_count(template) - template.link_to(user.forum_post_count, template.forum_posts_path(:search => {:creator_id => user.id})) + template.link_to(user.forum_post_count, template.forum_posts_path(search: { creator_id: user.id }), rel: "nofollow") end def pool_version_count(template) @@ -128,7 +128,7 @@ class UserPresenter end def approval_count(template) - template.link_to(Post.where("approver_id = ?", user.id).count, template.posts_path(:tags => "approver:#{user.name}")) + template.link_to(Post.where(approver: user).count, template.posts_path(tags: "approver:#{user.name}"), rel: "nofollow") end def feedbacks(template) diff --git a/app/views/artists/index.html.erb b/app/views/artists/index.html.erb index 4ba542b68..ed8edf733 100644 --- a/app/views/artists/index.html.erb +++ b/app/views/artists/index.html.erb @@ -14,7 +14,7 @@ <% end %> <% t.column "Other Names", td: {class: "col-expand"} do |artist| %> <% artist.other_names.each do |name| %> - <%= link_to name, artists_path(search: { any_name_matches: name }), class: "artist-other-name" %> + <%= link_to name, artists_path(search: { any_name_matches: name }), class: "artist-other-name", rel: "nofollow" %> <% end %> <% end %> <% t.column "Status" do |artist| %> diff --git a/app/views/artists/show_or_new.html.erb b/app/views/artists/show_or_new.html.erb index 05b1f0479..73e8265e3 100644 --- a/app/views/artists/show_or_new.html.erb +++ b/app/views/artists/show_or_new.html.erb @@ -1,5 +1,5 @@ <%= render layout: "show" do %>
-

This artist entry does not exist. <%= link_to "Create new artist entry", new_artist_path(artist: { name: params[:name] }) %>.

+

This artist entry does not exist. <%= link_to "Create new artist entry", new_artist_path(artist: { name: params[:name] }), rel: "nofollow" %>.

<% end %> diff --git a/app/views/posts/partials/index/_excerpt.html.erb b/app/views/posts/partials/index/_excerpt.html.erb index 89d5636e4..cbd048b85 100644 --- a/app/views/posts/partials/index/_excerpt.html.erb +++ b/app/views/posts/partials/index/_excerpt.html.erb @@ -63,7 +63,7 @@ Creator: <%= link_to_user post_set.favgroup.creator %> <% elsif post_set.has_blank_wiki? %> -

There is currently no wiki page for the tag <%= link_to_wiki post_set.tag.pretty_name %>. You can <%= link_to "create one", new_wiki_page_path(wiki_page: { title: post_set.tag.name }) %>.

+

There is currently no wiki page for the tag <%= link_to_wiki post_set.tag.pretty_name %>. You can <%= link_to "create one", new_wiki_page_path(wiki_page: { title: post_set.tag.name }), rel: "nofollow" %>.

<%= render "tag_relationships/alias_and_implication_list", tag: post_set.tag %> <% end %> diff --git a/app/views/posts/partials/index/_related.html.erb b/app/views/posts/partials/index/_related.html.erb index cf0461b3f..cd0923567 100644 --- a/app/views/posts/partials/index/_related.html.erb +++ b/app/views/posts/partials/index/_related.html.erb @@ -9,11 +9,11 @@
  • <%= link_to "Viewed", viewed_explore_posts_path %>
  • <% end %> -
  • <%= link_to "Deleted", posts_path(tags: "#{params[:tags]} status:deleted") %>
  • -
  • <%= link_to "Random", random_posts_path(tags: params[:tags]), id: "random-post", "data-shortcut": "r" %>
  • +
  • <%= link_to "Deleted", posts_path(tags: "#{params[:tags]} status:deleted"), rel: "nofollow" %>
  • +
  • <%= link_to "Random", random_posts_path(tags: params[:tags]), id: "random-post", "data-shortcut": "r", rel: "nofollow" %>
  • <% if post_set.query.is_simple_tag? %> -
  • <%= link_to "History", post_versions_path(search: { changed_tags: params[:tags] }) %>
  • +
  • <%= link_to "History", post_versions_path(search: { changed_tags: params[:tags] }), rel: "nofollow" %>
  • <% end %> -
  • <%= link_to "Count", posts_counts_path(:tags => params[:tags]) %>
  • +
  • <%= link_to "Count", posts_counts_path(tags: params[:tags]), rel: "nofollow" %>
  • diff --git a/app/views/posts/partials/show/_child_notice.html.erb b/app/views/posts/partials/show/_child_notice.html.erb index c363b9c4c..4017e7012 100644 --- a/app/views/posts/partials/show/_child_notice.html.erb +++ b/app/views/posts/partials/show/_child_notice.html.erb @@ -1,4 +1,4 @@ -This post has <%= link_to pluralize(children.length, "child"), posts_path(tags: "parent:#{parent.id}") %> +This post has <%= link_to pluralize(children.length, "child"), posts_path(tags: "parent:#{parent.id}"), rel: "nofollow" %> (<%= link_to_wiki "learn more", "help:post_relationships" %>) <%= link_to("« hide", "#", id: "has-children-relationship-preview-link") %> diff --git a/app/views/posts/partials/show/_parent_notice.html.erb b/app/views/posts/partials/show/_parent_notice.html.erb index 639e83b30..d4388757f 100644 --- a/app/views/posts/partials/show/_parent_notice.html.erb +++ b/app/views/posts/partials/show/_parent_notice.html.erb @@ -1,8 +1,8 @@ -This post belongs to a <%= link_to "parent", posts_path(tags: "parent:#{parent.id}") %> <% "(deleted)" if parent.is_deleted? %> +This post belongs to a <%= link_to "parent", posts_path(tags: "parent:#{parent.id}"), rel: "nofollow" %> <% "(deleted)" if parent.is_deleted? %> <% children.length.tap do |children_count| %> <% if children_count > 1 %> - and has <%= link_to pluralize(children_count - 1, "sibling"), posts_path(tags: "parent:#{parent.id}") %> + and has <%= link_to pluralize(children_count - 1, "sibling"), posts_path(tags: "parent:#{parent.id}"), rel: "nofollow" %> <% end %> <% end %> diff --git a/app/views/wiki_pages/show.html.erb b/app/views/wiki_pages/show.html.erb index bd3b0bd22..af7285b70 100644 --- a/app/views/wiki_pages/show.html.erb +++ b/app/views/wiki_pages/show.html.erb @@ -23,7 +23,7 @@ <% end %> <% if @wiki_page.new_record? %> -

    This wiki page does not exist. <%= link_to "Create new wiki page", new_wiki_page_path(wiki_page: { title: @wiki_page.title }) %>.

    +

    This wiki page does not exist. <%= link_to "Create new wiki page", new_wiki_page_path(wiki_page: { title: @wiki_page.title }), rel: "nofollow" %>.

    <% else %> <%= format_text(@wiki_page.body) %> <% end %>