diff --git a/app/assets/stylesheets/all.sass b/app/assets/stylesheets/all.sass index b71a70f1..1e1be003 100644 --- a/app/assets/stylesheets/all.sass +++ b/app/assets/stylesheets/all.sass @@ -134,7 +134,7 @@ aside padding: 0.5em 1em 0.5em 0 display: block -fieldset +fieldset, main > form width: 60em border: none margin: 1em auto diff --git a/app/assets/stylesheets/orgas.sass b/app/assets/stylesheets/orgas.sass index 3e87cafb..0612a62d 100644 --- a/app/assets/stylesheets/orgas.sass +++ b/app/assets/stylesheets/orgas.sass @@ -33,13 +33,5 @@ form#orga_search span.label display: none -body.orgas.show main - fieldset.orga - min-width: 60em - dl, iframe, fieldset - display: inline-block - min-width: 40em - vertical-align: top - table tr.inactive color: gray diff --git a/app/views/devise/sessions/new.html.haml b/app/views/devise/sessions/new.html.haml index c3d99e73..57f1e1ea 100644 --- a/app/views/devise/sessions/new.html.haml +++ b/app/views/devise/sessions/new.html.haml @@ -1,19 +1,18 @@ %h2= t '.title' -%fieldset - = form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| - .field.login - = f.label :login - %br/ - = f.text_field :login, autofocus: true, autocomplete: 'login' - .field.password - = f.label :password - %br/ - = f.password_field :password, autocomplete: 'current-password' - - if devise_mapping.rememberable? - .field - = f.check_box :remember_me - = f.label :remember_me - .actions - = f.submit t('.sign_in') += form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| + .field.login + = f.label :login + %br/ + = f.text_field :login, autofocus: true, autocomplete: 'login' + .field.password + = f.label :password + %br/ + = f.password_field :password, autocomplete: 'current-password' + - if devise_mapping.rememberable? + .field + = f.check_box :remember_me + = f.label :remember_me + .actions + = f.submit t('.sign_in') = render 'devise/shared/links' diff --git a/app/views/users/_form.html.haml b/app/views/users/_form.html.haml index f4c7bf2c..03a8fe8d 100644 --- a/app/views/users/_form.html.haml +++ b/app/views/users/_form.html.haml @@ -12,11 +12,11 @@ .field = f.label :email = f.text_field :email - .field - = f.label :lastname - = f.text_field :lastname .field = f.label :firstname = f.text_field :firstname + .field + = f.label :lastname + = f.text_field :lastname .actions = f.submit 'Save' diff --git a/app/views/users/index.html.haml b/app/views/users/index.html.haml index 4b3d451d..d93f86ff 100644 --- a/app/views/users/index.html.haml +++ b/app/views/users/index.html.haml @@ -1,25 +1,24 @@ %h1= User.model_name.human.pluralize -%table.index_table +%table.list %tr %th= User.human_attribute_name :login %th= User.human_attribute_name :email - %th= User.human_attribute_name :lastname %th= User.human_attribute_name :firstname + %th= User.human_attribute_name :lastname %th - @users.each do |user| - %tr(class="#{cycle('odd', 'even')}") + %tr{ class: cycle('odd', 'even') } %td= user.login %td= user.email - %td= user.lastname %td= user.firstname + %td= user.lastname %td - = link_to t('show'), user, class: 'view_link' + = link_to user, class: 'view_link' do + %em.fa.fa-eye = link_to t('edit'), edit_user_path(user), class: 'edit_link' = link_to t('destroy'), user, method: :delete, data: { confirm: 'Are you sure?' }, class: 'delete_link' -%br/ - -= link_to 'New User', new_user_path +.actions= link_to 'New User', new_user_path diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml index 12e5312c..03e3a752 100644 --- a/app/views/users/show.html.haml +++ b/app/views/users/show.html.haml @@ -1,16 +1,19 @@ -%p - %b Login: - = @user.login -%p - %b Email: - = @user.email -%p - %b Lastname: - = @user.lastname -%p - %b Firstname: - = @user.firstname +%h1= User.model_name.human +%fieldset + %p + %b Login: + = @user.login + %p + %b Email: + = @user.email + %p + %b Firstname: + = @user.firstname + %p + %b Lastname: + = @user.lastname -= link_to 'Edit', edit_user_path(@user) -\| -= link_to 'Back', users_path +.actions + = link_to 'Edit', edit_user_path(@user) + \| + = link_to 'Back', users_path