Add interface to create and update user accounts
This commit is contained in:
parent
5c89cf1501
commit
5f3713aecd
11 changed files with 100 additions and 1 deletions
9
app/views/users/_form.haml
Normal file
9
app/views/users/_form.haml
Normal file
|
@ -0,0 +1,9 @@
|
|||
= simple_form_for @user do |f|
|
||||
= f.input :email, required: true
|
||||
= f.input :password, required: true
|
||||
= f.input :password_confirmation, required: true
|
||||
|
||||
.form-actions
|
||||
= f.submit class: 'btn'
|
||||
|
||||
= link_to 'Zurück', users_path
|
2
app/views/users/edit.haml
Normal file
2
app/views/users/edit.haml
Normal file
|
@ -0,0 +1,2 @@
|
|||
%h1 Konto bearbeiten
|
||||
= render 'form'
|
8
app/views/users/index.html.haml
Normal file
8
app/views/users/index.html.haml
Normal file
|
@ -0,0 +1,8 @@
|
|||
%h1 Konten
|
||||
- for user in @users
|
||||
%li
|
||||
= link_to user.email, user_path(user)
|
||||
%br
|
||||
= link_to 'Neues Konto', new_user_url
|
||||
|
|
||||
= link_to 'Zurück', suppliers_path
|
2
app/views/users/new.html.haml
Normal file
2
app/views/users/new.html.haml
Normal file
|
@ -0,0 +1,2 @@
|
|||
%h1 Neues Konto anlegen
|
||||
= render 'form'
|
9
app/views/users/show.html.haml
Normal file
9
app/views/users/show.html.haml
Normal file
|
@ -0,0 +1,9 @@
|
|||
%h1 Konto bearbeiten
|
||||
= @user.email
|
||||
%br
|
||||
%br
|
||||
= link_to 'Bearbeiten', edit_user_path(@user)
|
||||
|
|
||||
= link_to 'Löschen', user_path(@user), data: { confirm: 'Bist du sicher?' }, :method => :delete
|
||||
|
|
||||
=link_to 'Zurück', users_path
|
Loading…
Add table
Add a link
Reference in a new issue