Sha256: e20b5cb33cf1e619ec7c66676b4a107ce7a9b3c1fd5a190ba51e5463a18377eb

Contents?: true

Size: 1.46 KB

Versions: 3

Compression:

Stored size: 1.46 KB

Contents

- rtc_controller_name ||= controller_name
- rtc_column_header = true if rtc_column_header.nil?
- rtc_partial = rtc_controller_name.singularize if rtc_partial.nil?
- rtc_empty_data_message = sanitize "Data #{t(rtc_controller_name)} kosong" if rtc_empty_data_message.nil?
- columns_width = columns_width.presence || []

.rtc_content  
  .rtc_grid_header{style: (rtc_column_header.present? ? '' : 'display: none !important')}
    - columns_width ||= Array.new(headers.count, 1)


    - if multiple_selection
      .rtc_gh_item.numeric{'data-column-width' => columns_width.inject(:+) / 20.0}
        %span{style: 'padding: 2px 0px'}
          = check_box_tag 'rtc_select_all', nil, false, class: 'rtc_select_all', style: 'height: 0px; margin-top: 0px;'

    - if row_number
      .rtc_gh_item{'data-column-width' => columns_width.inject(:+) / 20.0}
        %span
          = 'No.'

    - headers.each_with_index do |header, i|
      .rtc_gh_item{'data-column-width' => columns_width[i]}
        - if header.present?
          - if header.instance_of?(Array) && header.try(:first).nil?
            %span= raw(t(header.try(:last)))
          - else
            = sort_link(header, rtc_controller_name: rtc_controller_name, params: params, rtc_partial: rtc_partial)
        - else
          = raw(" ")

  .rtc_grid
    = render "rich_table_component/rtc/table", 
      rtc_controller_name: rtc_controller_name, 
      rtc_partial: rtc_partial, 
      rtc_empty_data_message: rtc_empty_data_message

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rich_table_component-0.0.15 app/views/rich_table_component/rtc/_content.html.haml
rich_table_component-0.0.14 app/views/rich_table_component/rtc/_content.html.haml
rich_table_component-0.0.13 app/views/rich_table_component/rtc/_content.html.haml