mirror of
https://0xacab.org/sutty/sutty
synced 2025-01-20 05:13:39 +00:00
mostrar la ayuda si está disponible
This commit is contained in:
parent
c3cdd40195
commit
a7edb84bd8
2 changed files with 5 additions and 1 deletions
|
@ -114,6 +114,10 @@ class Post
|
||||||
h
|
h
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def help
|
||||||
|
complex? && contents.dig('help')
|
||||||
|
end
|
||||||
|
|
||||||
# Obtiene los valores posibles para el campo de la plantilla
|
# Obtiene los valores posibles para el campo de la plantilla
|
||||||
def values
|
def values
|
||||||
return '' if %w[string text].include? value
|
return '' if %w[string text].include? value
|
||||||
|
|
|
@ -78,7 +78,7 @@
|
||||||
- @post.template_fields.each do |template|
|
- @post.template_fields.each do |template|
|
||||||
- next unless type = template.type
|
- next unless type = template.type
|
||||||
.form-group
|
.form-group
|
||||||
= label_tag "post_#{template}", template.human
|
= label_tag "post_#{template}", template.help.present? ? template.help : template.human
|
||||||
- name = "post[#{template}]"
|
- name = "post[#{template}]"
|
||||||
- value = @post.new? ? template.values : @post.get_front_matter(template)
|
- value = @post.new? ? template.values : @post.get_front_matter(template)
|
||||||
- case type
|
- case type
|
||||||
|
|
Loading…
Reference in a new issue