From 11bb3273aa80af6b0290b005e349a26b110ec066 Mon Sep 17 00:00:00 2001 From: f Date: Mon, 26 Feb 2018 15:46:47 -0300 Subject: [PATCH] mejorar visor de sitios --- app/views/sites/_enqueue.haml | 13 ------------- app/views/sites/index.haml | 22 +++++++++++++++++++--- config/locales/en.yml | 4 +++- config/locales/es.yml | 4 +++- 4 files changed, 25 insertions(+), 18 deletions(-) delete mode 100644 app/views/sites/_enqueue.haml diff --git a/app/views/sites/_enqueue.haml b/app/views/sites/_enqueue.haml deleted file mode 100644 index fc69d339..00000000 --- a/app/views/sites/_enqueue.haml +++ /dev/null @@ -1,13 +0,0 @@ -- if site.enqueued? - %span.badge.badge-warning= t('sites.enqueued') -- else - = form_tag site_enqueue_path(site), method: :post, class: 'form-inline' do - = button_tag type: 'submit', class: 'btn btn-success' do - = fa_icon 'building' - = t('sites.enqueue') - -- if site.failed? - %span.badge.badge-alert= t('sites.failed') -- if site.build_log? - = link_to t('sites.build_log'), site_build_log_path(site), - class: 'badge badge-info' diff --git a/app/views/sites/index.haml b/app/views/sites/index.haml index a3980340..06428b02 100644 --- a/app/views/sites/index.haml +++ b/app/views/sites/index.haml @@ -10,6 +10,22 @@ %tbody - @sites.each do |site| %tr - %td= link_to site.name, site_path(site) - %td= link_to t('i18n.edit'), site_i18n_edit_path(site) - %td= render 'sites/enqueue', site: site + %td + %h2= link_to site.name, site_path(site) + %br + .btn-group{role: 'group', 'aria-label': t('sites.actions')} + = link_to t('sites.posts'), site_path(site), class: 'btn btn-success' + = link_to t('i18n.edit'), site_i18n_edit_path(site), class: 'btn btn-info' + - if site.enqueued? + %button.btn.btn-secondary= t('sites.enqueued') + - else + = form_tag site_enqueue_path(site), method: :post, class: 'form-inline' do + = button_tag type: 'submit', class: 'btn btn-success' do + = fa_icon 'building' + = t('sites.enqueue') + + - if site.failed? + %button.btn.btn-danger= t('sites.failed') + - if site.build_log? + = link_to t('sites.build_log'), site_build_log_path(site), + class: 'btn btn-warning' diff --git a/config/locales/en.yml b/config/locales/en.yml index 1b165082..e06fa674 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -40,6 +40,8 @@ en: password: 'Password' submit: 'Log in' sites: + actions: 'Actions' + posts: 'View and edit posts' title: 'Sites' index: 'Sites' enqueued: 'Waiting for build' @@ -50,7 +52,7 @@ en: powered_by: 'is developed by' i18n: index: 'Translations' - edit: 'Edit translations' + edit: 'Edit texts and translations' save: 'Save' change: 'Change' translating: diff --git a/config/locales/es.yml b/config/locales/es.yml index 185ebb55..19c39ac6 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -39,6 +39,8 @@ es: password: 'Contraseña' submit: 'Ingresar' sites: + actions: 'Acciones' + posts: 'Ver y editar artículos' title: 'Sitios' index: 'Sitios' enqueued: 'Esperando compilación' @@ -49,7 +51,7 @@ es: powered_by: 'es desarrollada por' i18n: index: 'Traducciones' - edit: 'Editar traducciones' + edit: 'Editar textos y traducciones' save: 'Guardar' change: 'Cambiar' translating: