foodsoft/app/views/home/index.html.haml

91 lines
3.4 KiB
Text
Raw Permalink Normal View History

- title t('.title'), false
2009-01-06 11:49:19 +01:00
- content_for(:sidebar) do
= render :partial => 'start_nav'
2014-03-07 09:51:24 +01:00
-# placeholder deface to add content using erb[silent]:contains()
- '<dashboard_top_mark>'
- unless @unaccepted_tasks.empty? && @next_tasks.empty?
%section.row-fluid
2012-10-09 02:31:10 +02:00
- unless @next_tasks.empty?
.span3.well
2013-02-04 00:46:22 +01:00
%h4= t '.your_tasks'
%dl
- @next_tasks.each do |task|
2013-02-04 00:46:22 +01:00
%dt= l task.due_date, format: t('.due_date_format')
%dd= link_to task.name, task_path(task)
- unless @unaccepted_tasks.empty?
.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
- if @unassigned_tasks.size > 0
%section
%h2
= t '.tasks_open.title'
%small
= link_to tasks_path do
= t '.tasks_open.view_all'
%i.icon.icon-chevron-right
= render 'shared/task_list', tasks: @unassigned_tasks
2009-01-06 11:49:19 +01:00
- if current_user.ordergroup
= render :partial => 'shared/open_orders', :locals => {:ordergroup => current_user.ordergroup}
2009-01-06 11:49:19 +01:00
// Stats
- if current_user.ordergroup and FoodsoftConfig[:use_apple_points]
%section
2013-02-04 00:46:22 +01:00
%h2= t '.ordergroup.title'
= render :partial => "apple_bar", :locals => {:apple_bar => AppleBar.new(current_user.ordergroup)}
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
- if current_user.ordergroup
// Ordergroup overview
%section
2013-02-04 00:46:22 +01:00
%h2= t '.my_ordergroup.title'
%p
%b= current_user.ordergroup.name
= ' | '
- 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)
%h3
= t '.my_ordergroup.transactions.title'
%small
= link_to my_ordergroup_path do
= t '.my_ordergroup.transactions.view'
%i.icon.icon-chevron-right
- '<dashboard_ordergroup_mark>'
%table.table.table-striped
%tr
2013-11-23 12:05:29 +01:00
%th= heading_helper FinancialTransaction, :created_on
%th= heading_helper FinancialTransaction, :user
- 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
- FinancialTransactionClass.sorted.each do |fc|
%th
= fc.display
- for ft in current_user.ordergroup.financial_transactions.visible.includes(:financial_transaction_type, :user).limit(5).order(created_on: :desc)
2009-02-01 21:08:04 +01:00
%tr
%td= format_time(ft.created_on)
2013-09-20 22:40:13 +02:00
%td= h(show_user(ft.user))
- if FinancialTransactionType.has_multiple_types
%td= h(ft.financial_transaction_type.name)
%td= h(ft.note)
- FinancialTransactionClass.sorted.each do |fc|
2018-09-16 12:05:39 +02:00
%td.numeric{style: 'width:5em'}
- if ft.financial_transaction_type.financial_transaction_class == fc
= ft.amount ? format_currency(ft.amount) : '-'
2014-03-07 09:51:24 +01:00
-# placeholder deface to add content using erb[silent]:contains()
- '<dashboard_bottom_mark>'