Sha256: 45d7e1016abf107ac8dbb4474b8ae2f7da0a6989b91b174e7af5e192a227ed0d
Contents?: true
Size: 1.88 KB
Versions: 1
Compression:
Stored size: 1.88 KB
Contents
- @schema.each_slice(4) do |slice| .row - slice.each do |schema| .col-md-3 .panel.panel-default .panel-heading - @model = Ryakuzu::Table.create_model(schema) h4= "Table: #{@model.name.underscore}" br = form_for @model, html: { class: 'form-horizontal' }, remote: true do |f| = f.text_field :name, class: 'form-control', pattern: '^[A-Za-z_]{1,150}$', title: 'Remove numbers, or non english words' = f.hidden_field "old_name", value: @model.name h4 Columns = f.fields_for :column, @model.column do |cl| - attr = @model.column.attributes - attr.each_with_index do |v, i| .input-group = cl.text_field "column_#{i}", class: 'form-control', pattern: '^[A-Za-z_]{1,150}$', title: 'Remove numbers, or non english words' = cl.hidden_field "old_#{i}", value: "#{v[1]}" span.input-group-btn = link_to 'options', column_path(column: "#{v[1]}", table: @model.name.underscore), method: :post, remote: true, class: 'btn-floating waves-effect waves-light green option-button' hr .row .col-md-12 = f.submit 'Run Migration', class: 'btn btn-success' .row .col-md-12 = link_to 'Add Column', add_column_form_path(table: @model.name), method: :post, remote: true, class: 'btn btn-warning waves-effect waves-light' .row .col-md-12 = link_to 'Remove Table', remove_table_path(table: @model.name), method: :post, class: 'btn btn-danger waves-effect waves-light', data: { confirm: "Remove table #{@model.name}?" } = render 'ryakuzu/main/column_form' = render 'ryakuzu/main/add_column_form' = render 'ryakuzu/main/add_table_form'
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ryakuzu-0.2.6 | app/views/ryakuzu/main/index.html.slim |