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
display: block
fieldset
fieldset, main > form
width: 60em
border: none
margin: 1em auto

View File

@ -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

View File

@ -1,6 +1,5 @@
%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
= f.label :login
%br/

View File

@ -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'

View File

@ -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

View File

@ -1,16 +1,19 @@
%p
%h1= User.model_name.human
%fieldset
%p
%b Login:
= @user.login
%p
%p
%b Email:
= @user.email
%p
%b Lastname:
= @user.lastname
%p
%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