mirror of
https://github.com/indentlabs/notebook.git
synced 2025-10-26 11:19:22 +00:00
61 lines
1.9 KiB
Plaintext
61 lines
1.9 KiB
Plaintext
<div class="row">
|
|
<%= render partial: 'main/dashboard_header_links' %>
|
|
|
|
<% if @content %>
|
|
<div class="col s12">
|
|
<%= render partial: 'cards/serendipitous/content_question', locals: {
|
|
content: @content,
|
|
field: @attribute_field_to_question,
|
|
expand_by_default: true
|
|
} %>
|
|
</div>
|
|
<% end %>
|
|
|
|
<%
|
|
s_width = 12
|
|
m_width = 6
|
|
l_width = 6
|
|
%>
|
|
|
|
<% current_user_universe_ids = current_user.universes.pluck(:id) %>
|
|
<% @activated_content_types.each do |content_type| %>
|
|
<%
|
|
pluralized_content_name = content_type.downcase.pluralize
|
|
|
|
if @universe_scope.present? && content_type != 'Universe'
|
|
content_list = @universe_scope.send(pluralized_content_name)
|
|
else
|
|
content_list = @current_user_content[content_type] || [] +
|
|
current_user.send("contributable_#{pluralized_content_name}")
|
|
end
|
|
|
|
content_list = content_list.uniq
|
|
%>
|
|
|
|
<div class="dashboard-row col <%= "s#{s_width} m#{m_width} l#{l_width}" %>">
|
|
<%= render partial: 'content/cards/in_universe_content_list', locals: { content_type: content_type.downcase, content_list: content_list } %>
|
|
</div>
|
|
<% end %>
|
|
|
|
<div class="dashboard-row col <%= "s#{s_width} m#{m_width} l#{l_width}" %>">
|
|
<%= link_to customization_content_types_path do %>
|
|
<div class="hoverable card">
|
|
<div class="card-image">
|
|
<%= image_tag "card-headers/more.jpg", height: 265 %>
|
|
<span class="card-title bordered-text">
|
|
<div>
|
|
<i class="material-icons white-text" style="position: relative; top: 3px;">add</i>
|
|
<%= pluralize((Rails.application.config.content_types[:all].count - @activated_content_types.count), 'other page type') %> available
|
|
</div>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
|
|
<% 5.times do %>
|
|
<br />
|
|
<% end %>
|
|
|
|
<%= render partial: 'javascripts/content_linking' %> |