|
|
@ -19,11 +19,12 @@
|
|
|
|
<% filter_params = env.request.query_params.to_s.gsub(/q=.+?(?=&|$)/, "") %>
|
|
|
|
<% filter_params = env.request.query_params.to_s.gsub(/q=.+?(?=&|$)/, "") %>
|
|
|
|
<% base_url = "/search?q=#{HTML.escape(query.not_nil!)}" %>
|
|
|
|
<% base_url = "/search?q=#{HTML.escape(query.not_nil!)}" %>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="pure-u-1-3 pure-u-md-1-5" id="filter-date">
|
|
|
|
<div class="pure-u-1-3 pure-u-md-1-5 filter-catagory" id="filter-date">
|
|
|
|
<b><%= translate(locale, "date") %></b>
|
|
|
|
<b><%= translate(locale, "date") %></b>
|
|
|
|
<hr/>
|
|
|
|
<hr/>
|
|
|
|
|
|
|
|
<ul class="pure-menu-list">
|
|
|
|
<% ["hour", "today", "week", "month", "year"].each do |date| %>
|
|
|
|
<% ["hour", "today", "week", "month", "year"].each do |date| %>
|
|
|
|
<div class="pure-u-1 pure-md-1-5">
|
|
|
|
<li class="pure-menu-item">
|
|
|
|
<% if operator_hash.fetch("date", "all") == date %>
|
|
|
|
<% if operator_hash.fetch("date", "all") == date %>
|
|
|
|
<a style="color: inherit;" href="<%= base_url + "#{filter_params.gsub(/&date=[a-z]+/, "")}"%>">
|
|
|
|
<a style="color: inherit;" href="<%= base_url + "#{filter_params.gsub(/&date=[a-z]+/, "")}"%>">
|
|
|
|
<b><%= translate(locale, date) %></b>
|
|
|
|
<b><%= translate(locale, date) %></b>
|
|
|
@ -34,15 +35,17 @@
|
|
|
|
<%= translate(locale, date) %>
|
|
|
|
<%= translate(locale, date) %>
|
|
|
|
</a>
|
|
|
|
</a>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="pure-u-1-3 pure-u-md-1-5" id="filter-content_type">
|
|
|
|
<div class="pure-u-1-3 pure-u-md-1-5 filter-catagory" id="filter-content_type">
|
|
|
|
<b><%= translate(locale, "content_type") %></b>
|
|
|
|
<b><%= translate(locale, "content_type") %></b>
|
|
|
|
<hr/>
|
|
|
|
<hr/>
|
|
|
|
|
|
|
|
<ul class="pure-menu-list">
|
|
|
|
<% ["video", "channel", "playlist", "movie", "show"].each do |content_type| %>
|
|
|
|
<% ["video", "channel", "playlist", "movie", "show"].each do |content_type| %>
|
|
|
|
<div class="pure-u-1 pure-md-1-5">
|
|
|
|
<li class="pure-menu-item">
|
|
|
|
<% if operator_hash.fetch("content_type", "all") == content_type %>
|
|
|
|
<% if operator_hash.fetch("content_type", "all") == content_type %>
|
|
|
|
<a style="color: inherit;" href="<%= base_url + "#{filter_params.gsub(/&content_type=[a-z]+/, "")}"%>">
|
|
|
|
<a style="color: inherit;" href="<%= base_url + "#{filter_params.gsub(/&content_type=[a-z]+/, "")}"%>">
|
|
|
|
<b><%= translate(locale, content_type) %></b>
|
|
|
|
<b><%= translate(locale, content_type) %></b>
|
|
|
@ -53,15 +56,17 @@
|
|
|
|
<%= translate(locale, content_type) %>
|
|
|
|
<%= translate(locale, content_type) %>
|
|
|
|
</a>
|
|
|
|
</a>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="pure-u-1-3 pure-u-md-1-5" id="filter-duration">
|
|
|
|
<div class="pure-u-1-3 pure-u-md-1-5 filter-catagory" id="filter-duration">
|
|
|
|
<b><%= translate(locale, "duration") %></b>
|
|
|
|
<b><%= translate(locale, "duration") %></b>
|
|
|
|
<hr/>
|
|
|
|
<hr/>
|
|
|
|
|
|
|
|
<ul class="pure-menu-list">
|
|
|
|
<% ["short", "long"].each do |duration| %>
|
|
|
|
<% ["short", "long"].each do |duration| %>
|
|
|
|
<div class="pure-u-1 pure-md-1-5">
|
|
|
|
<li class="pure-menu-item">
|
|
|
|
<% if operator_hash.fetch("duration", "all") == duration %>
|
|
|
|
<% if operator_hash.fetch("duration", "all") == duration %>
|
|
|
|
<a style="color: inherit;" href="<%= base_url + "#{filter_params.gsub(/&duration=[a-z]+/, "")}"%>">
|
|
|
|
<a style="color: inherit;" href="<%= base_url + "#{filter_params.gsub(/&duration=[a-z]+/, "")}"%>">
|
|
|
|
<b><%= translate(locale, duration) %></b>
|
|
|
|
<b><%= translate(locale, duration) %></b>
|
|
|
@ -72,15 +77,17 @@
|
|
|
|
<%= translate(locale, duration) %>
|
|
|
|
<%= translate(locale, duration) %>
|
|
|
|
</a>
|
|
|
|
</a>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="pure-u-1-3 pure-u-md-1-5" id="filter-features">
|
|
|
|
<div class="pure-u-1-3 pure-u-md-1-5 filter-catagory" id="filter-features">
|
|
|
|
<b><%= translate(locale, "features") %></b>
|
|
|
|
<b><%= translate(locale, "features") %></b>
|
|
|
|
<hr/>
|
|
|
|
<hr/>
|
|
|
|
|
|
|
|
<ul class="pure-menu-list">
|
|
|
|
<% ["hd", "subtitles", "creative_commons", "3d", "live", "purchased", "4k", "360", "location", "hdr"].each do |feature| %>
|
|
|
|
<% ["hd", "subtitles", "creative_commons", "3d", "live", "purchased", "4k", "360", "location", "hdr"].each do |feature| %>
|
|
|
|
<div class="pure-u-1 pure-md-1-5">
|
|
|
|
<li class="pure-menu-item">
|
|
|
|
<% if operator_hash.fetch("features", "all").includes?(feature) %>
|
|
|
|
<% if operator_hash.fetch("features", "all").includes?(feature) %>
|
|
|
|
<% if operator_hash["features"].split(",").size == 1 %>
|
|
|
|
<% if operator_hash["features"].split(",").size == 1 %>
|
|
|
|
<a style="color: inherit;" href="<%= base_url + "#{filter_params.gsub(/&features=[a-z]+/, "")}"%>">
|
|
|
|
<a style="color: inherit;" href="<%= base_url + "#{filter_params.gsub(/&features=[a-z]+/, "")}"%>">
|
|
|
@ -106,11 +113,12 @@
|
|
|
|
<%= translate(locale, feature) %>
|
|
|
|
<%= translate(locale, feature) %>
|
|
|
|
</a>
|
|
|
|
</a>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="pure-u-1-3 pure-u-md-1-5" id="filter-sort">
|
|
|
|
<div class="pure-u-1-3 pure-u-md-1-5 filter-catagory" id="filter-sort">
|
|
|
|
<b><%= translate(locale, "sort") %></b>
|
|
|
|
<b><%= translate(locale, "sort") %></b>
|
|
|
|
<hr/>
|
|
|
|
<hr/>
|
|
|
|
<% ["relevance", "rating", "date", "views"].each do |sort| %>
|
|
|
|
<% ["relevance", "rating", "date", "views"].each do |sort| %>
|
|
|
|