Handle library/title sorting on backend (#86)

This commit is contained in:
Alex Ling
2020-07-15 10:34:53 +00:00
parent 360913ee78
commit 94a1e63963
10 changed files with 263 additions and 205 deletions
+4 -3
View File
@@ -25,8 +25,9 @@
<div class="uk-margin-bottom uk-width-1-4@s">
<% hash = {
"auto" => "Auto",
"name" => "Name",
"date" => "Date Modified",
"title" => "Name",
"time_modified" => "Date Modified",
"time_added" => "Date Added",
"progress" => "Progress"
} %>
<%= render_component "sort-form" %>
@@ -37,7 +38,7 @@
<% progress = title_percentage[i] %>
<%= render_component "card" %>
<% end %>
<% title.entries.each_with_index do |item, i| %>
<% entries.each_with_index do |item, i| %>
<% progress = percentage[i] %>
<%= render_component "card" %>
<% end %>