mejorar visor de sitios

This commit is contained in:
f 2018-02-26 15:46:47 -03:00
parent 2b33ea7edf
commit 11bb3273aa
No known key found for this signature in database
GPG key ID: F3FDAB97B5F9F7E7
4 changed files with 25 additions and 18 deletions

View file

@ -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'

View file

@ -10,6 +10,22 @@
%tbody %tbody
- @sites.each do |site| - @sites.each do |site|
%tr %tr
%td= link_to site.name, site_path(site) %td
%td= link_to t('i18n.edit'), site_i18n_edit_path(site) %h2= link_to site.name, site_path(site)
%td= render 'sites/enqueue', site: 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'

View file

@ -40,6 +40,8 @@ en:
password: 'Password' password: 'Password'
submit: 'Log in' submit: 'Log in'
sites: sites:
actions: 'Actions'
posts: 'View and edit posts'
title: 'Sites' title: 'Sites'
index: 'Sites' index: 'Sites'
enqueued: 'Waiting for build' enqueued: 'Waiting for build'
@ -50,7 +52,7 @@ en:
powered_by: 'is developed by' powered_by: 'is developed by'
i18n: i18n:
index: 'Translations' index: 'Translations'
edit: 'Edit translations' edit: 'Edit texts and translations'
save: 'Save' save: 'Save'
change: 'Change' change: 'Change'
translating: translating:

View file

@ -39,6 +39,8 @@ es:
password: 'Contraseña' password: 'Contraseña'
submit: 'Ingresar' submit: 'Ingresar'
sites: sites:
actions: 'Acciones'
posts: 'Ver y editar artículos'
title: 'Sitios' title: 'Sitios'
index: 'Sitios' index: 'Sitios'
enqueued: 'Esperando compilación' enqueued: 'Esperando compilación'
@ -49,7 +51,7 @@ es:
powered_by: 'es desarrollada por' powered_by: 'es desarrollada por'
i18n: i18n:
index: 'Traducciones' index: 'Traducciones'
edit: 'Editar traducciones' edit: 'Editar textos y traducciones'
save: 'Guardar' save: 'Guardar'
change: 'Cambiar' change: 'Cambiar'
translating: translating: