Small bugfix in shared view. Translations on start-page.

This commit is contained in:
Benjamin Meichsner 2009-02-06 21:18:20 +01:00
parent 96442477d1
commit 24b66ee8d4
4 changed files with 22 additions and 21 deletions

View file

@ -14,13 +14,13 @@ class LoginController < ApplicationController
self.return_to = nil
current_user = nil
reset_session
flash[:notice] = _("Logged out.")
flash[:notice] = "Abgemeldet"
render :action => 'login'
end
# Displays a "denied due to insufficient privileges" message and provides the login form.
def denied
flash[:error] = _("You are not authorized to do this. Please log in as another user or go back.")
flash[:error] = "Du bist nicht berechtigt diese Seite zu besuchen. Bitte als berechtige Benutzerin anmelden oder zurück gehen."
render :action => 'login'
end
@ -39,7 +39,7 @@ class LoginController < ApplicationController
end
else
current_user = nil
flash[:error] = _("Sorry, login is not possible.")
flash[:error] = "Tschuldige, die Anmeldung war nicht erfolgreich. Bitte erneut versuchen."
end
end

View file

@ -6,11 +6,11 @@
.right_column{:style => "width:70%"}
- unless @unaccepted_tasks.empty? && @next_tasks.empty? && @unassigned_tasks_number == 0
.box_title
%h2=_ "Tasks"
%h2 Aufgaben
.column_content
-unless @next_tasks.empty?
%div{:style => "float:left, margin-bottom:2em"}
%h3=_ "Your tasks for the upcoming week:"
%h3 Deine Aufgaben für die nächste Woche:
%table{:style => "width:25em"}
-for task in @next_tasks
%tr
@ -19,13 +19,13 @@
%b= task.name
- unless @unaccepted_tasks.empty?
%h3=_ "Accept tasks"
= _("Your are responsible for a few tasks.")
= link_to _("Accept/Reject tasks"), :controller => "tasks", :action => "myTasks"
%h3 Aufgaben übernehmen
Du bis für Aufgaben verantwortlich.
= link_to "Aufgaben übernehmen/ablehnen", my_tasks_path
- unless @unassigned_tasks_number == 0
%h3=_ "Unassigned tasks"
= _("There are") + " #{@unassigned_tasks_number} " + link_to(_("unassigned task(s)"), :controller => "tasks")
%p{:style => "clear:both"}= link_to _("My tasks"), :controller => "tasks", :action => "myTasks"
%h3 Offene Aufgaben
= "Es gibt #{@unassigned_tasks_number} #{link_to 'offene Aufage(n)', :controller => 'tasks'}"
%p{:style => "clear:both"}= link_to "Meine Aufgaben", my_tasks_path
- if @ordergroup
// Current orders
@ -40,23 +40,23 @@
- if @ordergroup
// Ordergroup overview
.box_title
%h2=_ "My ordergroup"
%h2 Meine Bestellgruppe
.column_content
%p
%b= @ordergroup.name
|
=_ "Account balance:"
Kontostand:
= number_to_currency(@ordergroup.account_balance)
%span{:style => "color:grey"}
(zuletzt aktualisiert vor
= distance_of_time_in_words(Time.now, @ordergroup.account_updated) + ")"
%h3=_ "Last transactions"
= distance_of_time_in_words(Time.now, @ordergroup.account_updated) + "(n))"
%h3 Letzte Transaktionen
%table
%tr
%th=_ "When"
%th=_ "Who"
%th=_ "Note"
%th=_ "Amount"
%th Wann
%th Wer
%th Notiz
%th Betrag
- for ft in @ordergroup.financial_transactions.all(:limit => 5)
%tr{:class => cycle('even','odd')}
%td= format_time(ft.created_on)
@ -65,4 +65,4 @@
- color = ft.amount < 0 ? 'red' : 'black'
%td{:style => "color:#{color}; width:5em", :class => "currency"}= number_to_currency(ft.amount)
%br/
= link_to _("more ..."), :action => "myOrdergroup"
= link_to _("mehr ..."), my_ordergroup_path

View file

@ -2,7 +2,7 @@
%tr
%td Beschreibung:
%td=h group.description
- if @current_user.role_admin? or @current_user.role_finance?
- if group.is_a?(Ordergroup) and (@current_user.role_admin? or @current_user.role_finance?)
%tr
%td Kontakt:
%td=h group.contact

View file

@ -1,6 +1,7 @@
ActionController::Routing::Routes.draw do |map|
map.my_profile '/home/profile', :controller => 'home', :action => 'profile'
map.my_ordergroup '/home/ordergroup', :controller => 'home', :action => 'ordergroup'
map.my_tasks '/home/tasks', :controller => 'tasks', :action => 'myTasks'
map.resources :orders, :member => { :finish => :post, :add_comment => :post }