Sha256: ab087937e5627d1637263b2a8971ff22d4419b98b436077160ed210feb685492

Contents?: true

Size: 1.9 KB

Versions: 5

Compression:

Stored size: 1.9 KB

Contents

- if @category.errors.any?
  - content_for :notifications do
    .notification.notification-danger.animated.fadeInRight
      = icon('exclamation')
      .notification-message
        =t 'spina.notifications.alert'
        %small= @category.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 @category.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.categories.saving')}}
      = icon('check')
      =t 'spina.blog.categories.save'

= hidden_field_tag :locale, @locale

- Mobility.with_locale(@locale) do
  .active.well
    .horizontal-form
      .horizontal-form-group
        .horizontal-form-label
          = Spina::Admin::Conferences::Blog::Category.human_attribute_name :name
        .horizontal-form-content
          = f.text_field :name, placeholder: Spina::Admin::Conferences::Blog::Category.human_attribute_name(:name_placeholder)

  - unless @category.new_record?
    .pull-right= link_to t('spina.permanently_delete'), spina.admin_conferences_blog_category_path(@category.id), method: :delete, data: {confirm: t('spina.blog.category.delete_confirmation', subject: @category.name)}, 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/categories/_form.html.haml
spina-admin-conferences-blog-0.1.3 app/views/spina/admin/conferences/blog/categories/_form.html.haml
spina-admin-conferences-blog-0.1.2 app/views/spina/admin/conferences/blog/categories/_form.html.haml
spina-admin-conferences-blog-0.1.1 app/views/spina/admin/conferences/blog/categories/_form.html.haml
spina-admin-conferences-blog-0.1.0 app/views/spina/admin/conferences/blog/categories/_form.html.haml