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)
|
- title t('.title', order: @order.name)
|
||||||
|
|
||||||
.row-fluid
|
.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
|
.well.span3
|
||||||
= close_button :alert
|
|
||||||
= render 'switch_order', current_order: @order
|
= render 'switch_order', current_order: @order
|
||||||
|
.well.span8
|
||||||
// Article box
|
|
||||||
%section
|
|
||||||
%h2= t '.articles.title'
|
%h2= t '.articles.title'
|
||||||
|
=render 'order_details'
|
||||||
|
|
||||||
|
// Article box
|
||||||
|
%section
|
||||||
.column_content#result
|
.column_content#result
|
||||||
- if @group_order
|
- if @group_order
|
||||||
%p.pull-right= link_to t('.articles.show_hide'), '#', 'data-toggle-this' => 'tr.ignored'
|
%p= 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?
|
|
||||||
%table.table.table-hover
|
%table.table.table-hover
|
||||||
%thead
|
%thead
|
||||||
%tr
|
%tr
|
||||||
|
@ -97,17 +71,17 @@
|
||||||
%th= number_to_currency(@group_order.total)
|
%th= number_to_currency(@group_order.total)
|
||||||
%br/
|
%br/
|
||||||
= link_to_top
|
= 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
|
- else
|
||||||
- if @order.open?
|
- if @order.open?
|
||||||
= t '.articles.not_ordered_msg'
|
= t '.articles.not_ordered_msg'
|
||||||
= link_to t('.articles.order_now'), action: "order", id: @order
|
= link_to t('.articles.order_now'), action: "order", id: @order
|
||||||
- else
|
- else
|
||||||
= t '.articles.order_closed_msg'
|
= t '.articles.order_closed_msg'
|
||||||
|
|
||||||
// Comments box
|
// Comments box
|
||||||
%section
|
%hr
|
||||||
%h2= t '.comments.title'
|
%h2= t '.comments.title'
|
||||||
#comments
|
#comments
|
||||||
= render 'shared/comments', comments: @order.comments
|
= render 'shared/comments', comments: @order.comments
|
||||||
#new_comment= render 'order_comments/form', order_comment: @order.comments.build(user: current_user)
|
#new_comment= render 'order_comments/form', order_comment: @order.comments.build(user: current_user)
|
||||||
= link_to_top
|
= link_to_top
|
Loading…
Reference in a new issue