mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-26 19:56:21 +00:00
Merge branch 'issue-10491' into panel.sutty.nl
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
commit
20cfaf0777
3 changed files with 26 additions and 24 deletions
|
@ -44,6 +44,6 @@ class MetadataLocales < MetadataHasAndBelongsToMany
|
||||||
def posts
|
def posts
|
||||||
other_locales.map do |locale|
|
other_locales.map do |locale|
|
||||||
site.posts(lang: locale).where(layout: post.layout.value)
|
site.posts(lang: locale).where(layout: post.layout.value)
|
||||||
end.reduce(&:concat) || PostRelation.new
|
end.reduce(&:concat) || PostRelation.new(site: site, lang: 'any')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
- if site.locales.count > 1
|
||||||
%tr{ id: attribute }
|
%tr{ id: attribute }
|
||||||
%th= post_label_t(attribute, post: post)
|
%th= post_label_t(attribute, post: post)
|
||||||
%td
|
%td
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
- if site.locales.count > 1
|
||||||
%fieldset
|
%fieldset
|
||||||
%legend= post_label_t(attribute, post: post)
|
%legend= post_label_t(attribute, post: post)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue