From 81a91941ccb85a5d3aed72d62b4a265cfe7c9b82 Mon Sep 17 00:00:00 2001 From: Gautami Gupta <35326753+gautamig54@users.noreply.github.com> Date: Fri, 22 Mar 2019 02:11:16 +0530 Subject: [PATCH] Adding the links below the graph for Tags page (#5209) * add_links_below_graphs * add_links_below_graphs2 * highlighting the active link --- .../javascripts/async_tag_subscriptions.js | 10 +++++++-- app/views/tag/index.html.erb | 21 +++++++++++++++---- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/app/assets/javascripts/async_tag_subscriptions.js b/app/assets/javascripts/async_tag_subscriptions.js index 8eebb3ff0be..72aa204d895 100644 --- a/app/assets/javascripts/async_tag_subscriptions.js +++ b/app/assets/javascripts/async_tag_subscriptions.js @@ -1,4 +1,4 @@ -$(document).ready(function() +$(document).ready(function() { $('#taginput').typeahead({ items: 8, @@ -24,7 +24,7 @@ $(document).ready(function() var data_recv = JSON.parse(JSON.stringify(status)); notyNotification('relax', 3000, 'success', 'top', data_recv.message + 'Click here to manage your subscriptions. '); var html_new = ' Following'; - $('#follow-unfollow-column-'+data_recv.id).html(html_new); + $('#follow-unfollow-column-'+data_recv.id).html(html_new); }); $('.index-follow-buttons').on('ajax:error', function(data, status, xhr){ var data_recv = JSON.parse(JSON.stringify(status)); @@ -32,3 +32,9 @@ $(document).ready(function() }); }); +$(document).ready(function(){ + $('a').click(function(){ + $('a').removeClass("active"); + $(this).addClass("active"); + }); + }); diff --git a/app/views/tag/index.html.erb b/app/views/tag/index.html.erb index d2d6fce9e59..027c0f1197d 100644 --- a/app/views/tag/index.html.erb +++ b/app/views/tag/index.html.erb @@ -2,7 +2,7 @@

<%= t('tag.index.popular_tags') %>

- <% cache('feature_tags-header', skip_digest: true) do %> + <% cache('feature_tags-header', skip_digest: true) do %> <%= feature('tags-header') %> <% end %> @@ -15,7 +15,7 @@
- +

@@ -56,7 +56,20 @@
<%= will_paginate @tags, :renderer => BootstrapPagination::Rails if @paginated %>
+ +
-

- +

+ +
Tags most commonly used, linked by how often they are used together.
+ View 50 | + 100 | + 250 | + 500 +
+