notebook/app/views/content/index.html.erb
2018-12-13 01:35:16 -06:00

50 lines
1.8 KiB
Plaintext

<%
content_type = @content_type_class.name.downcase
%>
<%= content_for :full_width_page_header do %>
<%= render partial: 'content/components/parallax_header', locals: { content_type: content_type } %>
<% end %>
<% if @content.any? %>
<%= render partial: 'content/components/list_filter_bar', locals: { } %>
<div class="card">
<%= render partial: 'content/list/list', locals: { content_list: @content, content_type: @content_type_class, show_add_another_form: true } %>
</div>
<% elsif @content.empty? %>
<div class="center" style="margin: 50px 0">
<h4>You haven't created any <%= content_type.pluralize %> yet!</h4>
<h1>
<i class="material-icons <%= @content_type_class.color %>-text" style="font-size: 200%">
<%= @content_type_class.icon %>
</i>
</h1>
<p>
<%= t("content_descriptions.#{content_type}") %>
</p>
<% if current_user.can_create? @content_type_class %>
<%= link_to "Create your first #{content_type.humanize.downcase}", new_polymorphic_path(@content_type_class), class: "btn #{@content_type_class.color}" %>
<% else %>
<%= link_to "Upgrade to Premium to create your first #{content_type.humanize.downcase}", subscription_path %>
<% end %>
<p class="grey-text text-lighten-2" style="padding-top: 20px;">
<% 5.times { %><i class="material-icons"><%= @content_type_class.icon %></i>&nbsp;&nbsp;&nbsp;&nbsp;<%}%>
</p>
<p style="padding-top: 20px">
You can now customize your <%= @content_type_class.name %> template, too!
</p>
<%=
link_to "Customize your #{@content_type_class.name} template",
attribute_customization_path(@content_type_class.name.downcase),
class: "btn #{@content_type_class.color}-text white"
%>
</div>
<% end %>