mirror of
https://github.com/indentlabs/notebook.git
synced 2025-10-26 11:19:22 +00:00
fix sidelinks for hidden categories
This commit is contained in:
parent
fe3ce777ee
commit
83e0080db6
@ -40,7 +40,8 @@ module HasAttributes
|
||||
end.compact
|
||||
|
||||
if categories.first&.user&.present?
|
||||
categories.first.user.attribute_categories.where(entity_type: self.content_name, hidden: [false, nil])
|
||||
acceptable_hidden_values = show_hidden ? [true, false, nil] : [false, nil]
|
||||
categories.first.user.attribute_categories.where(entity_type: self.content_name, hidden: acceptable_hidden_values)
|
||||
else
|
||||
categories
|
||||
end
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<% @content.class.attribute_categories(@content.user).each do |category| %>
|
||||
<% @content.class.attribute_categories(creating ? current_user : @content.user).each do |category| %>
|
||||
<% fields = category.attribute_fields %>
|
||||
<%
|
||||
#TODO: refactor ALL OF THIS
|
||||
|
||||
Loading…
Reference in New Issue
Block a user