Sha256: bc702537cb035fa215cd5d08338717af9239166cb4c672c806d00599d430aa14
Contents?: true
Size: 1.93 KB
Versions: 1
Compression:
Stored size: 1.93 KB
Contents
- @schema.each_slice(4) do |slice| .row - slice.each do |schema| .col-md-3 .panel.panel-default .panel-heading // TODO: Move logic out of view - @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.3.0 | app/views/ryakuzu/main/index.html.slim |