.row .col = render 'layouts/breadcrumb', crumbs: [ link_to(t('sites.index'), sites_path), @site.name, link_to(t('posts.index'), site_posts_path(@site)), @category ] = render 'layouts/help', help: t('help.breadcrumbs') .row .col %h1= @site.name_with_i18n(@lang) .row .col .btn-group = link_to t('posts.new'), new_site_post_path(@site, lang: @lang), class: 'btn btn-success' - I18n.available_locales.map(&:to_s).each do |l| = link_to t("i18n.#{l}"), site_posts_path(@site, category: @category, lang: l), class: 'btn btn-info' .row .col - if @posts.present? = form_tag site_reorder_posts_path, method: :post do = hidden_field 'posts', 'lang', value: @lang .reorder-posts-panel.alert.alert-info.alert-dismissible.fade.show{role: 'alert'} = raw t('help.posts.reorder') %br = submit_tag t('posts.reorder_posts'), class: 'btn btn-success' %button.close{type: 'button', 'aria-label': t('help.close') } %span{'aria-hidden': true} × %table.table.table-condensed.table-striped.table-draggable %tbody - @posts.each_with_index do |post, i| - if @category -# saltearse el post a menos que esté en la categoría -# por la que estamos filtrando - next unless post.categories.include?(@category) -# establecer la direccion del texto - direction = post.get_front_matter(:dir) %tr %td = fa_icon 'arrows-v', class: 'handle' = hidden_field 'posts[order]', i, value: post.order || i, class: 'post_order' %td{class: direction} = link_to post.title, site_post_path(@site, post, lang: @lang) %br %small - post.categories.each do |c| = link_to c, site_posts_path(@site, category: c, lang: @lang), data: { toggle: 'tooltip' }, title: t('help.category') %td - if post.translations %small - post.translations.each do |pt| = link_to pt.title, site_post_path(@site, pt, lang: pt.lang), data: { toggle: 'tooltip' }, title: t("i18n.#{pt.lang}") %br %td= post.date.strftime('%F') %td= link_to t('posts.edit'), edit_site_post_path(@site, post, lang: @lang), class: 'btn btn-info' - else %h2= t('posts.none')