summaryrefslogtreecommitdiff
path: root/users
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2013-01-15 11:06:46 +0100
committerAzul <azul@leap.se>2013-01-15 11:06:46 +0100
commite7d36df945792b292732e25e879a90577050a6c1 (patch)
tree055c7ef67b57c01f285a77f596726abc766a4d78 /users
parent8141876126aa25d713cf4b2c76c3ecff837c4ba7 (diff)
minor: put emails in unstyled ul and simplify
Just found out that render(@collection) returns nil for emtpy collections. So that is usefull for putting messages about the emtpy collection in an or clause.
Diffstat (limited to 'users')
-rw-r--r--users/app/views/users/show.html.haml10
-rw-r--r--users/config/locales/en.yml1
2 files changed, 4 insertions, 7 deletions
diff --git a/users/app/views/users/show.html.haml b/users/app/views/users/show.html.haml
index 2b59c66..d8b51e9 100644
--- a/users/app/views/users/show.html.haml
+++ b/users/app/views/users/show.html.haml
@@ -12,16 +12,12 @@
%dt
=t :email_aliases
%dd
- - aliases = @user.email_aliases
- - if aliases.empty?
- none set
- - else
- .pull-left
- = render aliases
+ %ul.pull-left.unstyled
+ = render(@user.email_aliases) || t(:none_set)
.clearfix
%dt
=t :most_recently_updated_tickets
%dd
%table
%tbody
- = render @user.most_recent_tickets \ No newline at end of file
+ = render @user.most_recent_tickets
diff --git a/users/config/locales/en.yml b/users/config/locales/en.yml
index 3c71e7e..7aa23f1 100644
--- a/users/config/locales/en.yml
+++ b/users/config/locales/en.yml
@@ -1,4 +1,5 @@
en:
+ none_set: "None set."
signup: "Sign up"
signup_message: "Please create an account."
cancel: "Cancel"