mirror of
https://github.com/indentlabs/notebook.git
synced 2025-10-26 11:19:22 +00:00
allow dismissing associations banner
This commit is contained in:
parent
a44b5825e2
commit
2d5cdddfe9
@ -12,8 +12,8 @@ class UsersController < ApplicationController
|
||||
@content = @user.public_content.select { |type, list| list.any? }
|
||||
@tabs = @content.keys
|
||||
|
||||
@accent_color = @user.favorite_page_type_color
|
||||
@accent_icon = @user.favorite_page_type_icon
|
||||
@accent_color = @user.favorite_page_type_color
|
||||
@accent_icon = @user.favorite_page_type_icon
|
||||
@favorite_content = @user.favorite_page_type? ? @user.send(@user.favorite_page_type.downcase.pluralize).is_public : []
|
||||
|
||||
# todo this is really bad and needs redone/improved
|
||||
|
||||
@ -123,7 +123,7 @@ module HasContent
|
||||
.first(limit)
|
||||
|
||||
@user_recent_content_list = recently_changed_attributes.map do |entity_type, entity_id|
|
||||
entity_type.constantize.find_by(id: entity_id)
|
||||
entity_type.constantize.find_by(id: entity_id) rescue nil
|
||||
end.compact
|
||||
end
|
||||
|
||||
|
||||
@ -12,11 +12,19 @@
|
||||
<div id="associations_panel" class="row panel">
|
||||
<div class="row">
|
||||
<div class="col s12 m10 offset-m1">
|
||||
<div class="card-panel blue lighten-5">
|
||||
<i class="left material-icons grey-text">help</i>
|
||||
These associations are automatically created whenever you add another page to this universe.<br />
|
||||
Only you can see this message. <%= link_to 'Dismiss this message', '#' %>.
|
||||
</div>
|
||||
<% if current_user.notice_dismissals.where(notice_id: 7).none? %>
|
||||
<div class="col s12">
|
||||
<div class="hoverable card-panel blue lighten-5">
|
||||
<%= link_to prepay_path, class: 'black-text' do %>
|
||||
<i class="material-icons grey-text left">help</i>
|
||||
These associations are automatically created whenever you add another page to this universe.
|
||||
Only you can see this message.
|
||||
|
||||
<%= link_to 'Dismiss this notice.', notice_dismissal_dismiss_path(notice_id: 7), class: 'blue-text' %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% relations.each do |name, params| %>
|
||||
<%
|
||||
|
||||
Loading…
Reference in New Issue
Block a user