add login for gestionnaire
This commit is contained in:
parent
b3383bec9f
commit
44173a17fb
26 changed files with 313 additions and 142 deletions
14
app/views/backoffice/index.html.haml
Normal file
14
app/views/backoffice/index.html.haml
Normal file
|
@ -0,0 +1,14 @@
|
|||
#backoffice
|
||||
|
||||
|
||||
%table.table
|
||||
%thead
|
||||
%th Procédure
|
||||
%th Dossier
|
||||
%th etat
|
||||
%th Date de mise à jour
|
||||
%row
|
||||
%td Demande de subventions
|
||||
%td dossier n°34 Demande de subvention
|
||||
%td Mise à jour
|
||||
%td 24/12/2015
|
10
app/views/gestionnaires/sessions/new.html.haml
Normal file
10
app/views/gestionnaires/sessions/new.html.haml
Normal file
|
@ -0,0 +1,10 @@
|
|||
%h1 Bienvenue sur TPS
|
||||
%br
|
||||
#gestionnaire_login
|
||||
= form_for @gestionnaire, url: {controller: 'gestionnaires/sessions', action: :create } do |f|
|
||||
.form-group-lg
|
||||
.form-group
|
||||
= f.text_field :email, class: 'form-control', placeholder: 'Email'
|
||||
.form-group
|
||||
= f.password_field :password, class: 'form-control', placeholder: 'Mot de passe'
|
||||
= f.submit 'Se connecter', class: %w(btn btn-lg btn-success), data: { disable_with: 'Connexion', submit: true }
|
|
@ -13,10 +13,10 @@
|
|||
%a{href: '/', class:'btn btn-lg'}
|
||||
='TPS'
|
||||
|
||||
-if user_signed_in?
|
||||
-if gestionnaire_signed_in?
|
||||
%div{style: 'decorate:none; box-shadow:none; float:right; margin-top:8px'}
|
||||
= current_user.email
|
||||
= link_to "Déconnexion", '/logout', method: :delete, :class => 'btn btn-md'
|
||||
= current_gestionnaire.email
|
||||
= link_to "Déconnexion", '/gestionnaires/sign_out', method: :delete, :class => 'btn btn-md'
|
||||
|
||||
#flash_message.center
|
||||
- if flash.notice
|
||||
|
|
|
@ -1,24 +1,24 @@
|
|||
%p.lead{id: 'admin_section'}
|
||||
%span{class:'text-info', style:'font-weight:bold'}
|
||||
-if user_signed_in?
|
||||
='Vous êtes identifié comme une administration'
|
||||
-else
|
||||
='Si vous êtes une administration, '
|
||||
/ %p.lead{id: 'admin_section'}
|
||||
/ %span{class:'text-info', style:'font-weight:bold'}
|
||||
/ -if user_signed_in?
|
||||
/ ='Vous êtes identifié comme une administration'
|
||||
/ -else
|
||||
/ ='Si vous êtes une administration, '
|
||||
|
||||
%p.lead
|
||||
-if user_signed_in?
|
||||
= form_tag(url_for({controller: 'admin/dossier', action: :index}), class: 'form-inline', method: 'GET') do
|
||||
.form-group.form-group-lg
|
||||
= text_field_tag :siret, nil, :class => "form-control", :style => 'margin-bottom:10px', :placeholder => "N° de dossier", :id => "dossier_id", :name => "dossier_id"
|
||||
%br
|
||||
= submit_tag "Accéder", class: %w(btn btn-lg btn-success), style: 'margin-top:20px;', data: { disable_with: "Accéder", submit: true}
|
||||
-else
|
||||
= form_tag(url_for({controller: 'user/sessions', action: :create}), class: 'form-inline', method: 'POST') do
|
||||
.form-group.form-group-lg
|
||||
= text_field_tag :siret, nil, :class => "form-control", :style => 'margin-bottom:10px', :placeholder => "Identifiant", :id => "user_email", :name => "user[email]"
|
||||
%br
|
||||
= password_field_tag :siret, nil, :class => "form-control", :style => 'margin-bottom:10px', :placeholder => "Mot de passe", :id => "user_password", :name => "user[password]"
|
||||
%br
|
||||
= text_field_tag :siret, nil, :class => "form-control", :style => 'margin-bottom:10px', :placeholder => "N° de dossier", :id => "dossier_id", :name => "dossier_id"
|
||||
%br
|
||||
= submit_tag "Accéder", class: %w(btn btn-lg btn-success), style: 'margin-top:20px;', data: { disable_with: "Accéder", submit: true}
|
||||
/ %p.lead
|
||||
/ -if user_signed_in?
|
||||
/ = form_tag(url_for({controller: 'admin/dossier', action: :index}), class: 'form-inline', method: 'GET') do
|
||||
/ .form-group.form-group-lg
|
||||
/ = text_field_tag :siret, nil, :class => "form-control", :style => 'margin-bottom:10px', :placeholder => "N° de dossier", :id => "dossier_id", :name => "dossier_id"
|
||||
/ %br
|
||||
/ = submit_tag "Accéder", class: %w(btn btn-lg btn-success), style: 'margin-top:20px;', data: { disable_with: "Accéder", submit: true}
|
||||
/ -else
|
||||
/ = form_tag(url_for({controller: 'user/sessions', action: :create}), class: 'form-inline', method: 'POST') do
|
||||
/ .form-group.form-group-lg
|
||||
/ = text_field_tag :siret, nil, :class => "form-control", :style => 'margin-bottom:10px', :placeholder => "Identifiant", :id => "user_email", :name => "user[email]"
|
||||
/ %br
|
||||
/ = password_field_tag :siret, nil, :class => "form-control", :style => 'margin-bottom:10px', :placeholder => "Mot de passe", :id => "user_password", :name => "user[password]"
|
||||
/ %br
|
||||
/ = text_field_tag :siret, nil, :class => "form-control", :style => 'margin-bottom:10px', :placeholder => "N° de dossier", :id => "dossier_id", :name => "dossier_id"
|
||||
/ %br
|
||||
/ = submit_tag "Accéder", class: %w(btn btn-lg btn-success), style: 'margin-top:20px;', data: { disable_with: "Accéder", submit: true}
|
||||
|
|
|
@ -3,5 +3,7 @@
|
|||
%br
|
||||
%p{style: 'width:67%; margin-left:auto; margin-right:auto'}
|
||||
Site de démonstration d’un service public de saisie d’un projet ou de dépôt d’une démarche administrative, auprès d’un ou plusieurs organismes publics, simplifié des informations déjà connues des administrations, grâce à la fourniture du numéro SIRET.
|
||||
|
||||
.row
|
||||
= render partial: '/start/pro'
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue