finished home i18n

This commit is contained in:
wvengen 2013-02-04 00:46:22 +01:00
parent 22e7f6a9cf
commit 2b11549d33
9 changed files with 143 additions and 70 deletions

View file

@ -7,21 +7,21 @@
%section.row-fluid
- unless @next_tasks.empty?
.span3.well
%h4 Deine Aufgaben
%h4= t '.your_tasks'
%dl
- @next_tasks.each do |task|
%dt= l task.due_date, format: "%A, %d. %b"
%dt= l task.due_date, format: t('.due_date_format')
%dd= link_to task.name, task_path(task)
- unless @unaccepted_tasks.empty?
.span3.well
%h4 Aufgaben übernehmen
Du bis für Aufgaben verantwortlich.
= link_to "Aufgaben übernehmen/ablehnen", user_tasks_path
%h4= t '.tasks_move.title'
= t '.tasks_move.desc'
= link_to t('.tasks_move.action'), user_tasks_path
- unless @unassigned_tasks.size == 0
.span3.well
%h4 Offene Aufgaben
Es gibt #{@unassigned_tasks.size}
= link_to 'offene Aufgabe(n)', tasks_path
%h4= t '.tasks_open.title'
= t '.tasks_open.desc', size: @unassigned_tasks.size
= link_to t('.tasks_open.action'), tasks_path
- if current_user.ordergroup
= render :partial => 'shared/open_orders', :locals => {:ordergroup => current_user.ordergroup}
@ -29,31 +29,31 @@
// Stats
- if current_user.ordergroup
%section
%h2 Engagement Deiner Bestellgruppe
%h2= t '.ordergroup.title'
= render :partial => "apple_bar", :locals => {:apple_bar => AppleBar.new(current_user.ordergroup)}
- unless Message.public.empty?
%section
%h2 Neuste Nachrichten
%h2= t '.messages.title'
= render 'messages/messages', messages: Message.public.order('created_at DESC').limit(5), pagination: false
%p= link_to "Alle Nachrichten einsehen", messages_path
%p= link_to t('.messages.view_all'), messages_path
- if current_user.ordergroup
// Ordergroup overview
%section
%h2 Meine Bestellgruppe
%h2= t '.my_ordergroup.title'
%p
%b= current_user.ordergroup.name
| Verfügbares Guthaben:
= t '.my_ordergroup.funds'
= 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
%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'
%table.table.table-striped
%tr
%th Wann
%th Wer
%th Notiz
%th Betrag
%th= t '.my_ordergroup.transactions.when'
%th= t '.my_ordergroup.transactions.where'
%th= t '.my_ordergroup.transactions.note'
%th= t '.my_ordergroup.transactions.amount'
- for ft in current_user.ordergroup.financial_transactions.limit(5).order('created_on DESC')
%tr
%td= format_time(ft.created_on)
@ -62,4 +62,4 @@
- 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
%p= link_to t('.my_ordergroup.transactions.view'), my_ordergroup_path