User screens rearranged

This commit is contained in:
echarp 2019-05-09 17:49:01 +02:00
parent f585676ccd
commit 1bcedc5bf8
6 changed files with 44 additions and 51 deletions

View File

@ -134,7 +134,7 @@ aside
padding: 0.5em 1em 0.5em 0 padding: 0.5em 1em 0.5em 0
display: block display: block
fieldset fieldset, main > form
width: 60em width: 60em
border: none border: none
margin: 1em auto margin: 1em auto

View File

@ -33,13 +33,5 @@ form#orga_search
span.label span.label
display: none 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 table tr.inactive
color: gray color: gray

View File

@ -1,5 +1,4 @@
%h2= t '.title' %h2= t '.title'
%fieldset
= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| = form_for(resource, as: resource_name, url: session_path(resource_name)) do |f|
.field.login .field.login
= f.label :login = f.label :login

View File

@ -12,11 +12,11 @@
.field .field
= f.label :email = f.label :email
= f.text_field :email = f.text_field :email
.field
= f.label :lastname
= f.text_field :lastname
.field .field
= f.label :firstname = f.label :firstname
= f.text_field :firstname = f.text_field :firstname
.field
= f.label :lastname
= f.text_field :lastname
.actions .actions
= f.submit 'Save' = f.submit 'Save'

View File

@ -1,25 +1,24 @@
%h1= User.model_name.human.pluralize %h1= User.model_name.human.pluralize
%table.index_table %table.list
%tr %tr
%th= User.human_attribute_name :login %th= User.human_attribute_name :login
%th= User.human_attribute_name :email %th= User.human_attribute_name :email
%th= User.human_attribute_name :lastname
%th= User.human_attribute_name :firstname %th= User.human_attribute_name :firstname
%th= User.human_attribute_name :lastname
%th %th
- @users.each do |user| - @users.each do |user|
%tr(class="#{cycle('odd', 'even')}") %tr{ class: cycle('odd', 'even') }
%td= user.login %td= user.login
%td= user.email %td= user.email
%td= user.lastname
%td= user.firstname %td= user.firstname
%td= user.lastname
%td %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('edit'), edit_user_path(user), class: 'edit_link'
= link_to t('destroy'), user, method: :delete, = link_to t('destroy'), user, method: :delete,
data: { confirm: 'Are you sure?' }, class: 'delete_link' data: { confirm: 'Are you sure?' }, class: 'delete_link'
%br/ .actions= link_to 'New User', new_user_path
= link_to 'New User', new_user_path

View File

@ -1,16 +1,19 @@
%h1= User.model_name.human
%fieldset
%p %p
%b Login: %b Login:
= @user.login = @user.login
%p %p
%b Email: %b Email:
= @user.email = @user.email
%p
%b Lastname:
= @user.lastname
%p %p
%b Firstname: %b Firstname:
= @user.firstname = @user.firstname
%p
%b Lastname:
= @user.lastname
.actions
= link_to 'Edit', edit_user_path(@user) = link_to 'Edit', edit_user_path(@user)
\| \|
= link_to 'Back', users_path = link_to 'Back', users_path