Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort option is changed according to the new UI #5176

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions app/views/tag/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<%= javascript_include_tag('async_tag_subscriptions.js') %>
<div class="col-md-12">
<div class="col-md-6">
<h1 style="font-family:Junction Light;"><%= t('tag.index.popular_tags') %></h1>

<% cache('feature_tags-header', skip_digest: true) do %>
Expand All @@ -10,19 +10,28 @@
<br/>
<form id="tagform" class="form-horizontal" method="GET" action="/tag/">
<div class="input-group">
<input type="search" tabindex="1" autocomplete="off" id="taginput" name="id" type="text" placeholder="Search for topics" data-provide="typeahead" class="form-control" required="required" />
<input type="search" tabindex="1" autocomplete="off" id="taginput" name="id" type="text" placeholder="Search for topics" data-provide="typeahead" class="form-control" required="required" style="min-width: 270px;" />
<span class="input-group-btn" >
<button type="submit" rel="tooltip" title="View content with the entered title" class="btn btn-primary-outline" style="margin-left: -40px;background-color: transparent;"><i class="fa fa-search" style="color: #ccc;"></i></button>
</span>
</div>
</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