diff options
author | jessib <jessib@riseup.net> | 2013-01-17 09:36:27 -0800 |
---|---|---|
committer | jessib <jessib@riseup.net> | 2013-01-17 09:36:27 -0800 |
commit | b550cd14f33b9664fe6b547dc56107fae7d12caf (patch) | |
tree | 78034e20632f9e6361deb7e1000db0bcb079f03f /users/app/views | |
parent | ee2ea4ac8f4c6b0c3b09be6ed49e7a1faec7a9c1 (diff) | |
parent | 9d53f7b2d1b34da6b6103e97bd6c931cedb23e9b (diff) |
Merge pull request #14 from leapcode/feature/show_user
Adding show view for users.
Diffstat (limited to 'users/app/views')
-rw-r--r-- | users/app/views/emails/_email.html.haml | 5 | ||||
-rw-r--r-- | users/app/views/users/_user.html.haml | 2 | ||||
-rw-r--r-- | users/app/views/users/show.html.haml | 31 |
3 files changed, 35 insertions, 3 deletions
diff --git a/users/app/views/emails/_email.html.haml b/users/app/views/emails/_email.html.haml index 3feb6f0..948d847 100644 --- a/users/app/views/emails/_email.html.haml +++ b/users/app/views/emails/_email.html.haml @@ -1,6 +1,7 @@ - if email.valid? %li.pull-right %code= email - = link_to(user_email_alias_path(@user, email), :method => :delete) do - %i.icon-remove + - if params[:action] == 'edit' + = link_to(user_email_alias_path(@user, email), :method => :delete) do + %i.icon-remove .clearfix diff --git a/users/app/views/users/_user.html.haml b/users/app/views/users/_user.html.haml index 7db0041..ca03d34 100644 --- a/users/app/views/users/_user.html.haml +++ b/users/app/views/users/_user.html.haml @@ -1,5 +1,5 @@ %tr - %td= user.login + %td= link_to user.login, user %td= time_ago_in_words(user.created_at) + " ago" %td = link_to edit_user_path(user), :class => "btn btn-mini btn-primary" do diff --git a/users/app/views/users/show.html.haml b/users/app/views/users/show.html.haml new file mode 100644 index 0000000..a1eeccb --- /dev/null +++ b/users/app/views/users/show.html.haml @@ -0,0 +1,31 @@ +.span8.offset1 + %h2= @user.login + .small + = link_to 'edit', edit_user_path(@user) + %dl.offset1 + - fields = ['login', 'email', 'created_at', 'updated_at', 'email_forward'] + - fields.each do |field| + %dt + = field.titleize + %dd + = user_field(field) + %dt + =t :email_aliases + %dd + - aliases = @user.email_aliases + - if aliases.present? + %ul.pull-left.unstyled + = render aliases + - else + =t :none + .clearfix + %dt + =t :most_recently_updated_tickets + %dd + - tix = @user.most_recent_tickets + - if tix.present? + %table + %tbody + = render @user.most_recent_tickets + - else + =t :none
\ No newline at end of file |