5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-07-04 15:55:45 +00:00

usar ltr por defecto (por ahora)

This commit is contained in:
f 2018-02-10 20:45:11 -03:00
parent 17f3d8c0ea
commit cb465c1995
No known key found for this signature in database
GPG key ID: F3FDAB97B5F9F7E7

View file

@ -4,8 +4,10 @@
- @post.errors.each do |_,error|
%li= error
-# TODO seleccionar la dirección por defecto según el idioma actual
- direction = @post.get_front_matter(:dir) || 'ltr'
-# string para configurar la clase con direccion de texto
- field_class = "form-control #{@post.get_front_matter(:dir)}"
- field_class = "form-control #{direction}"
-# TODO habilitar form_for
- if @post.new?
- url = site_posts_path(@site)
@ -20,12 +22,11 @@
= label_tag 'post_dir', t('posts.dir')
= select_tag 'post[dir]',
options_for_select([[t('posts.ltr'), 'ltr'], [t('posts.rtl'), 'rtl']],
@post.get_front_matter(:dir)),
{ class: 'form-control' }
direction, { class: 'form-control' }
.form-group
= text_field 'post', 'title', value: @post.title, class: field_class,
placeholder: t('posts.title')
.form-group{class: @post.get_front_matter(:dir)}
.form-group{class: direction}
= text_area_tag 'post[content]', @post.content, autofocus: true,
class: 'post-content',
cols: 72, wrap: 'hard'