<%= render :partial => 'admin/shared/order_tabs', :locals => {:current => "Shipments"} %>
<%= hook :admin_shipment_edit_header do %>
<%= t('shipment') %> #<%= @shipment.number%> (<%= t(@shipment.state.to_sym, :scope => :state_names, :default => @shipment.state.to_s.humanize) %>)
<% if @shipment.cost %>
<%= t('charges') %> <%= number_to_currency @shipment.cost %>
<% end %>
<%= render "shared/error_messages", :target => @shipment %>
<% end %>
<%= hook :admin_shipment_edit_form do %>
<%= form_for(@shipment, :url => admin_order_shipment_path(@order, @shipment), :html => { :method => :put }) do |shipment_form| %>
<%= render :partial => "form", :locals => { :shipment_form => shipment_form } %>
<%= hook :admin_shipment_edit_form_buttons do %>
<% if self.respond_to?(:current_user) && @shipment.editable_by?(current_user) %>
<%= button @order.cart? ? t('continue') : t('update') %>
<%= t("or") %> <%= link_to t("cancel"), admin_order_shipments_path(@order) %>
<% else %>
<%= link_to raw("« #{t("back")}"), edit_admin_order_shipment_path(@order) %>
<% end %>
<% end %>
<% end %>
<% end %>