Sha256: ef475a933ace5f7717cc941c437e9b1064eb8043f00206c4a3bded8f227dd123

Contents?: true

Size: 1.07 KB

Versions: 8

Compression:

Stored size: 1.07 KB

Contents

.tn-tc{class: field}
  .input-block
    %label.input-block__explanation
      - if defined?(lang)
        = field.gsub("_#{lang}", '').to_s.titleize
        (#{lang_title})
      - else
        = field.to_s.titleize

    .tn-tc__wrap
      .tn-tc__rows
        = f.fields_for "#{field}_tenon_content_rows" do |row|
          - if row.object
            = render "tenon/tenon_content/row", f: row, row_partial: row.object.decorate.form_partial, field: field, title: row.object.row_type.titleize

      %div{style: 'display: none'}
        .modal{ data: { tn_tc_library: true } }
          .modal__content
            %ul.tn-tc-library__list
              - Tenon::TenonContent::RowTypes::LIBRARY_ROW_TYPES.each do |title, row_type|
                %li.tn-tc-library__item= row_link(title, row_type, field, f)


    %p
      = link_to 'Add Content', '#', class: 'action-text initial-row', data: { modal_target: '[data-tn-tc-library]', modal_closest: '.tn-tc', modal_clone: 'true', modal_title: 'Add Content', modal_handler: 'TenonContentLibrary', tn_tc_add_content: true }, title: 'Add Content'

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
tenon-2.0.7 app/views/tenon/tenon_content/_fields.html.haml
tenon-2.0.6 app/views/tenon/tenon_content/_fields.html.haml
tenon-2.0.5 app/views/tenon/tenon_content/_fields.html.haml
tenon-2.0.4 app/views/tenon/tenon_content/_fields.html.haml
tenon-2.0.3 app/views/tenon/tenon_content/_fields.html.haml
tenon-2.0.2 app/views/tenon/tenon_content/_fields.html.haml
tenon-2.0.1 app/views/tenon/tenon_content/_fields.html.haml
tenon-2.0.0 app/views/tenon/tenon_content/_fields.html.haml