Skip to content

Commit

Permalink
Sorting done (publiclab#5239)
Browse files Browse the repository at this point in the history
  • Loading branch information
divyabaid16 authored and icarito committed Apr 9, 2019
1 parent 829082c commit e98af23
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
15 changes: 12 additions & 3 deletions app/views/tag/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,20 @@
</form>
<br/><br/>

<p style="width: 100%; text-align: center; border-bottom: 1px solid #ccc; line-height:2px; margin: 10px 0 20px;">
<span style="background-color: #fff; padding: 0 10px; color: #808080;">Sort by:
<a href = "<%= tags_path %>?sort=name&order=<%= @order_type %>" style="text-decoration: underline; color: #808080;"><%= t('tag.index.tag') %></a><span> | </span>
<a href = "<%= tags_path %>?sort=followers&order=<%= @order_type %>" style="text-decoration: underline; color: #808080;"><%= t('tag.index.number_of_subscriptions')%></a><span> | </span>
<a href = "<%= tags_path %>?sort=uses&order=<%= @order_type %>" style="text-decoration: underline; color: #808080;"><%= t('tag.index.number_of_uses') %></a>
</span>
</p>
<br/>

<table class="table">
<tr>
<th><a href = "<%= tags_path %>?sort=name&order=<%= @order_type %>"><%= t('tag.index.tag') %></a> <i class="fa fa-arrows-v"></i></th>
<th><a href = "<%= tags_path %>?sort=uses&order=<%= @order_type %>"><%= t('tag.index.number_of_uses') %></a> <i class="fa fa-arrows-v"></i></th>
<th><a href = "<%= tags_path %>?sort=followers&order=<%= @order_type %>"><%= t('tag.index.number_of_subscriptions')%></a> <i class="fa fa-arrows-v"></i></th>
<th><%= t('tag.index.tag') %></th>
<th><%= t('tag.index.number_of_uses') %></th>
<th><%= t('tag.index.number_of_subscriptions')%></th>
<% if current_user %>
<th><a href = "<%= tags_path %>?sort=subscribers"><%= t('tag.index.subscriptions') %></a> <i class="fa fa-sort" aria-hidden="true"></i></th>
<% end %>
Expand Down
4 changes: 2 additions & 2 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -364,9 +364,9 @@ en:
popular_tags: "Popular tags"
browse_popular_tags: "We use tags to group research by topic -- browse below
to see the most popular tags over the past month."
tag: "Tag"
tag: "name"
number_of_uses: "# of uses"
number_of_subscriptions: "# of people subscribed"
number_of_subscriptions: "# of people"
subscriptions: "Your subscriptions"
sort_by: "Sort By"
show:
Expand Down

0 comments on commit e98af23

Please sign in to comment.