mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-26 16:06:22 +00:00
fix: editar desde el panel
This commit is contained in:
parent
b06751e62e
commit
a62039b50a
2 changed files with 13 additions and 0 deletions
6
app/views/posts/attribute_ro/_has_one.haml
Normal file
6
app/views/posts/attribute_ro/_has_one.haml
Normal file
|
@ -0,0 +1,6 @@
|
|||
%tr{ id: attribute }
|
||||
%th= post_label_t(attribute, post: post)
|
||||
%td{ dir: dir, lang: locale }
|
||||
- p = metadata.belongs_to
|
||||
- if p
|
||||
= link_to p.title.value, site_post_path(site, p.id)
|
7
app/views/posts/attributes/_has_one.haml
Normal file
7
app/views/posts/attributes/_has_one.haml
Normal file
|
@ -0,0 +1,7 @@
|
|||
.form-group
|
||||
= label_tag "#{base}_#{attribute}", post_label_t(attribute, post: post)
|
||||
= select_tag(plain_field_name_for(base, attribute),
|
||||
options_for_select(metadata.values, metadata.value),
|
||||
**field_options(attribute, metadata), include_blank: t('.empty'))
|
||||
= render 'posts/attribute_feedback',
|
||||
post: post, attribute: attribute, metadata: metadata
|
Loading…
Reference in a new issue