5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-10-05 08:26:56 +00:00

visualizar los campos privados con un icono y texto alternativo

This commit is contained in:
f 2018-06-19 14:50:53 -03:00
parent 6132d5f7cd
commit 7eeb50d302
No known key found for this signature in database
GPG key ID: F3FDAB97B5F9F7E7

View file

@ -78,9 +78,10 @@
- @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.help.present? ? template.help : template.human = label_tag "post_#{template}" do
- if template.private? - if template.private?
%small.text-muted.form-text.pull-right= t('posts.private') = fa_icon 'lock', alt: t('posts.private')
= 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