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) - 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
%h2= t '.articles.title'
=render 'order_details'
// Article box // Article box
%section %section
%h2= t '.articles.title'
.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,15 +71,15 @@
%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