From 7136ca52f9bc779aa876171a6ee97f9c42fbcbc2 Mon Sep 17 00:00:00 2001 From: Coleman Date: Fri, 17 Oct 2008 01:05:13 -0500 Subject: [PATCH] change the links up a bit and add a little bit of custom styling --- app/views/users/index.html.haml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/app/views/users/index.html.haml b/app/views/users/index.html.haml index c26f77c..bf5b169 100644 --- a/app/views/users/index.html.haml +++ b/app/views/users/index.html.haml @@ -1,9 +1,15 @@ -%h1 Peoples. +%h1 Peoples -%ul +%style{ :type => 'text/css' } + :sass + ol + :font-size 18px + +%ol - @users.each do |user| - %li - %a{ :href => url(:edit_user, :id => user.user_name) }= user.user_name - %a{ :href => url(:delete_user, :id => user.user_name), :onclick => "return confirm('Are you sure?');" } + %li{ :id => "user_#{user.id}" } + %a{ :href => url(:edit_user, :id => user.user_name), :title => 'Edit settings' } + %img{ :src => '/images/mail-attachment.png' } + %a{ :href => '#', :onclick => "if(confirm('Are you sure?')){new Ajax.Request('#{url(:user, :id => user.user_name)}', { method: 'delete', onSuccess: function(){ new Effect.DropOut($('user_#{user.id}')); }, onFailure: function() { new Effect.Highlight($('user_#{user.id}')); } });} return false;", :title => 'Destroy this user' } %img{ :src => '/images/user-trash.png' } - + = user.user_name