Sha256: 4cb267872136db246f8fb712d8711e073d2027fcdc18f864eb4bcb691389b2b2

Contents?: true

Size: 1.79 KB

Versions: 5

Compression:

Stored size: 1.79 KB

Contents

- if @post.errors.any?
  - content_for :notifications do
    .notification.notification-danger.animated.fadeInRight
      = icon('exclamation')
      .notification-message
        =t 'spina.notifications.alert'
        %small= @post.errors.full_messages.join('<br />').html_safe
      = link_to '#', data: {close_notification: true} do
        = icon('cross')

%header#header
  .breadcrumbs= render_breadcrumbs separator: '<div class="divider"></div>'
  - unless @post.new_record?
    - if Spina.config.locales.size > 1
      %div{style: 'display: inline-block; margin-left: 12px; top: -4px', data: {dropdown: true}}
        = link_to '#', class: 'button button-link button-round button-small', data: {trigger: 'dropdown', target: '#locales'} do
          = icon('comment')
          = @locale.upcase

        %ul#locales
          - Spina.config.locales.each do |locale|
            %li
              = link_to t("languages.#{locale}"), "?locale=#{locale}", style: ('font-weight: 600' if @locale.to_s == locale.to_s)

  #header_actions
    %button.button.button-primary{type: 'submit', style: 'margin-right: 0', data: {disable_with: t('spina.blog.posts.saving')}}
      = icon('check')
      =t 'spina.blog.posts.save'

  %nav#secondary.tabs
    %ul
      - @tabs.each_with_index do |tab, i|
        %li{class: (i==0 ? 'active' : '')}
          = link_to t("spina.blog.posts.#{tab}"), "##{tab}"

= hidden_field_tag :locale, @locale

- Mobility.with_locale(@locale) do
  - @tabs.each do |tab|
    = render "spina/admin/conferences/blog/posts/form_#{tab}", f: f

  - unless @post.new_record?
    .pull-right= link_to t('spina.permanently_delete'), spina.admin_conferences_blog_post_path(@post.id), method: :delete, data: {confirm: t('spina.post.delete_confirmation', subject: @post.title)}, class: 'button button-link button-danger'

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
spina-admin-conferences-blog-0.1.4 app/views/spina/admin/conferences/blog/posts/_form.html.haml
spina-admin-conferences-blog-0.1.3 app/views/spina/admin/conferences/blog/posts/_form.html.haml
spina-admin-conferences-blog-0.1.2 app/views/spina/admin/conferences/blog/posts/_form.html.haml
spina-admin-conferences-blog-0.1.1 app/views/spina/admin/conferences/blog/posts/_form.html.haml
spina-admin-conferences-blog-0.1.0 app/views/spina/admin/conferences/blog/posts/_form.html.haml