reuse content#index for timeline#index

This commit is contained in:
drusepth 2022-11-22 14:37:32 -08:00
parent 9c8e2bfe26
commit 04cc5a4ab6
2 changed files with 9 additions and 1 deletions

View File

@ -45,6 +45,14 @@ class TimelinesController < ApplicationController
# if params.key?(:favorite_only)
# @timelines.select!(&:favorite?)
# end
# New style, using content#index view (we can wipe unused stuff from above once this is finalized)
@content_type_class = Timeline
@content_type_name = @content_type_class.name
@content = @timelines
@folders = []
render 'content/index'
end
def show

View File

@ -263,7 +263,7 @@
<form class="space-y-4">
<% @page_tags.each do |page_tag| %>
<div class="flex items-center">
<input id="filter-tag-<%= page_tag.id %>" name="slug[]" <%= 'checked' if @filtered_page_tags.map(&:slug).include?(page_tag.slug) %> value="<%= page_tag.slug %>" type="checkbox" class="h-4 w-4 border-gray-300 rounded <%= @content_type_class.text_color %> focus:ring-notebook-blue">
<input id="filter-tag-<%= page_tag.id %>" name="slug[]" <%= 'checked' if @filtered_page_tags.map(&:slug).include?(page_tag.slug) %> value="<%= page_tag.slug %>" type="checkbox" class="h-4 w-4 border-gray-300 rounded <%= Timeline.text_color %> focus:ring-notebook-blue">
<label for="filter-tag-<%= page_tag.id %>" class="ml-3 pr-6 text-sm font-medium text-gray-900 whitespace-nowrap"><%= page_tag.tag %></label>
</div>
<% end %>