diff --git a/app/views/tag/_profileCard.html.erb b/app/views/tag/_profileCard.html.erb new file mode 100644 index 00000000000..9edab12979b --- /dev/null +++ b/app/views/tag/_profileCard.html.erb @@ -0,0 +1,42 @@ + +
+<% @profile_user.tags.each do |tag| %> +
+
+

<%= tag.name %>

+

<%= Tag.follower_count(tag.name) %> people discussing

+
+
+
+ <% Tag.find_nodes_by_type(tag.name, type = 'note', limit = 3).each do |node| %> +
+ <% if node.author.name == @profile_user.name %> + <% if node.main_image %> + + <% elsif node.scraped_image %> + + <% end %> +

target="_blank"<% end %> href="<%= node.path %>"><%= (node.type == 'note') ? node.title : node.latest.title %>

+

by target="_blank"<% end %> href="/profile/<%= node.author.name %>">@<%= node.author.name %>

+ <% end %> +
+ <% end %> +
+
+ +
+<% end %> +
diff --git a/app/views/users/profile.html.erb b/app/views/users/profile.html.erb index 11f4cda37fc..f3eedbeef21 100644 --- a/app/views/users/profile.html.erb +++ b/app/views/users/profile.html.erb @@ -28,95 +28,9 @@
-
- - -
-
- -
-
- -
- -
- -
-
- <%= render :partial => "notes/notes" %> -
- -
- <%= render :partial => "notes/coauthored_notes" %> -
- - <% if current_user && current_user.uid == @profile_user.uid %> -
- <%= render :partial => "notes/draft_notes" %> -
- <% end %> -
-
- -
- - -
-
- <%= render :partial => "questions/questions" %> -
- -
- <%= render :partial => "users/answered" %> -
-
-
- -
-

<%= raw t('users.profile.view_these_maps', :url1 => "//mapknitter.org/profile/"+@profile_user.name) %>

- - - - - - -
<%= t('users.profile.title') %><%= t('users.profile.creation_date') %><%= t('users.profile.image') %>
-
- -
- <%= render partial: 'comments/comments', locals: { comments: current_user &.can_moderate? ? @all_comments : @normal_comments } %> -
- -
- <%= render :partial => "users/likes" %> -
- -
- <% @profile_user.barnstars.each do |tag| %> -

<%= raw t('users.profile.barnstar_awarded_to_by', :url1 => "/profile/"+tag.node.author.name, :author => tag.node.author.name, :url2 => "/wiki/barnstars#"+tag.name.split(':').last.split('-').each{|w| w.capitalize!}.join('+'), :barnstar => tag.name.split(':').last.split('-').each{|w| w.capitalize!}.join(' '), :url3 => "/profile/"+tag.author.username, :awarder => tag.author.username, :url4 => tag.node.path, :work => tag.node.title) %>

-
- <% end %> -
-
+ <%= render :partial => "tag/profileCard" %>