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
|
|
|
|
2012-11-12 09:03:23 +01:00
|
|
|
- unless @unaccepted_tasks.empty? && @next_tasks.empty? && @unassigned_tasks.size == 0
|
|
|
|
%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
|
2012-11-12 09:03:23 +01:00
|
|
|
- unless @unassigned_tasks.size == 0
|
|
|
|
.span3.well
|
2013-02-04 00:46:22 +01:00
|
|
|
%h4= t '.tasks_open.title'
|
|
|
|
= t '.tasks_open.desc', size: @unassigned_tasks.size
|
|
|
|
= link_to t('.tasks_open.action'), 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
|
|
|
|
- if current_user.ordergroup
|
|
|
|
%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
|
|
|
|
2012-10-06 17:14:57 +02:00
|
|
|
- unless Message.public.empty?
|
|
|
|
%section
|
2013-02-04 00:46:22 +01:00
|
|
|
%h2= t '.messages.title'
|
2012-10-08 21:52:03 +02:00
|
|
|
= render 'messages/messages', messages: Message.public.order('created_at DESC').limit(5), pagination: false
|
2013-02-04 00:46:22 +01:00
|
|
|
%p= link_to t('.messages.view_all'), messages_path
|
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-02-04 00:46:22 +01:00
|
|
|
%th= t '.my_ordergroup.transactions.when'
|
|
|
|
%th= t '.my_ordergroup.transactions.where'
|
|
|
|
%th= t '.my_ordergroup.transactions.note'
|
|
|
|
%th= t '.my_ordergroup.transactions.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
|