3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
# File 'lib/forge/app/helpers/forge/orders_helper.rb', line 3
def fulfillment_link(order)
if order.fulfilled?
content_tag :div, :class => "item-action fulfill" do
icon_tag("yay") +
content_tag(:div, "", :class => "spacer") +
link_to("Unfulfill.", unfulfill_forge_order_path(order), :class => "unapprove", :method => :put, :id => order.id)
end
elsif order.aasm_events_for_state(order.state.to_sym).include?(:fulfill)
content_tag :div, :class => "item-action fulfill" do
icon_tag("nay") +
content_tag(:div, "", :class => "spacer") +
link_to("Fulfill", fulfill_forge_order_path(order), :class => "approve", :method => :put, :id => order.id)
end
end
end
|