mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-04-11.git
synced 2024-08-15 00:43:26 +00:00
Add check for empty chan category in featured chan
This commit is contained in:
parent
8aca0a1d50
commit
a7a3f86af4
1 changed files with 30 additions and 30 deletions
|
@ -73,43 +73,43 @@
|
|||
</div>
|
||||
</details>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<h3 class="pure-u-1">
|
||||
<%= translate(locale, "This channel doesn't feature any other channels.")%>
|
||||
</h3>
|
||||
<% end %>
|
||||
|
||||
<!-- #<div class="channel-section pure-u-1 pure-u-md-1-4 pure-u-lg-1-6"> -->
|
||||
</div>
|
||||
|
||||
<div class="pure-g h-box">
|
||||
<div class="pure-u-1 pure-u-lg-1-5">
|
||||
<% if previous_continuation %>
|
||||
<a href="/channel/<%=channel.ucid%>/channels/<%=category_param%>?continuation=<%=HTML.escape(previous_continuation)%>&offset=<%=offset.not_nil!-1%>&title=<%=HTML.escape(title.not_nil!)%>">
|
||||
<%= translate(locale, "Previous page") %>
|
||||
</a>
|
||||
<% elsif (offset - 1) == 0 %>
|
||||
<a href="/channel/<%=channel.ucid%>/channels/<%=category_param%>">
|
||||
<%= translate(locale, "Previous page") %>
|
||||
</a>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="pure-u-1 pure-u-lg-3-5"></div>
|
||||
<div class="pure-u-1 pure-u-lg-1-5" style="text-align:right">
|
||||
<% if (next_cont_token = featured_channel_categories[0].continuation_token) %>
|
||||
<% additional_url_param = ""%>
|
||||
<% if continuation %>
|
||||
<% additional_url_param = "&previous=#{HTML.escape(continuation)}"%>
|
||||
<%end %>
|
||||
<% if !title %>
|
||||
<% title = featured_channel_categories[0].title %>
|
||||
<%end %>
|
||||
<% if !featured_channel_categories.empty? %>
|
||||
<div class="pure-g h-box">
|
||||
<div class="pure-u-1 pure-u-lg-1-5">
|
||||
<% if previous_continuation %>
|
||||
<a href="/channel/<%=channel.ucid%>/channels/<%=category_param%>?continuation=<%=HTML.escape(previous_continuation)%>&offset=<%=offset.not_nil!-1%>&title=<%=HTML.escape(title.not_nil!)%>">
|
||||
<%= translate(locale, "Previous page") %>
|
||||
</a>
|
||||
<% elsif (offset - 1) == 0 %>
|
||||
<a href="/channel/<%=channel.ucid%>/channels/<%=category_param%>">
|
||||
<%= translate(locale, "Previous page") %>
|
||||
</a>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="pure-u-1 pure-u-lg-3-5"></div>
|
||||
<div class="pure-u-1 pure-u-lg-1-5" style="text-align:right">
|
||||
<% if (next_cont_token = featured_channel_categories[0].continuation_token) %>
|
||||
<% additional_url_param = ""%>
|
||||
<% if continuation %>
|
||||
<% additional_url_param = "&previous=#{HTML.escape(continuation)}"%>
|
||||
<% end %>
|
||||
<% if !title %>
|
||||
<% title = featured_channel_categories[0].title %>
|
||||
<% end %>
|
||||
|
||||
|
||||
<a href="/channel/<%=channel.ucid%>/channels/<%=category_param%>?continuation=<%=HTML.escape(next_cont_token)%>&offset=<%=offset.not_nil!+1%>&title=<%=HTML.escape(title)%><%=additional_url_param%>">
|
||||
<%= translate(locale, "Next page") %>
|
||||
</a>
|
||||
<% end %>
|
||||
<a href="/channel/<%=channel.ucid%>/channels/<%=category_param%>?continuation=<%=HTML.escape(next_cont_token)%>&offset=<%=offset.not_nil!+1%>&title=<%=HTML.escape(title)%><%=additional_url_param%>">
|
||||
<%= translate(locale, "Next page") %>
|
||||
</a>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
Loading…
Reference in a new issue