File tree 1 file changed +9
-3
lines changed
1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 1
1
ActiveAdmin ::Dashboards . build do
2
2
3
- section "Recent Orders" do
3
+ section "Recent Orders" , :priority => 1 do
4
4
table_for Order . complete . order ( 'id desc' ) . limit ( 10 ) do
5
- column ( "Date" ) { |order | pretty_format ( order . checked_out_at ) }
6
5
column ( "State" ) { |order | status_tag ( order . state ) }
7
6
column ( "Customer" ) { |order | link_to ( order . user . email , admin_customer_path ( order . user ) ) }
8
7
column ( "Total" ) { |order | number_to_currency order . total_price }
9
8
end
10
9
end
11
10
12
- section "Recent Customers" , :priority => 15 do
11
+ section "Recent Customers" , :priority => 2 do
13
12
table_for User . order ( 'id desc' ) . limit ( 10 ) . each do |customer |
14
13
column ( :email ) { |customer | link_to ( customer . email , admin_customer_path ( customer ) ) }
15
14
end
16
15
end
17
16
17
+ section "ActiveAdmin Demo" , :priority => 3 do
18
+ div do
19
+ render ( '/admin/sidebar_links' , :model => 'dashboards' )
20
+ end
21
+ end
22
+
23
+
18
24
# Define your dashboard sections here. Each block will be
19
25
# rendered on the dashboard in the context of the view. So just
20
26
# return the content which you would like to display.
You can’t perform that action at this time.
0 commit comments