-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into rails_version
Conflicts: app/models/account_operation.rb test/unit/trade_order_test.rb
- Loading branch information
Showing
19 changed files
with
142 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
%table#trade-orders.default | ||
%tr | ||
%th= t("activerecord.attributes.trade_order.updated_at") | ||
%th= t("activerecord.attributes.trade_order.category") | ||
%th= t("activerecord.attributes.trade_order.type") | ||
%th= t("activerecord.attributes.trade_order.amount") | ||
%th= t("activerecord.attributes.trade_order.ppc") | ||
%th= t("activerecord.attributes.trade_order.total") | ||
%th.auto-sized | ||
%th.auto-sized | ||
%th.auto-sized | ||
%th.auto-sized | ||
|
||
- unless trade_orders.blank? | ||
- trade_orders.each do |to| | ||
%tr{ :class => cycle('even', 'odd', :name => 'trade_orders') } | ||
%td= l(to.updated_at) | ||
%td= t(".#{to.category}") | ||
%td= t(".#{to.type.gsub(/Order/, "").downcase}") | ||
%td.amount= number_to_bitcoins to.amount, :precision => 4 | ||
- if to.is_a?(LimitOrder) | ||
%td.amount= format_amount(to.ppc, to[:currency], 5) | ||
%td.amount= format_amount(to.ppc * to.amount, to[:currency], 4) | ||
- else | ||
%td= t(".market_order") | ||
%td= t(".market_order") | ||
%td.auto-sized= dark_pool_icon_for(to) | ||
%td.auto-sized= currency_icon_for(to[:currency]) | ||
%td.auto-sized= activate_link_for(to) if to.activable? | ||
%td.auto-sized= delete_link_for(to) | ||
|
||
- reset_cycle 'trade_orders' | ||
- else | ||
= render :partial => "layouts/no_data" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,7 @@ | ||
= creation_link :account_trade_order, t(".create") | ||
|
||
%h1= t :trade_orders_title | ||
%h1= t(".active_orders", :count => @trade_orders.active.count) | ||
= render :partial => "trade_orders/detailed_list", :locals => { :trade_orders => @trade_orders.active } | ||
|
||
%table#trade-orders.default | ||
%tr | ||
%th= t :created_at | ||
%th= t :type | ||
%th= t :amount | ||
%th= t :price | ||
%th= t :total | ||
%th.auto-sized | ||
%th.auto-sized | ||
%th.auto-sized | ||
%th.auto-sized | ||
|
||
- unless @trade_orders.blank? | ||
- @trade_orders.each do |to| | ||
%tr{ :class => [(to.active? ? "" : "inactive"), cycle('even', 'odd')] } | ||
%td= l to.created_at | ||
%td= t(".#{to.category}") | ||
%td.amount= number_to_bitcoins to.amount, :precision => 4 | ||
- if to.is_a?(LimitOrder) | ||
%td.amount= format_amount(to.ppc, to[:currency], 5) | ||
%td.amount= format_amount(to.ppc * to.amount, to[:currency], 4) | ||
- else | ||
%td= t(".market_order") | ||
%td= t(".market_order") | ||
%td.auto-sized= dark_pool_icon_for(to) | ||
%td.auto-sized= currency_icon_for(to[:currency]) | ||
- if to.activable? | ||
%td.auto-sized= activate_link_for(to) | ||
- else | ||
%td.auto-sized= nil | ||
%td.auto-sized= delete_link_for(to) | ||
- else | ||
= render :partial => "layouts/no_data" | ||
|
||
= will_paginate(@trade_orders) | ||
%h1= t(".inactive_orders", :count => @trade_orders.inactive.count) | ||
= render :partial => "trade_orders/detailed_list", :locals => { :trade_orders => @trade_orders.inactive } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...igrate/20111205110307_add_com_to_users.rb → ...205110307_add_commission_rate_to_users.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.