Add API data to show/index views

This commit is contained in:
BrokenEagle
2020-01-04 01:51:37 +00:00
parent e8a96c1a2a
commit 223a6df5d8
60 changed files with 337 additions and 34 deletions

View File

@@ -4,7 +4,7 @@
<%= render "search" %>
<%= table_for @bans, {class: "striped autofit"}, {"data-expired": ["%s", "item.expired?"]} do |t| %>
<%= table_for @bans, {class: "striped autofit"} do |t| %>
<% t.column "Banned User" do |ban| %>
<%= link_to_user(ban.user) %>
<%= link_to "»", bans_path(search: search_params.merge(user_name: ban.user.name)) %>

View File

@@ -1,7 +1,7 @@
<div id="c-forum-posts">
<div id="a-index">
<%= table_for @forum_posts, {class: "striped", width: "100%"}, {"data-is-deleted": ["%s", "item.is_deleted?"], "data-topic-is-deleted": ["%s", "item.topic.is_deleted?"]} do |t| %>
<%= table_for @forum_posts, {class: "striped", width: "100%"} do |t| %>
<% t.column "Topic", nil, {class: "forum-post-topic-title"} do |forum_post| %>
<%= link_to forum_post.topic.title, forum_topic_path(forum_post.topic) %>
<% end %>

View File

@@ -75,7 +75,7 @@
<%= yield :html_header %>
<%= raw Danbooru.config.custom_html_header_content %>
</head>
<%= tag.body **body_attributes(CurrentUser.user) do %>
<%= tag.body **body_attributes(CurrentUser.user, (defined?(@current_item) ? @current_item : nil)) do %>
<%= render "news_updates/listing" %>
<header id="top">