Sha256: 3b60c4e996ac879f3ef8fba89963644b0d716d81318234ceba86175f4a090d11

Contents?: true

Size: 1.31 KB

Versions: 14

Compression:

Stored size: 1.31 KB

Contents

.header.container
  .row
    .col-lg-12.col-md-12
      .page-header
        %h3
          = "\"#{@section.humanize}\""
          SEO data
.row
  %div{class: "col-lg-12 col-md-12"}
    = form_tag weeler_seo_item_path(id: @section.gsub('.', '_')), {method: "put", class: "form-horizontal", role: "form"} do
      - I18n.available_locales.each do |lang|
        - if I18n.available_locales.size > 1
          %h3
            = lang.capitalize
        - ["title", "description", "keywords"].each do |subsection|
          - translation = I18n::Backend::Weeler::Translation.locale(lang).lookup("seo.#{@section}.#{subsection}").first
          - translation = I18n::Backend::Weeler::Translation.create(key: "seo.#{@section}.#{subsection}", locale: lang) if translation.nil?
          .form-group
            = label_tag subsection, subsection.humanize, class: "col-lg-2 col-md-2 control-label"
            %div{class: "col-lg-10 col-md-10"}
              = text_area_tag "translations[#{translation.id}]", translation.value, class: 'form-control'
              - if translation.interpolations.size > 0
                %b Variables
                = translation.interpolations.map{ |t| "%{#{t}}" }.join(", ")

      .form-group
        = submit_tag "Save", class: "btn btn-primary"
        = link_to  'Back', {action: :index}, class: "btn btn-default"

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
weeler-2.1.0 app/views/weeler/seo_items/edit.html.haml
weeler-2.0.1 app/views/weeler/seo_items/edit.html.haml
weeler-2.0.0 app/views/weeler/seo_items/edit.html.haml
weeler-1.6.0 app/views/weeler/seo_items/edit.html.haml
weeler-1.5.4 app/views/weeler/seo_items/edit.html.haml
weeler-1.5.2 app/views/weeler/seo_items/edit.html.haml
weeler-1.5.1 app/views/weeler/seo_items/edit.html.haml
weeler-1.4.0 app/views/weeler/seo_items/edit.html.haml
weeler-1.2.0 app/views/weeler/seo_items/edit.html.haml
weeler-1.1.0 app/views/weeler/seo_items/edit.html.haml
weeler-1.0.4 app/views/weeler/seo_items/edit.html.haml
weeler-1.0.3 app/views/weeler/seo_items/edit.html.haml
weeler-1.0.2 app/views/weeler/seo_items/edit.html.haml
weeler-1.0.1 app/views/weeler/seo_items/edit.html.haml