WIP: lxs invitadxs solo pueden cargar la primera plantilla
This commit is contained in:
parent
4dc08d9dbc
commit
a2fa16eb43
3 changed files with 13 additions and 9 deletions
|
@ -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'
|
||||
|
|
|
@ -171,6 +171,7 @@ en:
|
|||
date: 'date'
|
||||
order: 'Order'
|
||||
new: 'New post'
|
||||
new_with_template: 'New %{template}'
|
||||
dropdown: 'Toggle dropdown'
|
||||
categories: 'Everything'
|
||||
index: 'Posts'
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue