Sha256: 38830afdf15e3d6fbadb0cfd08a675e140b6b187a835d024e3871cd103015d99

Contents?: true

Size: 1.16 KB

Versions: 7

Compression:

Stored size: 1.16 KB

Contents

#meta_translation
  %h3 Meta
  %ul.nav.nav-tabs
    - @languages.each do |lang|
      - t = lang.blank? ? 'Default' : lang
      %li.nav-item.active
        =link_to t, '#', :class=>'nav-link link_meta_tab', :data=>{:lang=>lang}

  = f.simple_fields_for :translations do |fmeta|
    - tran = fmeta.object
    - lang = tran.lang


    %div{:class=>['cont', "meta_cont_"+lang]}
      =fmeta.input :lang, :readonly=>true
      =fmeta.input :meta_title, label: 'Title'
      =fmeta.input :meta_keywords, label: 'Keywords'
      =fmeta.input :meta_description, as: :text, label: 'Description'

  -# @languages.all.each do |r|
    - lang = r.lang
    - name = "meta_keywords_#{lang}"
    .form-group
      %label(for="#{name}") Keywords
      =f.input_field :"meta_keywords[#{lang}]", :class=>"form-control", :placeholder=>"Keywords"


:javascript
  $(document).ready(function() {
    meta_show_cont('');

    $('#meta_translation .link_meta_tab').click(function(e){
      e.preventDefault();
      meta_show_cont($(this).data('lang'));
    });


  });

  function meta_show_cont(lang){
    $('#meta_translation .cont').hide();
    $('#meta_translation .cont.meta_cont_'+lang).show();
  }

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
optimacms-0.4.3 app/views/optimacms/admin/pages/_meta.html.haml
optimacms-0.4.2 app/views/optimacms/admin/pages/_meta.html.haml
optimacms-0.3.9 app/views/optimacms/admin/pages/_meta.html.haml
optimacms-0.3.8 app/views/optimacms/admin/pages/_meta.html.haml
optimacms-0.3.7 app/views/optimacms/admin/pages/_meta.html.haml
optimacms-0.3.6 app/views/optimacms/admin/pages/_meta.html.haml
optimacms-0.3.5 app/views/optimacms/admin/pages/_meta.html.haml