2012-10-06 17:14:57 +02:00
|
|
|
- title t('.title'), false
|
2009-01-06 11:49:19 +01:00
|
|
|
|
2012-10-06 17:14:57 +02:00
|
|
|
- content_for(:sidebar) do
|
2009-02-18 12:01:51 +01:00
|
|
|
= render :partial => 'start_nav'
|
2009-01-10 19:36:58 +01:00
|
|
|
|
2014-03-07 09:51:24 +01:00
|
|
|
-# placeholder deface to add content using erb[silent]:contains()
|
|
|
|
- '<dashboard_top_mark>'
|
|
|
|
|
2016-02-24 21:48:32 +01:00
|
|
|
- unless @unaccepted_tasks.empty? && @next_tasks.empty?
|
2012-11-12 09:03:23 +01:00
|
|
|
%section.row-fluid
|
2012-10-09 02:31:10 +02:00
|
|
|
- unless @next_tasks.empty?
|
2012-11-12 09:03:23 +01:00
|
|
|
.span3.well
|
2013-02-04 00:46:22 +01:00
|
|
|
%h4= t '.your_tasks'
|
2012-11-12 09:03:23 +01:00
|
|
|
%dl
|
|
|
|
- @next_tasks.each do |task|
|
2013-02-04 00:46:22 +01:00
|
|
|
%dt= l task.due_date, format: t('.due_date_format')
|
2012-11-12 09:03:23 +01:00
|
|
|
%dd= link_to task.name, task_path(task)
|
2012-10-06 17:14:57 +02:00
|
|
|
- unless @unaccepted_tasks.empty?
|
2012-11-12 09:03:23 +01:00
|
|
|
.span3.well
|
2013-02-04 00:46:22 +01:00
|
|
|
%h4= t '.tasks_move.title'
|
|
|
|
= t '.tasks_move.desc'
|
|
|
|
= link_to t('.tasks_move.action'), user_tasks_path
|
2016-02-24 21:48:32 +01:00
|
|
|
|
|
|
|
- if @unassigned_tasks.size > 0
|
|
|
|
%section
|
|
|
|
%h2= t '.tasks_open.title'
|
|
|
|
= render 'shared/task_list', tasks: @unassigned_tasks
|
|
|
|
= link_to t('.tasks_open.view_all'), tasks_path
|
2009-01-06 11:49:19 +01:00
|
|
|
|
2012-10-06 17:14:57 +02:00
|
|
|
- if current_user.ordergroup
|
|
|
|
= render :partial => 'shared/open_orders', :locals => {:ordergroup => current_user.ordergroup}
|
2009-01-06 11:49:19 +01:00
|
|
|
|
2012-10-06 17:14:57 +02:00
|
|
|
// Stats
|
2014-02-25 10:53:28 +01:00
|
|
|
- if current_user.ordergroup and FoodsoftConfig[:use_apple_points]
|
2012-10-06 17:14:57 +02:00
|
|
|
%section
|
2013-02-04 00:46:22 +01:00
|
|
|
%h2= t '.ordergroup.title'
|
2012-10-06 17:14:57 +02:00
|
|
|
= render :partial => "apple_bar", :locals => {:apple_bar => AppleBar.new(current_user.ordergroup)}
|
2009-08-01 13:41:22 +02:00
|
|
|
|
2014-03-07 09:51:24 +01:00
|
|
|
-# placeholder deface to add content using erb[silent]:contains()
|
|
|
|
- '<dashboard_middle_mark>'
|
2009-01-15 20:10:50 +01:00
|
|
|
|
2012-10-06 17:14:57 +02:00
|
|
|
- if current_user.ordergroup
|
|
|
|
// Ordergroup overview
|
|
|
|
%section
|
2013-02-04 00:46:22 +01:00
|
|
|
%h2= t '.my_ordergroup.title'
|
2012-10-06 17:14:57 +02:00
|
|
|
%p
|
|
|
|
%b= current_user.ordergroup.name
|
2013-02-04 00:46:22 +01:00
|
|
|
= t '.my_ordergroup.funds'
|
2012-10-06 17:14:57 +02:00
|
|
|
= number_to_currency(current_user.ordergroup.get_available_funds)
|
2013-02-04 00:46:22 +01:00
|
|
|
%small= t '.my_ordergroup.last_update', when: distance_of_time_in_words(Time.now, current_user.ordergroup.account_updated)
|
|
|
|
%h3= t '.my_ordergroup.transactions.title'
|
2012-10-06 17:14:57 +02:00
|
|
|
%table.table.table-striped
|
|
|
|
%tr
|
2013-11-23 12:05:29 +01:00
|
|
|
%th= heading_helper FinancialTransaction, :created_on
|
|
|
|
%th= heading_helper FinancialTransaction, :user
|
|
|
|
%th= heading_helper FinancialTransaction, :note
|
|
|
|
%th= heading_helper FinancialTransaction, :amount
|
2012-11-12 13:13:01 +01:00
|
|
|
- for ft in current_user.ordergroup.financial_transactions.limit(5).order('created_on DESC')
|
2009-02-01 21:08:04 +01:00
|
|
|
%tr
|
2012-10-06 17:14:57 +02:00
|
|
|
%td= format_time(ft.created_on)
|
2013-09-20 22:40:13 +02:00
|
|
|
%td= h(show_user(ft.user))
|
2012-10-06 17:14:57 +02:00
|
|
|
%td= h(ft.note)
|
|
|
|
- color = ft.amount < 0 ? 'red' : 'black'
|
|
|
|
%td{:style => "color:#{color}; width:5em", :class => "currency"}= number_to_currency(ft.amount)
|
|
|
|
%br/
|
2013-02-04 00:46:22 +01:00
|
|
|
%p= link_to t('.my_ordergroup.transactions.view'), my_ordergroup_path
|
2014-03-07 09:51:24 +01:00
|
|
|
|
|
|
|
-# placeholder deface to add content using erb[silent]:contains()
|
|
|
|
- '<dashboard_bottom_mark>'
|