Refactor channel sorting links to dropdown

(cherry picked from commit 5b81d429ea)
This commit is contained in:
syeopite 2021-03-29 11:31:41 -07:00
parent 551594e4f0
commit 33cae2f707
No known key found for this signature in database
GPG key ID: 6FA616E5A5294A82

View file

@ -74,19 +74,30 @@
</div>
</div>
<div class="pure-u-1-3"></div>
<div class="pure-u-1-3">
<div class="pure-g" style="text-align:right">
<div class="pure-u-1-3"> <!-- Sort by -->
<div class="pure-menu pure-menu-horizontal" style="">
<ul class="pure-menu-list", style="float: right">
<li class="pure-menu-item pure-menu-has-children pure-menu-allow-hover">
<a class="pure-menu-link">Sort By</a> <!-- Translate! -->
<ul class="pure-menu-children">
<% sort_options.each do |sort| %>
<div class="pure-u-1 pure-md-1-3">
<% if sort_by == sort %>
<li class="pure-menu-item pure-menu-selected">
<a class="pure-menu-link" href="/channel/<%= channel.ucid %>?page=<%= page %>&sort_by=<%= sort %>">
<b><%= translate(locale, sort) %></b>
</a>
</li>
<% else %>
<a href="/channel/<%= ucid %>?page=<%= page %>&sort_by=<%= sort %>">
<li class="pure-menu-item">
<a class="pure-menu-link" href="/channel/<%= channel.ucid %>?page=<%= page %>&sort_by=<%= sort %>">
<%= translate(locale, sort) %>
</a>
</li>
<% end %>
</div>
<% end %>
</ul>
</li>
</ul>
</div>
</div>
</div>