WIP: lxs invitadxs solo pueden cargar la primera plantilla

This commit is contained in:
f 2019-02-16 15:28:06 -03:00
parent 4dc08d9dbc
commit a2fa16eb43
No known key found for this signature in database
GPG key ID: F3FDAB97B5F9F7E7
3 changed files with 13 additions and 9 deletions

View file

@ -14,16 +14,18 @@
= link_to t('posts.new'), new_site_post_path(@site, lang: @lang),
class: 'btn btn-success'
- else
= link_to t('posts.new'), new_site_post_path(@site, lang: @lang, template: @site.templates.first.id),
= link_to t('posts.new_with_template', template: @site.templates.first.id.humanize),
new_site_post_path(@site, lang: @lang, template: @site.templates.first.id),
class: 'btn btn-success'
%button.btn.btn-success.dropdown-toggle.dropdown-toggle-split{data: { toggle: 'split' },
aria: { haspopup: 'true', expanded: 'false' }}
%span.sr-only= t('posts.dropdown')
.dropdown-menu
- @site.templates.each do |template|
= link_to template.id.camelize,
new_site_post_path(@site, lang: @lang, template: template.id),
class: 'dropdown-item'
- if policy(Post).usuaria?
%button.btn.btn-success.dropdown-toggle.dropdown-toggle-split{data: { toggle: 'split' },
aria: { haspopup: 'true', expanded: 'false' }}
%span.sr-only= t('posts.dropdown')
.dropdown-menu
- @site.templates.each do |template|
= link_to template.id.humanize,
new_site_post_path(@site, lang: @lang, template: template.id),
class: 'dropdown-item'
- @site.translations.each do |l|
= link_to t("i18n.#{l}"), site_posts_path(@site, category: @category, lang: l),
class: 'btn btn-info'

View file

@ -171,6 +171,7 @@ en:
date: 'date'
order: 'Order'
new: 'New post'
new_with_template: 'New %{template}'
dropdown: 'Toggle dropdown'
categories: 'Everything'
index: 'Posts'

View file

@ -178,6 +178,7 @@ es:
categories: 'Todos'
dropdown: 'Desplegar el menú'
new: 'Empezar un artículo nuevo'
new_with_template: 'Comenzar %{template}'
index: 'Artículos'
edit: 'Editar'
draft: en revisión