From 4af8e15c592c90ba9a659db32992b47691f4d05c Mon Sep 17 00:00:00 2001 From: r888888888 Date: Fri, 12 May 2017 15:00:00 -0700 Subject: [PATCH] refactor artist views --- app/views/artists/_summary.html.erb | 42 ++++++++++++++++++ app/views/artists/show.html.erb | 40 +---------------- .../posts/partials/index/_excerpt.html.erb | 43 ++----------------- app/views/users/_statistics.html.erb | 8 ++-- 4 files changed, 51 insertions(+), 82 deletions(-) create mode 100644 app/views/artists/_summary.html.erb diff --git a/app/views/artists/_summary.html.erb b/app/views/artists/_summary.html.erb new file mode 100644 index 000000000..f51c51db4 --- /dev/null +++ b/app/views/artists/_summary.html.erb @@ -0,0 +1,42 @@ + + \ No newline at end of file diff --git a/app/views/artists/show.html.erb b/app/views/artists/show.html.erb index edf615e9c..c91eb0324 100644 --- a/app/views/artists/show.html.erb +++ b/app/views/artists/show.html.erb @@ -12,45 +12,7 @@ <% if @artist.visible? %>
- + <%= render "summary", artist: @artist %>
<% else %> diff --git a/app/views/posts/partials/index/_excerpt.html.erb b/app/views/posts/partials/index/_excerpt.html.erb index 0e6559226..af665b21b 100644 --- a/app/views/posts/partials/index/_excerpt.html.erb +++ b/app/views/posts/partials/index/_excerpt.html.erb @@ -13,43 +13,7 @@ <% end %>
- - + <%= render "artists/summary", artist: artist %> <%= artist_alias_and_implication_list(artist) %>
- + <% end %> <% elsif post_set.has_favgroup? %>

diff --git a/app/views/users/_statistics.html.erb b/app/views/users/_statistics.html.erb index b2de534f2..f9244056e 100644 --- a/app/views/users/_statistics.html.erb +++ b/app/views/users/_statistics.html.erb @@ -39,10 +39,10 @@ <%= presenter.upload_count(self) %> <% if presenter.has_uploads? %> - (<%= link_to "tag changes report", reports_upload_tags_path(user_id: user.id) %>) + [<%= link_to "tag changes report", reports_upload_tags_path(user_id: user.id) %>] <% end %> <% if CurrentUser.is_moderator? %> - (<%= link_to "sample", posts_path(:tags => "user:#{user.name} order:random limit:300") %>) + [<%= link_to "sample", posts_path(:tags => "user:#{user.name} order:random limit:300") %>] <% end %> @@ -52,7 +52,7 @@ <%= presenter.deleted_upload_count(self) %> <% if CurrentUser.is_moderator? %> - (<%= link_to "sample", posts_path(:tags => "user:#{user.name} order:random limit:300 status:deleted") %>) + [<%= link_to "sample", posts_path(:tags => "user:#{user.name} order:random limit:300 status:deleted") %>] <% end %> @@ -63,7 +63,7 @@ <%= presenter.favorite_count(self) %> <% if CurrentUser.is_moderator? %> - (<%= link_to "sample", posts_path(:tags => "fav:#{user.name} order:random limit:300") %>) + [<%= link_to "sample", posts_path(:tags => "fav:#{user.name} order:random limit:300") %>] <% end %>