Sha256: 0b537646c3e4f12b19b171d1bb8559d57e599417148c70cac6024ec0df103b00

Contents?: true

Size: 1.19 KB

Versions: 15

Compression:

Stored size: 1.19 KB

Contents

- long_or_short = position.long_or_short || position.strategy&.long_or_short || params[:long_or_short]

.positions--form{ class: params[:long_or_short] || long_or_short }
  = form_for position do |f|
    .actions
      = f.submit

    .d-flex
      .field
        %label Purse
        = f.select :purse_id, options_for_select( @purses_list, selected: position.purse_id )

        %label Status
        = f.select :status, options_for_select( Iro::Position::STATUSES, selected: position.status )

    .field
      %label Stock
      = f.select :stock_id, options_for_select( @stocks_list, selected: position.stock_id )

    -# .field
    -#   %label long or short?
    -#   = f.select :long_or_short, options_for_select([nil, Iro::Strategy::LONG, Iro::Strategy::SHORT], selected: long_or_short )

    %label Strategy
    = f.select :strategy_id, options_for_select( @strategies_list, selected: position.strategy_id )

    .field
      %label Expires on
      = f.select :expires_on, options_for_select( Iro::Option.expirations_list, selected: position.expires_on )
      %label Quantity
      = f.text_field :quantity

    %br
    = render 'formpart_4data', f: f, position: position

    .actions
      = f.submit

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
iron_warbler-2.0.7.43 app/views/iro/positions/_form.haml
iron_warbler-2.0.7.42 app/views/iro/positions/_form.haml
iron_warbler-2.0.7.41 app/views/iro/positions/_form.haml
iron_warbler-2.0.7.40 app/views/iro/positions/_form.haml
iron_warbler-2.0.7.39 app/views/iro/positions/_form.haml
iron_warbler-2.0.7.38 app/views/iro/positions/_form.haml
iron_warbler-2.0.7.37 app/views/iro/positions/_form.haml
iron_warbler-2.0.7.36 app/views/iro/positions/_form.haml
iron_warbler-2.0.7.35 app/views/iro/positions/_form.haml
iron_warbler-2.0.7.34 app/views/iro/positions/_form.haml
iron_warbler-2.0.7.33 app/views/iro/positions/_form.haml
iron_warbler-2.0.7.32 app/views/iro/positions/_form.haml
iron_warbler-2.0.7.31 app/views/iro/positions/_form.haml
iron_warbler-2.0.7.30 app/views/iro/positions/_form.haml
iron_warbler-2.0.7.29 app/views/iro/positions/_form.haml