From ea39a9ae8bed39a3134f17ac4e38881ae578d453 Mon Sep 17 00:00:00 2001 From: f Date: Thu, 8 Feb 2018 16:11:53 -0300 Subject: [PATCH] faltaban duracion y recomendaciones --- app/controllers/posts_controller.rb | 2 +- app/views/posts/_form.haml | 10 ++++++++++ config/locales/en.yml | 4 ++++ config/locales/es.yml | 4 ++++ 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/app/controllers/posts_controller.rb b/app/controllers/posts_controller.rb index 67872a73..69a72da5 100644 --- a/app/controllers/posts_controller.rb +++ b/app/controllers/posts_controller.rb @@ -51,7 +51,7 @@ class PostsController < ApplicationController def post_params params.require(:post).permit(:title, :date, :content, :slug, :cover, :layout, :permalink, :objetivos, - :duracion, :formato, :habilidades, + :duracion, :formato, :habilidades, :recomendaciones, conocimientos: [], sesiones_ejercicios_relacionados: [], materiales_requeridos: [], lang: {}, tags: [], categories: []) diff --git a/app/views/posts/_form.haml b/app/views/posts/_form.haml index 8d3020fb..2e36e238 100644 --- a/app/views/posts/_form.haml +++ b/app/views/posts/_form.haml @@ -64,6 +64,16 @@ = text_area 'post', 'objetivos', value: @post.get_front_matter(:objetivos), class: 'form-control' %small.text-muted.form-text= t('posts.objetivos_help') + .form-group + = label_tag 'post_recomendaciones', t('posts.recomendaciones') + = text_area 'post', 'recomendaciones', value: @post.get_front_matter(:recomendaciones), + class: 'form-control' + %small.text-muted.form-text= t('posts.recomendaciones_help') + .form-group + = label_tag 'post_duracion', t('posts.duracion') + = text_field 'post', 'duracion', value: @post.get_front_matter(:duracion), + class: 'form-control' + %small.text-muted.form-text= t('posts.duracion_help') .form-group = label_tag 'post_habilidades', t('posts.habilidades') = select_tag 'post[habilidades]', diff --git a/config/locales/en.yml b/config/locales/en.yml index a23713f8..816afdf7 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -31,6 +31,10 @@ en: objetivos_help: 'Objectives of this session' permalink: 'Permanent link' permalink_help: "If you want to access the post from a specific URL, use this field. Don\'t forget to start with a /" + recomendaciones: 'Recommendations' + recomendaciones_help: 'Recommendations for this session' + duracion: 'Duration' + duracion_help: "How long does the session take to finish?" habilidades: 'Skill level' habilidades_help: 'Skills required for this session' formato: 'Format' diff --git a/config/locales/es.yml b/config/locales/es.yml index 118ac3be..6b9b9f86 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -39,6 +39,10 @@ es: sesiones_ejercicios_relacionados_help: 'Elige todas las sesiones relacionadas con esta' materiales_requeridos: 'Materiales requeridos' materiales_requeridos_help: 'Materiales necesarios para esta sesión' + recomendaciones: 'Recomendaciones' + recomendaciones_help: 'Recomendaciones para esta sesión' + duracion: 'Duración' + duracion_help: '¿Cuánto dura la sesión?' lang: es: 'Slug castellano' en: 'Slug en inglés'