From acaa9fc19a9a8af699461a3884cc25e6ebc6dde3 Mon Sep 17 00:00:00 2001 From: Thibault Jouan Date: Wed, 7 Sep 2011 21:13:20 +0000 Subject: [PATCH] Use table for form fields in views --- app/views/playlists/_form.html.haml | 11 ++++++++--- app/views/sessions/new.html.haml | 17 ++++++++++++----- app/views/tracks/new.html.haml | 16 +++++++++++----- app/views/users/new.html.haml | 21 ++++++++++++++------- 4 files changed, 45 insertions(+), 20 deletions(-) diff --git a/app/views/playlists/_form.html.haml b/app/views/playlists/_form.html.haml index 106ab72..7226e3e 100644 --- a/app/views/playlists/_form.html.haml +++ b/app/views/playlists/_form.html.haml @@ -1,4 +1,9 @@ = form_for @playlist do |f| - = f.label :name - = f.text_field :name - = f.submit submit_text + %table + %tbody + %tr + %th= f.label :name + %td= f.text_field :name + %tfoot + %tr + %td= f.submit submit_text diff --git a/app/views/sessions/new.html.haml b/app/views/sessions/new.html.haml index be1d084..960f281 100644 --- a/app/views/sessions/new.html.haml +++ b/app/views/sessions/new.html.haml @@ -1,7 +1,14 @@ = form_for(:session, :url => sessions_path) do |f| - = f.label :email - = f.text_field :email - = f.label :password - = f.password_field :password - = f.submit 'Sign in' + %table + %tbody + %tr + %th= f.label :email + %td= f.text_field :email + %tr + %th= f.label :password + %td= f.password_field :password + %tfoot + %tr + %td= f.submit 'Sign in' + = link_to 'Sign up', new_user_path diff --git a/app/views/tracks/new.html.haml b/app/views/tracks/new.html.haml index 9683a47..2b499ba 100644 --- a/app/views/tracks/new.html.haml +++ b/app/views/tracks/new.html.haml @@ -1,6 +1,12 @@ = form_for @track, :html => { :multipart => true } do |t| - = t.label :name - = t.text_field :name - = t.label :file - = t.file_field :file - = t.submit 'Upload' + %table + %tbody + %tr + %th= t.label :name + %td= t.text_field :name + %tr + %th= t.label :file + %td= t.file_field :file + %tfoot + %tr + %td= t.submit 'Upload' diff --git a/app/views/users/new.html.haml b/app/views/users/new.html.haml index 7b8e6bf..131a57f 100644 --- a/app/views/users/new.html.haml +++ b/app/views/users/new.html.haml @@ -1,8 +1,15 @@ = form_for(@user, :url => users_path) do |f| - = f.label :email - = f.text_field :email - = f.label :password - = f.password_field :password - = f.label :password_confirmation - = f.password_field :password_confirmation - = f.submit 'Sign up' + %table + %tbody + %tr + %th= f.label :email + %td= f.text_field :email + %tr + %th= f.label :password + %td= f.password_field :password + %tr + %th= f.label :password_confirmation + %td= f.password_field :password_confirmation + %tfoot + %tr + %td= f.submit 'Sign up'