1 |
628 |
ahitrov |
<fieldset> |
2 |
|
|
<legend>Найден заказ со статусом "<span style="color:yellow"><% $current_status->[1] %></span>"</legend> |
3 |
|
|
|
4 |
|
|
<& /contenido/webshop/components/order_browse.msn, documents => \@documents, columns => \@columns, filter => \%filter_params, status => $order->status, no_inline => 1, %ARGS &> |
5 |
|
|
|
6 |
|
|
</td> |
7 |
|
|
<td width="1%"> </td> |
8 |
|
|
</tr> |
9 |
|
|
</table> |
10 |
|
|
|
11 |
|
|
</body> |
12 |
|
|
</html> |
13 |
|
|
<%args> |
14 |
|
|
|
15 |
|
|
$order => undef |
16 |
|
|
|
17 |
|
|
</%args> |
18 |
|
|
<%init> |
19 |
|
|
|
20 |
|
|
return unless ref $order; |
21 |
|
|
|
22 |
|
|
my @documents = ($order); |
23 |
|
|
my %filter_params = ( ost => $order->status ); |
24 |
|
|
my $size = 40; |
25 |
|
|
|
26 |
|
|
my %opts; |
27 |
|
|
my $company_filter_value; |
28 |
|
|
if ( exists $ARGS{order_company_filter} ) { |
29 |
|
|
$company_filter_value = $ARGS{order_company_filter}; |
30 |
|
|
$m->comp( '/contenido/components/cookies.msn', name => $request->{cookie_filter_company}, value => $company_filter_value ); |
31 |
|
|
if ( defined $company_filter_value && $company_filter_value ne '' ) { |
32 |
|
|
$opts{company_id} = $company_filter_value; |
33 |
|
|
} |
34 |
|
|
} else { |
35 |
|
|
$company_filter_value = $m->comp( '/contenido/components/cookies.msn', name => $request->{cookie_filter_company} ); |
36 |
|
|
if ( defined $company_filter_value && $company_filter_value ne '' ) { |
37 |
|
|
$opts{company_id} = $company_filter_value; |
38 |
|
|
} |
39 |
|
|
} |
40 |
|
|
|
41 |
|
|
my @structure = webshop::Order->new( $keeper->{webshop} )->structure; |
42 |
|
|
my @columns = sort { $a->{column} <=> $b->{column} } |
43 |
|
|
grep { $_->{column} } @structure; |
44 |
|
|
push @columns, {attr => '_act_', rusname => 'Действия'}; |
45 |
|
|
my ($status_map) = grep { $_->{attr} eq 'status' } @structure; |
46 |
|
|
my ($current_status) = grep { $_->[0] == $order->status } @{$status_map->{cases}}; |
47 |
|
|
|
48 |
|
|
my $active_rights = $m->comp('/contenido/webshop/subs/user_rights.msn'); |
49 |
|
|
|
50 |
|
|
</%init> |