rework group order show view

This commit is contained in:
Philipp Rothmann 2023-02-22 11:33:47 +01:00
parent a0d62f7948
commit fead6a1c0d

View file

@ -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
// Article box
%section
.well.span8
%h2= t '.articles.title'
=render 'order_details'
// Article box
%section
.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,17 +71,17 @@
%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
%h2= t '.comments.title'
#comments
%hr
%h2= t '.comments.title'
#comments
= render 'shared/comments', comments: @order.comments
#new_comment= render 'order_comments/form', order_comment: @order.comments.build(user: current_user)
= link_to_top
#new_comment= render 'order_comments/form', order_comment: @order.comments.build(user: current_user)
= link_to_top