rework group order show view
This commit is contained in:
parent
a0d62f7948
commit
fead6a1c0d
1 changed files with 73 additions and 99 deletions
|
@ -7,44 +7,18 @@
|
|||
- title t('.title', order: @order.name)
|
||||
|
||||
.row-fluid
|
||||
.well.pull-left
|
||||
// Order summary
|
||||
%dl.dl-horizontal
|
||||
%dt= heading_helper Order, :name
|
||||
%dd= @order.name
|
||||
%dt= heading_helper Order, :note
|
||||
%dd= @order.note
|
||||
%dt= heading_helper Order, :ends
|
||||
%dd= format_time(@order.ends)
|
||||
%dt= heading_helper Order, :pickup
|
||||
%dd= format_date(@order.pickup)
|
||||
%dt= heading_helper GroupOrder, :price
|
||||
%dd
|
||||
- if @group_order
|
||||
= number_to_currency(@group_order.price)
|
||||
- else
|
||||
= t '.not_ordered'
|
||||
- if @group_order && @group_order.transport
|
||||
%dt= heading_helper GroupOrder, :transport
|
||||
%dd= number_to_currency(@group_order.transport)
|
||||
%dt= heading_helper GroupOrder, :total
|
||||
%dd= number_to_currency(@group_order.total)
|
||||
- if @order.closed?
|
||||
%dt= heading_helper Order, :closed_by
|
||||
%dd= show_user_link @order.updated_by
|
||||
%p= link_to t('.comment'), "#comments"
|
||||
|
||||
.well.pull-right
|
||||
= close_button :alert
|
||||
.well.span3
|
||||
= render 'switch_order', current_order: @order
|
||||
.well.span8
|
||||
%h2= t '.articles.title'
|
||||
=render 'order_details'
|
||||
|
||||
// Article box
|
||||
%section
|
||||
%h2= t '.articles.title'
|
||||
.column_content#result
|
||||
- if @group_order
|
||||
%p.pull-right= link_to t('.articles.show_hide'), '#', 'data-toggle-this' => 'tr.ignored'
|
||||
%p= link_to(t('.articles.edit_order'), edit_group_order_path(@group_order, order_id: @order.id), class: 'btn btn-primary') if @order.open?
|
||||
%p= link_to t('.articles.show_hide'), '#', 'data-toggle-this' => 'tr.ignored'
|
||||
%table.table.table-hover
|
||||
%thead
|
||||
%tr
|
||||
|
@ -97,15 +71,15 @@
|
|||
%th= number_to_currency(@group_order.total)
|
||||
%br/
|
||||
= link_to_top
|
||||
%p.pull-right= link_to(t('.articles.edit_order'), edit_group_order_path(@group_order, order_id: @order.id), class: 'btn btn-primary') if @order.open?
|
||||
- else
|
||||
- if @order.open?
|
||||
= t '.articles.not_ordered_msg'
|
||||
= link_to t('.articles.order_now'), action: "order", id: @order
|
||||
- else
|
||||
= t '.articles.order_closed_msg'
|
||||
|
||||
// Comments box
|
||||
%section
|
||||
%hr
|
||||
%h2= t '.comments.title'
|
||||
#comments
|
||||
= render 'shared/comments', comments: @order.comments
|
||||
|
|
Loading…
Reference in a new issue