diff --git a/app/assets/stylesheets/style.css b/app/assets/stylesheets/style.css index 4ab7727689..0bf628d7a2 100644 --- a/app/assets/stylesheets/style.css +++ b/app/assets/stylesheets/style.css @@ -412,10 +412,6 @@ div.note .meta { color:#888; } -.image-container { - height:auto; - overflow:auto; -} /*start of img aspect css that will affect the thumbnails which appears on the user's profile under their notes*/ diff --git a/app/views/grids/_thumbnail.html.erb b/app/views/grids/_thumbnail.html.erb index c119787e0c..e91f4ad5b2 100644 --- a/app/views/grids/_thumbnail.html.erb +++ b/app/views/grids/_thumbnail.html.erb @@ -1,62 +1,3 @@ -
- <% nodes.each_with_index do |node, index| %> - <% if index % 3 == 0 && index > 0 %> -
- <% end %> - <% if index > 8 %> -
- <% else %> -
- <% end %> - - <% if node.main_image %> - image - <% end %> - -

<%=node.title%>

-

- <% if node.type == 'note' %> - by <%= node.author.name %> <%= node.author.new_contributor %> - <%= distance_of_time_in_words(node.created_at, Time.current, { include_seconds: false, scope:'datetime.time_ago_in_words' }) %> - | <%= node.comments.size %> - <% else %> - <%= t('notes._notes.last_edit_by') %> <%= node.latest.author.name %> - <%= distance_of_time_in_words(Time.at(node.latest.timestamp), Time.current, { include_seconds: false, scope: 'datetime.time_ago_in_words' }) %> - <% end %> - | <%= number_with_delimiter(node.views) %> <%= t('notes._notes.views') %> - | <%= node.likes %> - | <% if node.has_tag("pin:#{tagname}") %> <% end %> -

-
- <% end %> -
- <% if nodes.count > 8 %> -
- Show more -
- <% end %> - - +
+ <%= render partial: 'notes/notes', locals: { notes: nodes, unpaginated: true } %> +
diff --git a/app/views/notes/_notes.html.erb b/app/views/notes/_notes.html.erb index 6617bd4214..c8ad3546c2 100644 --- a/app/views/notes/_notes.html.erb +++ b/app/views/notes/_notes.html.erb @@ -15,74 +15,72 @@ <% end %>
- <% if node.status == 4 %> -

- <% if logged_in_as(['admin','moderator']) %> - <%= t('notes._notes.moderate_first_time_post') %>
- <%= t('notes._notes.approve') %> - <%= t('notes._notes.spam') %> - <% else %> - <%= raw t('notes._notes.pending_approval', :url1 => '/wiki/moderation') %> - <% end %> -

- <% end %> + <% if node.status == 4 %> +

+ <% if @current_user && ['admin','moderator'].include?(@current_user.role) %> + <%= t('notes._notes.moderate_first_time_post') %>
+ <%= t('notes._notes.approve') %> + <%= t('notes._notes.spam') %> + <% else %> + <%= raw t('notes._notes.pending_approval', :url1 => '/wiki/moderation') %> + <% end %> +

+ <% end %> -
target="_blank"<% end %> href="<%= node.path %>" style="color: black"><%= (node.type == 'note') ? node.title : node.latest.title %>
+
target="_blank"<% end %> href="<%= node.path %>" style="color: black"><%= (node.type == 'note') ? node.title : node.latest.title %>
- - <% if node.type == 'note' %> -
Post by target="_blank"<% end %> href="/profile/<%= node.author.name %>" style="color: #303030">@<%= node.author.name %> <%= node.author.new_contributor %>

- <%= node.comments.size %>   |   <%= distance_of_time_in_words(node.created_at, Time.current, { include_seconds: false, scope:'datetime.time_ago_in_words' }).gsub('about ','') %> -   -
-
+ <% else %> +
  • + Last Edited: <%= t('notes._notes.last_edit_by') %> target="_blank"<% end %> href="/profile/<%= node.latest.author.name %>"><%= node.latest.author.name %> +
  • +
  • + <%= distance_of_time_in_words(Time.at(node.latest.timestamp), Time.current, { include_seconds: false, scope: 'datetime.time_ago_in_words' }) %> +
  • + <% end %> +
  • + Total Views: <%= number_with_delimiter(node.views) %> <%= t('notes._notes.views') %> +
  • +
  • + Total Likes: <%= node.likers.length %> +
  • +
    + <% if @compact.nil? %> + <% if node.has_tag("method") %> +

    + target="_blank"<% end %> href="<%= node.path %>#Activities"> <%= node.activities.count %> activities + target="_blank"<% end %> href="<%= node.path %>#Questions"> <%= node.questions.count %> questions +

    + <% end %> +
  • <% if @current_user && ['admin','moderator'].include?(@current_user.role) %> <%= t('notes._notes.spam') %><% end %>
  • +
  • <%= t('notes._notes.read_more') %>
  • + <% end %> + <% if @current_user && params[:mod] %> + <%= t('notes._notes.spam') %> + <% end %> + +
    + +
    - - <% unless @widget %>
    <% end %> - <% end %> - + + + + <% unless @widget %>
    <% end %> + <% end %> + -<%= will_paginate notes, renderer: WillPaginate::ActionView::BootstrapLinkRenderer unless @unpaginated %> +<%= will_paginate notes, renderer: WillPaginate::ActionView::BootstrapLinkRenderer unless @unpaginated || (unpaginated ||= false) %>