5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2025-02-17 00:31:46 +00:00
panel/app/views/posts/_attributes.haml

18 lines
557 B
Text
Raw Permalink Normal View History

2024-04-17 21:09:55 +00:00
-#
@param base [String]
@param locale [String]
@param post [Post]
@param site [Site]
@param dir [String]
@param except [Array<Symbol>]
- (post.attributes - local_assigns[:except].to_a).each do |attribute|
2024-04-17 21:09:55 +00:00
- metadata = post[attribute]
- type = metadata.type
- cache [metadata, I18n.locale] do
= render("posts/attributes/#{type}",
2024-05-24 16:23:30 +00:00
base: base, post: post, attribute: attribute,
metadata: metadata, site: site,
dir: dir, locale: locale,
autofocus: (post.attributes.first == attribute))