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-10-06 17:14:57 +02:00
|
|
|
- unless @unaccepted_tasks.empty? && @next_tasks.empty? && @unassigned_tasks_number == 0
|
|
|
|
%section.well
|
2012-10-09 02:31:10 +02:00
|
|
|
- unless @next_tasks.empty?
|
|
|
|
%h3 Deine Aufgaben für nächste Woche
|
|
|
|
%dl.dl-horizontal
|
|
|
|
- @next_tasks.each do |task|
|
|
|
|
%dt= l task.due_date, format: "%A, %d. %b"
|
|
|
|
%dd= link_to task.name, task_path(task)
|
2012-04-15 19:59:39 +02:00
|
|
|
|
2012-10-06 17:14:57 +02:00
|
|
|
- unless @unaccepted_tasks.empty?
|
|
|
|
%h3 Aufgaben übernehmen
|
|
|
|
Du bis für Aufgaben verantwortlich.
|
|
|
|
= link_to "Aufgaben übernehmen/ablehnen", user_tasks_path
|
|
|
|
- unless @unassigned_tasks_number == 0
|
|
|
|
%h3 Offene Aufgaben
|
|
|
|
= "Es gibt #{@unassigned_tasks_number} #{link_to 'offene Aufgabe(n)', :controller => 'tasks'}".html_safe
|
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
|
|
|
|
%h2 Engagement Deiner Bestellgruppe
|
|
|
|
= 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
|
|
|
|
%h2 Neuste Nachrichten
|
2012-10-08 21:52:03 +02:00
|
|
|
= render 'messages/messages', messages: Message.public.order('created_at DESC').limit(5), pagination: false
|
2012-10-06 17:14:57 +02:00
|
|
|
%p= link_to "Alle Nachrichten einsehen", 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
|
|
|
|
%h2 Meine Bestellgruppe
|
|
|
|
%p
|
|
|
|
%b= current_user.ordergroup.name
|
|
|
|
| Verfügbares Guthaben:
|
|
|
|
= number_to_currency(current_user.ordergroup.get_available_funds)
|
|
|
|
%small (Letzte Aktualisierung ist #{distance_of_time_in_words(Time.now, current_user.ordergroup.account_updated)} her)
|
|
|
|
%h3 Letzte Transaktionen
|
|
|
|
%table.table.table-striped
|
|
|
|
%tr
|
|
|
|
%th Wann
|
|
|
|
%th Wer
|
|
|
|
%th Notiz
|
|
|
|
%th Betrag
|
|
|
|
- for ft in current_user.ordergroup.financial_transactions.limit(5)
|
2009-02-01 21:08:04 +01:00
|
|
|
%tr
|
2012-10-06 17:14:57 +02:00
|
|
|
%td= format_time(ft.created_on)
|
|
|
|
%td= h(ft.user.nil? ? '?' : ft.user.nick)
|
|
|
|
%td= h(ft.note)
|
|
|
|
- color = ft.amount < 0 ? 'red' : 'black'
|
|
|
|
%td{:style => "color:#{color}; width:5em", :class => "currency"}= number_to_currency(ft.amount)
|
|
|
|
%br/
|
|
|
|
%p= link_to "Kontoauszug anzeigen", my_ordergroup_path
|