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
|
2017-10-20 00:58:28 +02:00
|
|
|
%h2
|
|
|
|
= t '.tasks_open.title'
|
|
|
|
%small
|
|
|
|
= link_to tasks_path do
|
|
|
|
= t '.tasks_open.view_all'
|
|
|
|
%i.icon.icon-chevron-right
|
2016-02-24 21:48:32 +01:00
|
|
|
= render 'shared/task_list', tasks: @unassigned_tasks
|
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
|
2017-10-10 18:20:54 +02:00
|
|
|
= ' | '
|
|
|
|
- if FoodsoftConfig[:charge_members_manually]
|
|
|
|
= heading_helper(Ordergroup, :account_balance) + ':'
|
|
|
|
= number_to_currency(current_user.ordergroup.account_balance)
|
|
|
|
- else
|
|
|
|
= heading_helper(Ordergroup, :available_funds) + ':'
|
|
|
|
= 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)
|
2017-10-20 00:58:28 +02:00
|
|
|
%h3
|
|
|
|
= t '.my_ordergroup.transactions.title'
|
|
|
|
%small
|
|
|
|
= link_to my_ordergroup_path do
|
|
|
|
= t '.my_ordergroup.transactions.view'
|
|
|
|
%i.icon.icon-chevron-right
|
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
|
2017-03-04 14:15:39 +01:00
|
|
|
- if FinancialTransactionType.has_multiple_types
|
|
|
|
%th= heading_helper FinancialTransaction, :financial_transaction_type
|
2013-11-23 12:05:29 +01:00
|
|
|
%th= heading_helper FinancialTransaction, :note
|
2017-03-04 14:15:39 +01:00
|
|
|
- FinancialTransactionClass.sorted.each do |fc|
|
|
|
|
%th
|
|
|
|
= fc.display
|
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))
|
2017-03-04 14:15:39 +01:00
|
|
|
- if FinancialTransactionType.has_multiple_types
|
|
|
|
%td= h(ft.financial_transaction_type.name)
|
2012-10-06 17:14:57 +02:00
|
|
|
%td= h(ft.note)
|
|
|
|
- color = ft.amount < 0 ? 'red' : 'black'
|
2017-03-04 14:15:39 +01:00
|
|
|
- FinancialTransactionClass.sorted.each do |fc|
|
|
|
|
%td{:style => "color:#{color}; width:5em", :class => "currency"}
|
|
|
|
- if ft.financial_transaction_type.financial_transaction_class == fc
|
|
|
|
= number_to_currency(ft.amount)
|
2014-03-07 09:51:24 +01:00
|
|
|
|
|
|
|
-# placeholder deface to add content using erb[silent]:contains()
|
|
|
|
- '<dashboard_bottom_mark>'
|