From 4e5488b6a1c6fff5ddb1482cf4e9c0e18c6cdd37 Mon Sep 17 00:00:00 2001 From: Lekhika Dugtal Date: Sat, 27 Jul 2019 00:35:39 +0530 Subject: [PATCH] Ad toggle icons for new sidebar (#6011) --- app/views/like/_like.html.erb | 169 ++++++++++++++++------------ app/views/notes/show.html.erb | 4 - app/views/sidebar/_related.html.erb | 17 +-- app/views/wiki/_header.html.erb | 4 - test/integration/I18n_test.rb | 3 - 5 files changed, 101 insertions(+), 96 deletions(-) diff --git a/app/views/like/_like.html.erb b/app/views/like/_like.html.erb index 00582feca7..66bc7e79cb 100644 --- a/app/views/like/_like.html.erb +++ b/app/views/like/_like.html.erb @@ -1,92 +1,99 @@ -
- +
  • <% if tagnames %><% tagnames.each do |tagname| %>

    <%= tagname %>

    <% end %><% end %>
    <% if current_user && !current_user.following?(node.author) %>  <%= node.author.name %><% else %>  <%= node.author.name %><% end %>"> + +
  • + + + Delete + + + Raw + + <% if logged_in_as(['admin', 'moderator']) %> + <% if node.type == 'note' %> + Spam + <% elsif node.type == 'page' %> + Spam revision + <% end %> + <% end %> +
    + <% end %> + +
    +
    + +
    +

    Print without page links

    +

    Print in 3-column layout

    +
    + "> + + + diff --git a/app/views/notes/show.html.erb b/app/views/notes/show.html.erb index d3112b3134..2090fee4a1 100644 --- a/app/views/notes/show.html.erb +++ b/app/views/notes/show.html.erb @@ -20,10 +20,6 @@ <% end %> -
    - <%= render :partial => "like/like", :locals => {:node => @node, :tagnames => @tagnames } %> -
    -

    <%= @node.title %>

    diff --git a/app/views/sidebar/_related.html.erb b/app/views/sidebar/_related.html.erb index feb99e52a2..a85cbfe7ce 100644 --- a/app/views/sidebar/_related.html.erb +++ b/app/views/sidebar/_related.html.erb @@ -4,14 +4,14 @@ <% if @node %> - <% subpage_count = Tag.find_pages("parent:#{@node.slug}", 100).count %> - <% if subpage_count > 0 %> -

    - - - <%= subpage_count %> sub-pages - -

    - <% end %> diff --git a/app/views/wiki/_header.html.erb b/app/views/wiki/_header.html.erb index a7d4768571..18ce5ffa4c 100644 --- a/app/views/wiki/_header.html.erb +++ b/app/views/wiki/_header.html.erb @@ -8,10 +8,6 @@ <% end %> -
    - <%= render partial: "like/like", locals: {node: @node, tagnames: @tagnames } %> -
    -

    diff --git a/test/integration/I18n_test.rb b/test/integration/I18n_test.rb index 7705728f2c..2066f8ee49 100644 --- a/test/integration/I18n_test.rb +++ b/test/integration/I18n_test.rb @@ -384,9 +384,6 @@ class I18nTest < ActionDispatch::IntegrationTest available_testing_locales.each do |lang| get '/change_locale/' + lang.to_s follow_redirect! - - get '/wiki/' + nodes(:organizers).title.parameterize - assert_select 'a', I18n.t('sidebar._related.write_research_note') end end