mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-15 04:51:43 +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
|
||||
end
|
||||
|
||||
def help
|
||||
complex? && contents.dig('help')
|
||||
end
|
||||
|
||||
# Obtiene los valores posibles para el campo de la plantilla
|
||||
def values
|
||||
return '' if %w[string text].include? value
|
||||
|
|
|
@ -78,7 +78,7 @@
|
|||
- @post.template_fields.each do |template|
|
||||
- next unless type = template.type
|
||||
.form-group
|
||||
= label_tag "post_#{template}", template.human
|
||||
= label_tag "post_#{template}", template.help.present? ? template.help : template.human
|
||||
- name = "post[#{template}]"
|
||||
- value = @post.new? ? template.values : @post.get_front_matter(template)
|
||||
- case type
|
||||
|
|
Loading…
Reference in a new issue