mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-08-14.git
synced 2024-08-15 00:53:20 +00:00
Split content sorting bar from channel-information
This commit is contained in:
parent
efd53285cf
commit
39187cc8c2
9 changed files with 36 additions and 37 deletions
|
@ -12,8 +12,7 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% content_type = 5 %>
|
<% content_type = 5 %>
|
||||||
<% sort_options = Tuple.new %>
|
<%= rendered "components/channels/channel-information" %>
|
||||||
<%= rendered "components/channel-information" %>
|
|
||||||
|
|
||||||
<div class="pure-g h-box" id="about-content-container">
|
<div class="pure-g h-box" id="about-content-container">
|
||||||
<div class="pure-u-1 pure-u-md-3-4">
|
<div class="pure-u-1 pure-u-md-3-4">
|
||||||
|
|
|
@ -4,8 +4,7 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% content_type = 3 %>
|
<% content_type = 3 %>
|
||||||
<% sort_options = Tuple.new %>
|
<%= rendered "components/channels/channel-information" %>
|
||||||
<%= rendered "components/channel-information" %>
|
|
||||||
|
|
||||||
<% if error_message %>
|
<% if error_message %>
|
||||||
<div class="h-box">
|
<div class="h-box">
|
||||||
|
|
|
@ -4,8 +4,7 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% content_type = 4 %>
|
<% content_type = 4 %>
|
||||||
<% sort_options = Tuple.new %>
|
<%= rendered "components/channels/channel-information" %>
|
||||||
<%= rendered "components/channel-information" %>
|
|
||||||
|
|
||||||
<div class="pure-g h-box">
|
<div class="pure-g h-box">
|
||||||
<% if !featured_channel_categories.empty? %>
|
<% if !featured_channel_categories.empty? %>
|
||||||
|
|
|
@ -4,8 +4,7 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% content_type = 0 %>
|
<% content_type = 0 %>
|
||||||
<% sort_options = Tuple.new %>
|
<%= rendered "components/channels/channel-information" %>
|
||||||
<%= rendered "components/channel-information" %>
|
|
||||||
|
|
||||||
<div class="pure-g">
|
<div class="pure-g">
|
||||||
<% items.each do | section | %>
|
<% items.each do | section | %>
|
||||||
|
|
|
@ -4,7 +4,8 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% content_type = 2 %>
|
<% content_type = 2 %>
|
||||||
<%= rendered "components/channel-information" %>
|
<%= rendered "components/channels/channel-information" %>
|
||||||
|
<%= rendered "components/channels/content-sorting-bar" %>
|
||||||
|
|
||||||
<div class="pure-g">
|
<div class="pure-g">
|
||||||
<% items.each_slice(4) do |slice| %>
|
<% items.each_slice(4) do |slice| %>
|
||||||
|
|
|
@ -5,7 +5,8 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% content_type = 1 %>
|
<% content_type = 1 %>
|
||||||
<%= rendered "components/channel-information" %>
|
<%= rendered "components/channels/channel-information" %>
|
||||||
|
<%= rendered "components/channels/content-sorting-bar" %>
|
||||||
|
|
||||||
<div class="pure-g">
|
<div class="pure-g">
|
||||||
<% items.each_slice(4) do |slice| %>
|
<% items.each_slice(4) do |slice| %>
|
||||||
|
|
|
@ -173,31 +173,5 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="h-box">
|
<div class="h-box">
|
||||||
<% if content_type == 1 || content_type == 2 %>
|
|
||||||
<% # We really only need a single <hr> (handled below) outside of content_type 1 or 2 %>
|
|
||||||
<hr>
|
|
||||||
<% route = content_type == 1 ? "/videos" : "/playlists" %>
|
|
||||||
<% url = "/channel/#{channel.ucid + route}" %>
|
|
||||||
|
|
||||||
<div class="pure-menu pure-menu-horizontal" id="sort-options" style="display: flex;">
|
|
||||||
<ul class="pure-menu-list" style="margin-left: auto;">
|
|
||||||
<% sort_options.each do |sort| %>
|
|
||||||
<% if sort_by == sort %>
|
|
||||||
<li class="pure-menu-item pure-menu-selected">
|
|
||||||
<a class="pure-menu-link" href="<%= url %>?sort_by=<%= sort %>">
|
|
||||||
<b><%= translate(locale, sort) %></b>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<% else %>
|
|
||||||
<li class="pure-menu-item">
|
|
||||||
<a class="pure-menu-link" href="<%= url %>?sort_by=<%= sort %>">
|
|
||||||
<%= translate(locale, sort) %>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
<hr>
|
<hr>
|
||||||
</div>
|
</div>
|
|
@ -0,0 +1,27 @@
|
||||||
|
|
||||||
|
<div class="h-box">
|
||||||
|
<% route = content_type == 1 ? "/videos" : "/playlists" %>
|
||||||
|
<% url = "/channel/#{channel.ucid + route}" %>
|
||||||
|
|
||||||
|
<div class="pure-menu pure-menu-horizontal" id="sort-options" style="display: flex;">
|
||||||
|
<ul class="pure-menu-list" style="margin-left: auto;">
|
||||||
|
<% sort_options.each do |sort| %>
|
||||||
|
<% if sort_by == sort %>
|
||||||
|
<li class="pure-menu-item pure-menu-selected">
|
||||||
|
<a class="pure-menu-link" href="<%= url %>?sort_by=<%= sort %>">
|
||||||
|
<b><%= translate(locale, sort) %></b>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<% else %>
|
||||||
|
<li class="pure-menu-item">
|
||||||
|
<a class="pure-menu-link" href="<%= url %>?sort_by=<%= sort %>">
|
||||||
|
<%= translate(locale, sort) %>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
</div>
|
|
@ -12,7 +12,7 @@
|
||||||
<% if is_channel_search && channel.is_a? AboutChannel && !subscriptions.nil? %>
|
<% if is_channel_search && channel.is_a? AboutChannel && !subscriptions.nil? %>
|
||||||
<% content_type = 7 %>
|
<% content_type = 7 %>
|
||||||
<% sort_options = Tuple.new %>
|
<% sort_options = Tuple.new %>
|
||||||
<%= rendered "components/channel-information" %>
|
<%= rendered "components/channels/channel-information" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% if count == 0 %>
|
<% if count == 0 %>
|
||||||
|
|
Loading…
Reference in a new issue