Sha256: eaae7cc4257c7e4b665faa9257b6b183f9ec0eaf365f838a684825dd0b877ec7

Contents?: true

Size: 1.25 KB

Versions: 23

Compression:

Stored size: 1.25 KB

Contents

<%%= render(Tables::TableComponent.new) do |table| %>
  <%% table.with_thead do |thead| %>
  <%- bo_model.column_names.each do |column| -%>
    <%%= thead.with_active_record_th(column_name: '<%= column %>',  ransack_object: @q) %>
  <%- end -%>
  <%% end %>

  <%% table.with_tbody do |tbody| %>
    <%% @<%= class_name.underscore.pluralize %>&.each_with_index do |<%= class_name.underscore %>, i| %>
      <%%= tbody.with_tr(index: i) do |tr| %>
        <%- bo_model.column_names.each do |column| -%>
          <%%= tr.with_td { <%= class_name.underscore %>.<%= column %>.to_s } %>
        <%- end -%>
        <%%= tr.with_td do %>
          <%%= link_to <%="#{options[:namespace]}_#{class_name.underscore}_path(#{class_name.underscore})"%>, class: "text-tybo-600 hover:text-tybo-900"  do %>
            Détails
          <%% end %>
        <%% end %>
        <%%= tr.with_td do %>
          <%%= link_to <%="#{options[:namespace]}_#{class_name.underscore}_path(#{class_name.underscore})"%>,
          class: "text-tybo-600 hover:text-tybo-900",
          data: {turbo_method: :delete, turbo_confirm: "êtes vous sur ?"} do %>
            <%%= render(Icons::TrashComponent.new) %>
          <%% end %>
        <%% end %>
      <%% end %>
    <%% end %>
  <%% end %>
<%% end %>

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
tybo-0.0.29 lib/generators/bo/templates/_table.html.erb
tybo-0.0.28 lib/generators/bo/templates/_table.html.erb
tybo-0.0.27 lib/generators/bo/templates/_table.html.erb
tybo-0.0.26 lib/generators/bo/templates/_table.html.erb
tybo-0.0.24 lib/generators/bo/templates/_table.html.erb
tybo-0.0.23 lib/generators/bo/templates/_table.html.erb
tybo-0.0.22 lib/generators/bo/templates/_table.html.erb
tybo-0.0.21 lib/generators/bo/templates/_table.html.erb
tybo-0.0.20 lib/generators/bo/templates/_table.html.erb
tybo-0.0.19 lib/generators/bo/templates/_table.html.erb
tybo-0.0.18 lib/generators/bo/templates/_table.html.erb
tybo-0.0.17 lib/generators/bo/templates/_table.html.erb
tybo-0.0.16 lib/generators/bo/templates/_table.html.erb
tybo-0.0.15 lib/generators/bo/templates/_table.html.erb
tybo-0.0.14 lib/generators/bo/templates/_table.html.erb
tybo-0.0.13 lib/generators/bo/templates/_table.html.erb
tybo-0.0.12 lib/generators/bo/templates/_table.html.erb
tybo-0.0.11 lib/generators/bo/templates/_table.html.erb
tybo-0.0.10 lib/generators/bo/templates/_table.html.erb
tybo-0.0.9 lib/generators/bo/templates/_table.html.erb