Add option to configure feed items displayed in homepage

This commit is contained in:
rgarcia
2018-05-29 19:58:04 +02:00
parent 7c17eea6a3
commit b672a4550d
12 changed files with 90 additions and 44 deletions

View File

@@ -0,0 +1,9 @@
<div id="<%= dom_id(feed) %>">
<%= t("admin.homepage.feeds.#{feed.kind}") %><br/>
<%= render "setting", setting: feed.setting %>
<%= form_for [:admin, feed], remote: true do |f| %>
<%= f.select :limit, (1..10), {}, class: "js-submit-on-change" %>
<% end %>
</div>

View File

@@ -37,12 +37,13 @@
</div>
<hr>
<% @settings.each do |setting| %>
<div class="callout">
<h3 class="inline-block"><%= t("settings.#{setting.key}") %></h3>
<div class="float-right">
<%= render "setting", setting: setting %>
</div>
</div>
<% @feeds.each do |feed| %>
<%= render "feed", feed: feed %>
<% end %>
<div class="callout">
<h3 class="inline-block"><%= t("settings.#{@recommendations.key}") %></h3>
<div class="float-right">
<%= render "setting", setting: @recommendations %>
</div>
</div>