Add interface to create and update user accounts

This commit is contained in:
1resu 2021-12-19 04:13:05 +01:00
parent 5c89cf1501
commit 5f3713aecd
11 changed files with 100 additions and 1 deletions

View file

@ -20,4 +20,6 @@
%br/
= link_to 'Neuer Lieferant', new_supplier_url
|
= link_to 'Konten', users_url

View 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

View file

@ -0,0 +1,2 @@
%h1 Konto bearbeiten
= render 'form'

View 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

View file

@ -0,0 +1,2 @@
%h1 Neues Konto anlegen
= render 'form'

View 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