5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-22 18:46:22 +00:00
panel/views/posts/_form.haml

20 lines
1 KiB
Text

%form{method: 'post', action: "/sites/#{@site.name}/posts/#{@post.basename}"}
.form-group
%button.btn.btn-success{type: 'submit'} Guardar
.form-group
%textarea.form-control.post-content{name: 'post[content]', id: 'contents', autofocus: true}
= @post.content
.form-group
%label{for: 'date'} Fecha de publicación
%input.form-control{type: 'text', name: 'post[date]', id: 'date', value: @post.data['date'].strftime('%F')}
.form-group
%label{for: 'title'} Título
%input.form-control{type: 'text', name: 'post[title]', id: 'title', value: @post.data['title']}
.form-group
%label{for: 'tags'} Etiquetas
%input.form-control{type: 'text', name: 'post[tags]', id: 'tags', value: @post.data['tags'].join(',')}
%small.form-text.text-muted Separadas por comas
.form-group
%label{for: 'categories'} Categorías
%input.form-control{type: 'text', name: 'post[categories]', id: 'categories', value: @post.data['categories'].join(',')}
%small.form-text.text-muted Separadas por comas