app/views/spina/admin/resources/edit.html.haml in spina-1.2.0 vs app/views/spina/admin/resources/edit.html.haml in spina-2.0.0.alpha

- old
+ new

@@ -1,30 +1,53 @@ - if @resource.errors.any? - content_for :notifications do - .notification.notification-danger.animated.fadeInRight + .notification.notification-danger.animated.fadeInLeft = icon('exclamation') .notification-message =t 'spina.notifications.alert' %small= @resource.errors.full_messages.join('<br />').html_safe = link_to '#', data: {close_notification: true} do = icon('cross') = form_with model: @resource, url: spina.admin_resource_path(@resource) do |f| + = hidden_field_tag :locale, @locale + %header#header - .breadcrumbs= render_breadcrumbs separator: '<div class="divider"></div>' + .breadcrumbs + = render_breadcrumbs separator: '<div class="divider"></div>' + %span{style: 'margin-left: 10px'} + - if Spina.config.locales.size > 1 + %div{style: "display: inline-block", data: {dropdown: true}} + = link_to '#', class: 'button button-default button-small', style: 'margin-left: 0; margin-right: 0', data: {trigger: 'dropdown', target: '#locales'} do + = icon('comment') + =t "spina.languages.#{@locale}" + %i.icon.icon-chevron-down{style: 'font-size: 9px; margin-right: 0'} + %ul#locales + - Spina.config.locales.each do |locale| + %li + = link_to t("spina.languages.#{locale}"), "?locale=#{locale}", style: ('font-weight: 600' if @locale.to_s == locale.to_s).to_s + #header_actions %button.button.button-primary{type: 'submit', style: 'margin-right: 0'} = icon('check') =t 'spina.save' - .well - .horizontal-form + .horizontal-form + %div{style: "margin: 40px 0"} .horizontal-form-group .horizontal-form-label = Spina::Resource.human_attribute_name :label .horizontal-form-content - = f.text_field :label, placeholder: Spina::Resource.human_attribute_name(:label) + .page-form-control + = f.text_field :label, placeholder: Spina::Resource.human_attribute_name(:label) + + .horizontal-form-group + .horizontal-form-label + = Spina::Resource.human_attribute_name :slug + .horizontal-form-content + .page-form-control + = f.text_field :slug, placeholder: Spina::Resource.human_attribute_name(:slug), value: f.object.slug(locale: @locale)&.parameterize .horizontal-form-group .horizontal-form-label = Spina::Resource.human_attribute_name :order_by .horizontal-form-content