Merge branch 'staging'

This commit is contained in:
Mathieu Magnin 2017-02-21 12:33:58 +01:00
commit ec15e73b75
161 changed files with 1552 additions and 1188 deletions

View file

@ -97,6 +97,8 @@ gem 'openstack'
gem 'browser' gem 'browser'
gem 'simple_form'
group :test do group :test do
gem 'capybara' gem 'capybara'
gem 'launchy' gem 'launchy'
@ -117,11 +119,8 @@ end
group :development do group :development do
# Access an IRB console on exception pages or by using <%= console %> in views # Access an IRB console on exception pages or by using <%= console %> in views
gem 'web-console' gem 'web-console'
gem 'rack-handlers' gem 'rack-handlers'
gem 'xray-rails' gem 'xray-rails'
end end

View file

@ -540,6 +540,9 @@ GEM
shellany (0.0.1) shellany (0.0.1)
shoulda-matchers (3.1.1) shoulda-matchers (3.1.1)
activesupport (>= 4.0.0) activesupport (>= 4.0.0)
simple_form (3.4.0)
actionpack (> 4, < 5.1)
activemodel (> 4, < 5.1)
simplecov (0.12.0) simplecov (0.12.0)
docile (~> 1.1.0) docile (~> 1.1.0)
json (>= 1.8, < 3) json (>= 1.8, < 3)
@ -688,6 +691,7 @@ DEPENDENCIES
selenium-webdriver selenium-webdriver
sentry-raven sentry-raven
shoulda-matchers shoulda-matchers
simple_form
simplecov simplecov
smart_listing smart_listing
spreadsheet_architect spreadsheet_architect

View file

@ -3,6 +3,6 @@ $(document).on('page:load', wysihtml5_active);
function wysihtml5_active (){ function wysihtml5_active (){
$('.wysihtml5').each(function(i, elem) { $('.wysihtml5').each(function(i, elem) {
$(elem).wysihtml5({ toolbar:{ "fa": true, "link": false, "color": true }, "locale": "fr-FR" }); $(elem).wysihtml5({ toolbar:{ "fa": true, "link": false, "color": false }, "locale": "fr-FR" });
}); });
} }

View file

@ -18,14 +18,6 @@ function action_type_de_champs() {
toggleErrorClass(this, validatePhone(val)); toggleErrorClass(this, validatePhone(val));
}); });
$("#liste_champs input").on('focus', function () {
$("#description_" + this.id).slideDown();
});
$("#liste_champs input").on('blur', function () {
$("#description_" + this.id).slideUp();
});
address_type_init(); address_type_init();
} }

View file

@ -0,0 +1,21 @@
$default-spacer: 15px;
.m-1 {
margin: $default-spacer;
}
.mt-1 {
margin-top: $default-spacer;
}
.mr-1 {
margin-right: $default-spacer;
}
.mb-1 {
margin-bottom: $default-spacer;
}
.ml-1 {
margin-left: $default-spacer;
}

View file

@ -0,0 +1 @@
$font-size-base: 16px;

View file

@ -20,6 +20,7 @@
*= require franceconnect *= require franceconnect
*= require bootstrap-wysihtml5 *= require bootstrap-wysihtml5
*/ */
@import "variables";
@import "bootstrap-sprockets"; @import "bootstrap-sprockets";
@import "bootstrap"; @import "bootstrap";
@ -143,10 +144,6 @@ textarea#description {
max-width: 27px; max-width: 27px;
} }
label {
font-weight: normal;
}
div.pagination { div.pagination {
padding-top: 20px; padding-top: 20px;
display: block; display: block;

View file

@ -3,10 +3,6 @@
// You can use Sass (SCSS) here: http://sass-lang.com/ // You can use Sass (SCSS) here: http://sass-lang.com/
@import "bootstrap"; @import "bootstrap";
table {
font-size: 13px;
}
#carte_page { #carte_page {
#map { #map {
@extend .col-md-12; @extend .col-md-12;

View file

@ -7,9 +7,7 @@
.show-block { .show-block {
width: 90%; width: 90%;
.body{ .body{
padding-left: 35px; padding: 15px;
padding-right: 35px;
padding-bottom: 35px;
} }
} }
} }
@ -134,10 +132,3 @@
width: 160px; width: 160px;
} }
} }
.description_div {
margin-top: 5px;
margin-left: 5px;
color: dimgrey;
display: none;
}

View file

@ -30,18 +30,6 @@
color: #000000; color: #000000;
margin-bottom: 10px; margin-bottom: 10px;
} }
.new-action {
background-color: #E45B51;
text-align: center;
cursor: pointer;
color: #FFFFFF;
width: 253px;
height: 40px;
line-height: 40px;
font-family: Arial;
font-size: 16px;
font-weight: bold;
}
.file { .file {
padding-right: 70px; padding-right: 70px;
text-align: center; text-align: center;
@ -59,20 +47,7 @@
border-bottom: 1px solid #979797; border-bottom: 1px solid #979797;
} }
#new-commentaire { #new-commentaire {
padding: 35px; padding: 15px;
.btn-send {
background-color: #E45B51;
text-align: center;
color: #FFFFFF;
width: 150px;
height: 40px;
line-height: 28px;
font-family: Arial;
font-size: 16px;
font-weight: bold;
float: right;
border-radius: 0;
}
} }
} }
.infos { .infos {

View file

@ -1,4 +1,4 @@
#left-pannel { #left-panel {
margin-top: 60px; margin-top: 60px;
padding: 0; padding: 0;
background-color: #003189; background-color: #003189;

View file

@ -158,7 +158,6 @@
position: fixed; position: fixed;
bottom: 26px; bottom: 26px;
right: -35px; right: -35px;
-webkit-transform: rotate(-45deg);
transform: rotate(-45deg); transform: rotate(-45deg);
width: 150px; width: 150px;
background-color: #008cba; background-color: #008cba;
@ -207,4 +206,3 @@
font-size: 20px; font-size: 20px;
} }
} }

View file

@ -1,6 +1,5 @@
@media print { @media print {
html, body { html, body {
width: 900px;
margin: 0; margin: 0;
} }
@ -28,4 +27,39 @@
#backoffice_dossier_show .nav-tabs { #backoffice_dossier_show .nav-tabs {
display: none; display: none;
} }
#left-panel {
margin-top: 0;
height: auto;
position: relative;
width: 100%;
}
#wrap {
overflow: visible;
}
#main-container {
width: 100%;
}
#beta {
top: 26px;
bottom: initial;
position: absolute;
transform: rotate(45deg);
}
.copyright {
width: 100%;
left: 0;
}
.no-page-break-inside {
page-break-inside: avoid;
}
.display-block-on-print {
display: block !important;
}
} }

View file

@ -1,3 +1,6 @@
.twitter-typeahead {
width: 100%; // http://stackoverflow.com/questions/17957513/extending-the-width-of-bootstrap-typeahead-to-match-input-field
}
.tt-menu { .tt-menu {
padding: 8px 0; padding: 8px 0;

View file

@ -0,0 +1,24 @@
class Admin::MailTemplatesController < AdminController
before_action :retrieve_procedure
def index
@mail_templates = @procedure.mail_templates
end
def edit
@mail_template = @procedure.mail_templates.find(params[:id])
end
def update
mail_template = @procedure.mail_templates.find(params[:id])
mail_template.update_attributes(update_params)
redirect_to admin_procedure_mail_templates_path
end
private
def update_params
params.require(:mail_template).permit(:body, :object)
end
end

View file

@ -1,20 +0,0 @@
class Admin::MailsController < AdminController
before_action :retrieve_procedure
def index
end
def update
mail = current_administrateur.procedures.find(params[:procedure_id]).mail_templates.find(params[:id])
mail.update_attributes(update_params)
redirect_to admin_procedure_mails_path
end
private
def update_params
params.require(:mail_received).permit(:body, :object)
end
end

View file

@ -6,8 +6,11 @@ class Admin::PiecesJustificativesController < AdminController
end end
def update def update
@procedure.update_attributes(update_params) if @procedure.update_attributes(update_params)
flash.now.notice = 'Modifications sauvegardées' flash.now.notice = 'Modifications sauvegardées'
else
flash.now.notice = 'Une erreur est survenue'
end
render 'show', format: :js render 'show', format: :js
end end
@ -22,7 +25,7 @@ class Admin::PiecesJustificativesController < AdminController
def update_params def update_params
params params
.require(:procedure) .require(:procedure)
.permit(types_de_piece_justificative_attributes: [:libelle, :description, :id, :order_place]) .permit(types_de_piece_justificative_attributes: [:libelle, :description, :id, :order_place, :lien_demarche])
end end
def move_up def move_up
@ -41,4 +44,4 @@ class Admin::PiecesJustificativesController < AdminController
render json: {}, status: 400 render json: {}, status: 400
end end
end end
end end

View file

@ -3,7 +3,6 @@ class Admin::ProceduresController < AdminController
helper SmartListing::Helper helper SmartListing::Helper
before_action :retrieve_procedure, only: [:show, :edit] before_action :retrieve_procedure, only: [:show, :edit]
before_action :procedure_locked?, only: [:edit]
def index def index
@procedures = smart_listing_create :procedures, @procedures = smart_listing_create :procedures,
@ -61,7 +60,7 @@ class Admin::ProceduresController < AdminController
end end
def create def create
@procedure = Procedure.new(create_procedure_params) @procedure = Procedure.new(procedure_params)
@procedure.module_api_carto = ModuleAPICarto.new(create_module_api_carto_params) if @procedure.valid? @procedure.module_api_carto = ModuleAPICarto.new(create_module_api_carto_params) if @procedure.valid?
unless @procedure.save unless @procedure.save
@ -76,12 +75,12 @@ class Admin::ProceduresController < AdminController
def update def update
@procedure = current_administrateur.procedures.find(params[:id]) @procedure = current_administrateur.procedures.find(params[:id])
unless @procedure.update_attributes(create_procedure_params) unless @procedure.update_attributes(procedure_params)
flash.now.alert = @procedure.errors.full_messages.join('<br />').html_safe flash.now.alert = @procedure.errors.full_messages.join('<br />').html_safe
return render 'edit' return render 'edit'
end end
flash.notice = 'Préocédure modifiée' flash.notice = 'Procédure modifiée'
redirect_to edit_admin_procedure_path(id: @procedure.id) redirect_to edit_admin_procedure_path(id: @procedure.id)
end end
@ -192,8 +191,12 @@ class Admin::ProceduresController < AdminController
private private
def create_procedure_params def procedure_params
params.require(:procedure).permit(:libelle, :description, :organisation, :direction, :lien_demarche, :lien_site_web, :lien_notice, :euro_flag, :logo, :cerfa_flag, :for_individual, :individual_with_siret, module_api_carto_attributes: [:id, :use_api_carto, :quartiers_prioritaires, :cadastre]).merge(administrateur_id: current_administrateur.id) if @procedure.try(:locked?)
params.require(:procedure).permit(:libelle, :description, :organisation, :direction, :lien_site_web, :lien_notice, :euro_flag, :logo)
else
params.require(:procedure).permit(:libelle, :description, :organisation, :direction, :lien_site_web, :lien_notice, :euro_flag, :logo, :lien_demarche, :cerfa_flag, :for_individual, :individual_with_siret, module_api_carto_attributes: [:id, :use_api_carto, :quartiers_prioritaires, :cadastre]).merge(administrateur_id: current_administrateur.id)
end
end end
def create_module_api_carto_params def create_module_api_carto_params

View file

@ -56,7 +56,10 @@ class Backoffice::DossiersController < Backoffice::DossiersListController
@search_terms = params[:q] @search_terms = params[:q]
# exact id match? # exact id match?
@dossiers = Dossier.where(id: @search_terms.to_i) if @search_terms.to_i < 2147483647 if @search_terms.to_i != 0
@dossiers = current_gestionnaire.dossiers.where(id: @search_terms.to_i)
end
@dossiers = Dossier.none if @dossiers.nil? @dossiers = Dossier.none if @dossiers.nil?
# full text search # full text search
@ -158,6 +161,15 @@ class Backoffice::DossiersController < Backoffice::DossiersListController
render 'backoffice/dossiers/index', formats: :js render 'backoffice/dossiers/index', formats: :js
end end
def archive
facade = create_dossier_facade params[:dossier_id]
unless facade.dossier.archived
facade.dossier.update(archived: true)
flash.notice = 'Dossier archivé'
end
redirect_to backoffice_dossiers_path
end
private private
def create_dossier_facade dossier_id def create_dossier_facade dossier_id

View file

@ -36,7 +36,7 @@ class Backoffice::PreferenceListDossierController < Backoffice::DossiersListCont
private private
def path def path
Features.opensimplif ? 'opensimplif/pref_list' : 'backoffice/dossiers/pref_list' 'backoffice/dossiers/pref_list'
end end
def params_procedure_id def params_procedure_id

View file

@ -1,61 +0,0 @@
class OpensimplifController < Backoffice::Dossiers::ProcedureController
def index
if params[:id].nil?
procedure = current_gestionnaire.procedures.order('libelle ASC').first
if procedure.nil?
return redirect_to simplifications_nothing_path
else
return redirect_to simplification_path(id: procedure.id)
end
end
smartlisting_dossier
end
def nothing
end
def reload_smartlisting
smartlisting_dossier
render 'opensimplif/index', formats: :js
end
private
def smartlisting_dossier dossiers_list=nil, liste='all_state'
dossiers_list_facade liste
mes_dossiers_list = current_user.dossiers
follow_dossiers_list = dossiers_list_facade.service.suivi
all_state_dossiers_list = dossiers_list_facade.service.all_state
if param_page.nil?
params[:dossiers_smart_listing] = {page: dossiers_list_facade.service.default_page}
end
smart_listing_create :mes_dossiers,
mes_dossiers_list,
partial: "backoffice/dossiers/list",
array: true,
default_sort: dossiers_list_facade.service.default_sort
smart_listing_create :follow_dossiers,
follow_dossiers_list,
partial: "backoffice/dossiers/list",
array: true,
default_sort: dossiers_list_facade.service.default_sort
smart_listing_create :all_state_dossiers,
all_state_dossiers_list,
partial: "backoffice/dossiers/list",
array: true,
default_sort: dossiers_list_facade.service.default_sort
end
def dossiers_list_facade liste='all_state'
@facade_data_view ||= DossiersListFacades.new current_gestionnaire, liste, retrieve_procedure
end
end

View file

@ -7,12 +7,6 @@ class RootController < ApplicationController
route = Rails.application.routes.recognize_path(new_user_session_path) route = Rails.application.routes.recognize_path(new_user_session_path)
end end
if Features.opensimplif
unless !user_signed_in? && !administrateur_signed_in? && !gestionnaire_signed_in?
return redirect_to simplifications_path
end
end
if user_signed_in? && !route[:controller].match('users').nil? if user_signed_in? && !route[:controller].match('users').nil?
return redirect_to users_dossiers_path return redirect_to users_dossiers_path
@ -43,6 +37,8 @@ class RootController < ApplicationController
return redirect_to administrations_path return redirect_to administrations_path
end end
@demo_environment_host = "https://tps-dev.apientreprise.fr" unless Rails.env.development?
render 'landing' render 'landing'
end end
end end

View file

@ -29,8 +29,6 @@ class Users::SessionsController < Sessions::SessionsController
current_user.update_attributes(loged_in_with_france_connect: '') current_user.update_attributes(loged_in_with_france_connect: '')
end end
check_opensimplif if Features.opensimplif
if user_signed_in? if user_signed_in?
redirect_to after_sign_in_path_for(:user) redirect_to after_sign_in_path_for(:user)
elsif gestionnaire_signed_in? elsif gestionnaire_signed_in?
@ -74,18 +72,6 @@ class Users::SessionsController < Sessions::SessionsController
private private
def check_opensimplif
return if (user_signed_in? && gestionnaire_signed_in?) || administrateur_signed_in?
if gestionnaire_signed_in?
User.create email: params[:user][:email], password: params[:user][:password]
try_to_authenticate User
elsif user_signed_in?
Gestionnaire.create email: params[:user][:email], password: params[:user][:password]
try_to_authenticate Gestionnaire
end
end
def error_procedure def error_procedure
flash.alert = t('errors.messages.procedure_not_found') flash.alert = t('errors.messages.procedure_not_found')
redirect_to url_for root_path redirect_to url_for root_path
@ -101,6 +87,7 @@ class Users::SessionsController < Sessions::SessionsController
if resource = klass.find_for_database_authentication(email: params[:user][:email]) if resource = klass.find_for_database_authentication(email: params[:user][:email])
if resource.valid_password?(params[:user][:password]) if resource.valid_password?(params[:user][:password])
sign_in resource sign_in resource
resource.force_sync_credentials
set_flash_message :notice, :signed_in set_flash_message :notice, :signed_in
end end
end end

View file

@ -7,4 +7,9 @@ class ChampDecorator < Draper::Decorator
end end
object.value object.value
end end
end
def description_with_links
description.gsub(URI.regexp, '<a target="_blank" href="\0">\0</a>').html_safe if description
end
end

View file

@ -0,0 +1,14 @@
class MailTemplateDecorator < Draper::Decorator
delegate_all
def name
case object.type
when "MailReceived"
"E-mail d'accusé de réception"
when "MailValidated"
"E-mail de validation"
else
object.type
end
end
end

View file

@ -11,9 +11,17 @@ class ProcedureDecorator < Draper::Decorator
end end
def logo_img def logo_img
return h.image_url(LOGO_NAME) if logo.blank? if logo.blank?
File.join(STORAGE_URL, File.basename(logo.path)) h.image_url(LOGO_NAME)
else
if Features.remote_storage
(RemoteDownloader.new logo.filename).url
else
(LocalDownloader.new logo.path, 'logo').url
end
end
end end
def geographic_information def geographic_information
module_api_carto module_api_carto
end end

View file

@ -39,4 +39,4 @@ class TypeDeChampDecorator < Draper::Decorator
@count_type_de_champ ||= procedure.types_de_champ.count @count_type_de_champ ||= procedure.types_de_champ.count
end end
end end
end end

View file

@ -6,7 +6,6 @@ class DossiersListFacades
def initialize current_devise_profil, liste, procedure = nil def initialize current_devise_profil, liste, procedure = nil
@current_devise_profil = current_devise_profil @current_devise_profil = current_devise_profil
@liste = liste @liste = liste
@liste = 'all_state' if Features.opensimplif
@procedure = procedure @procedure = procedure
end end

View file

@ -4,11 +4,11 @@ class NotificationMailer < ApplicationMailer
end end
def dossier_received dossier def dossier_received dossier
send_mail dossier, MailTemplate.replace_tags(dossier.procedure.mail_received.object, dossier) send_mail dossier, dossier.procedure.mail_received.object_for_dossier(dossier)
end end
def dossier_validated dossier def dossier_validated dossier
send_mail dossier, "Votre dossier TPS N°#{dossier.id} a été validé" send_mail dossier, dossier.procedure.mail_validated.object_for_dossier(dossier)
end end
def dossier_submitted dossier def dossier_submitted dossier

View file

@ -6,7 +6,8 @@ class Administrateur < ActiveRecord::Base
has_many :procedures has_many :procedures
before_save :ensure_api_token before_save :ensure_api_token
after_update :sync_credentials
include CredentialsSyncableConcern
def ensure_api_token def ensure_api_token
if api_token.nil? if api_token.nil?
@ -27,10 +28,4 @@ class Administrateur < ActiveRecord::Base
end end
end end
def sync_credentials
if email_changed? || encrypted_password_changed?
return SyncCredentialsService.new(Administrateur, email_was, email, encrypted_password).change_credentials!
end
true
end
end end

View file

@ -0,0 +1,19 @@
module CredentialsSyncableConcern
extend ActiveSupport::Concern
included do
after_update :sync_credentials
end
def sync_credentials
if email_changed? || encrypted_password_changed?
return force_sync_credentials
end
true
end
def force_sync_credentials
SyncCredentialsService.new(self.class, email_was, email, encrypted_password).change_credentials!
end
end

View file

@ -309,6 +309,10 @@ class Dossier < ActiveRecord::Base
end end
end end
def followers_gestionnaires_emails
follows.includes(:gestionnaire).map { |f| f.gestionnaire }.pluck(:email).join(' ')
end
def reset! def reset!
etablissement.destroy etablissement.destroy
entreprise.destroy entreprise.destroy

View file

@ -14,7 +14,8 @@ class Gestionnaire < ActiveRecord::Base
after_create :build_default_preferences_list_dossier after_create :build_default_preferences_list_dossier
after_create :build_default_preferences_smart_listing_page after_create :build_default_preferences_smart_listing_page
after_update :sync_credentials
include CredentialsSyncableConcern
def dossiers_follow def dossiers_follow
@dossiers_follow ||= dossiers.joins(:follows).where("follows.gestionnaire_id = #{id}") @dossiers_follow ||= dossiers.joins(:follows).where("follows.gestionnaire_id = #{id}")
@ -119,11 +120,4 @@ class Gestionnaire < ActiveRecord::Base
couples.include?({table: table, column: column}) couples.include?({table: table, column: column})
end end
def sync_credentials
if email_changed? || encrypted_password_changed?
return SyncCredentialsService.new(Gestionnaire, email_was, email, encrypted_password).change_credentials!
end
true
end
end end

View file

@ -1,31 +1,46 @@
class MailTemplate < ActiveRecord::Base class MailTemplate < ActiveRecord::Base
include Rails.application.routes.url_helpers
include ActionView::Helpers::UrlHelper
belongs_to :procedure belongs_to :procedure
enum tags: { TAGS = {
numero_dossier: { numero_dossier: {
description: "Permet d'afficher le numéro de dossier de l'utilisateur." description: "Permet d'afficher le numéro de dossier de l'utilisateur."
}, },
libelle_procedure: { lien_dossier: {
description: "Permet d'afficher le libellé de la procédure." description: "Permet d'afficher un lien vers le dossier de l'utilisateur."
} },
} libelle_procedure: {
description: "Permet d'afficher le libellé de la procédure."
}
}
def self.replace_tags string, dossier def object_for_dossier dossier
@dossier = dossier replace_tags(object, dossier)
end
tags.inject(string) do |acc, tag| def body_for_dossier dossier
acc.gsub!("--#{tag.first}--", replace_tag(tag.first.to_sym)) || acc replace_tags(body, dossier)
end
def replace_tags string, dossier
TAGS.inject(string) do |acc, tag|
acc.gsub!("--#{tag.first}--", replace_tag(tag.first.to_sym, dossier)) || acc
end end
end end
private private
def self.replace_tag tag def replace_tag tag, dossier
case tag case tag
when :numero_dossier when :numero_dossier
@dossier.id.to_s dossier.id.to_s
when :lien_dossier
# TPS::Application::URL # quickfix
link_to users_dossier_recapitulatif_url(dossier), users_dossier_recapitulatif_url(dossier), target: '_blank'
when :libelle_procedure when :libelle_procedure
@dossier.procedure.libelle dossier.procedure.libelle
else else
'--BALISE_NON_RECONNUE--' '--BALISE_NON_RECONNUE--'
end end

View file

@ -0,0 +1,18 @@
class MailValidated < MailTemplate
before_save :default_values
def default_values
self.object ||= "[TPS] Votre dossier TPS N°--numero_dossier-- a été validé"
self.body ||= "Bonjour,<br>
<br>
Votre dossier N°--numero_dossier-- est prêt à être déposé pour instruction.<br>
<br>
Afin de finaliser son dépôt, merci de vous rendre sur --lien_dossier--.,<br>
<br>
Bonne journée,<br>
---<br>
Merci de ne pas répondre à ce mail. Postez directement vos questions dans votre dossier sur la plateforme.<br>
---<br>
L'équipe TPS"
end
end

View file

@ -5,6 +5,7 @@ class Procedure < ActiveRecord::Base
has_many :dossiers has_many :dossiers
has_many :mail_templates has_many :mail_templates
has_one :mail_received has_one :mail_received
has_one :mail_validated
has_one :procedure_path, dependent: :destroy has_one :procedure_path, dependent: :destroy
@ -29,10 +30,11 @@ class Procedure < ActiveRecord::Base
validates :libelle, presence: true, allow_blank: false, allow_nil: false validates :libelle, presence: true, allow_blank: false, allow_nil: false
validates :description, presence: true, allow_blank: false, allow_nil: false validates :description, presence: true, allow_blank: false, allow_nil: false
after_save :build_default_mails, if: Proc.new { id_changed? } after_create :build_default_mails
def build_default_mails def build_default_mails
MailReceived.create(procedure: self) MailReceived.create(procedure: self) unless mail_received
MailValidated.create(procedure: self) unless mail_validated
end end
def path def path
@ -109,4 +111,5 @@ class Procedure < ActiveRecord::Base
def total_dossier def total_dossier
self.dossiers.where.not(state: :draft).size self.dossiers.where.not(state: :draft).size
end end
end end

View file

@ -4,4 +4,6 @@ class TypeDePieceJustificative < ActiveRecord::Base
belongs_to :procedure belongs_to :procedure
validates :libelle, presence: true, allow_blank: false, allow_nil: false validates :libelle, presence: true, allow_blank: false, allow_nil: false
validates :lien_demarche, format: { with: URI::regexp }, allow_blank: true, allow_nil: true
end end

View file

@ -15,7 +15,8 @@ class User < ActiveRecord::Base
delegate :given_name, :family_name, :email_france_connect, :gender, :birthdate, :birthplace, :france_connect_particulier_id, to: :france_connect_information delegate :given_name, :family_name, :email_france_connect, :gender, :birthdate, :birthplace, :france_connect_particulier_id, to: :france_connect_information
accepts_nested_attributes_for :france_connect_information accepts_nested_attributes_for :france_connect_information
after_update :sync_credentials
include CredentialsSyncableConcern
def self.find_for_france_connect email, siret def self.find_for_france_connect email, siret
user = User.find_by_email(email) user = User.find_by_email(email)
@ -35,12 +36,4 @@ class User < ActiveRecord::Base
invites.pluck(:dossier_id).include?(dossier_id.to_i) invites.pluck(:dossier_id).include?(dossier_id.to_i)
end end
private
def sync_credentials
if email_changed? || encrypted_password_changed?
return SyncCredentialsService.new(User, email_was, email, encrypted_password).change_credentials!
end
true
end
end end

View file

@ -5,4 +5,6 @@ class DossierProcedureSerializer < ActiveModel::Serializer
:archived, :archived,
:mandataire_social, :mandataire_social,
:state :state
attribute :followers_gestionnaires_emails, key: :emails_accompagnateurs
end end

View file

@ -2,5 +2,6 @@ class TypeDePieceJustificativeSerializer < ActiveModel::Serializer
attributes :id, attributes :id,
:libelle, :libelle,
:description, :description,
:order_place :order_place,
end :lien_demarche
end

View file

@ -11,7 +11,7 @@ class SyncCredentialsService
unless @klass == User unless @klass == User
user = User.find_by(email: @email_was) user = User.find_by(email: @email_was)
if user if user
return user.update_columns( return false unless user.update_columns(
email: @email, email: @email,
encrypted_password: @encrypted_password) encrypted_password: @encrypted_password)
end end
@ -20,7 +20,7 @@ class SyncCredentialsService
unless @klass == Gestionnaire unless @klass == Gestionnaire
gestionnaire = Gestionnaire.find_by(email: @email_was) gestionnaire = Gestionnaire.find_by(email: @email_was)
if gestionnaire if gestionnaire
return gestionnaire.update_columns( return false unless gestionnaire.update_columns(
email: @email, email: @email,
encrypted_password: @encrypted_password) encrypted_password: @encrypted_password)
end end
@ -29,10 +29,12 @@ class SyncCredentialsService
unless @klass == Administrateur unless @klass == Administrateur
administrateur = Administrateur.find_by(email: @email_was) administrateur = Administrateur.find_by(email: @email_was)
if administrateur if administrateur
return administrateur.update_columns( return false unless administrateur.update_columns(
email: @email, email: @email,
encrypted_password: @encrypted_password) encrypted_password: @encrypted_password)
end end
end end
true
end end
end end

View file

@ -3,11 +3,7 @@
class BaseUploader < CarrierWave::Uploader::Base class BaseUploader < CarrierWave::Uploader::Base
def cache_dir def cache_dir
if Rails.env.production? if Rails.env.production?
if Features.opensimplif? '/tmp/tps-cache'
'/tmp/opensimplif-cache'
else
'/tmp/tps-cache'
end
else else
'/tmp/tps-dev-cache' '/tmp/tps-dev-cache'
end end

View file

@ -14,7 +14,7 @@
- @accompagnateurs_not_assign.each do |accompagnateur| - @accompagnateurs_not_assign.each do |accompagnateur|
%tr %tr
%td.col-md-11.col-sm-11.col-xs-11.col-lg-11{style:'padding-top: 11px; font-size:15px'}= accompagnateur.email %td.col-xs-11{style:'padding-top: 11px; font-size:15px'}= accompagnateur.email
%td.center %td.center
%a.btn.btn-success.gestionnaire-affectation{href: "#{admin_procedure_accompagnateurs_path(procedure_id: @procedure.id, accompagnateur_id: accompagnateur.id, to: AccompagnateurService::ASSIGN)}", 'data-method' => 'put'} %a.btn.btn-success.gestionnaire-affectation{href: "#{admin_procedure_accompagnateurs_path(procedure_id: @procedure.id, accompagnateur_id: accompagnateur.id, to: AccompagnateurService::ASSIGN)}", 'data-method' => 'put'}
.fa.fa-arrow-right .fa.fa-arrow-right

View file

@ -1,7 +1,7 @@
.row.white-back .row.white-back
#accompagnateur_form #accompagnateur_form
.row .row
.col-md-6.col-sm-6.col-xs-6.col-lg-6 .col-xs-6
%h3.text-info Disponibles %h3.text-info Disponibles
= smart_listing_render :accompagnateurs_not_assign = smart_listing_render :accompagnateurs_not_assign
@ -11,13 +11,13 @@
#procedure_new.section.section-label #procedure_new.section.section-label
= form_for @gestionnaire, url: {controller: 'admin/gestionnaires', action: :create} do |f| = form_for @gestionnaire, url: {controller: 'admin/gestionnaires', action: :create} do |f|
.row .row
.col-md-5.col-sm-5.col-xs-5.col-lg-5 .col-xs-5
= hidden_field_tag :procedure_id, params[:procedure_id] = hidden_field_tag :procedure_id, params[:procedure_id]
=render partial: 'admin/gestionnaires/informations', locals: {f: f} =render partial: 'admin/gestionnaires/informations', locals: {f: f}
.col-md-2.col-sm-2.col-xs-2.col-lg-2 .col-xs-2
%br %br
%br %br
= f.submit 'Valider', class: 'btn btn-info', style: 'float:left', id: 'add-gestionnaire-email' = f.submit 'Valider', class: 'btn btn-info', style: 'float:left', id: 'add-gestionnaire-email'
.col-md-6.col-sm-6.col-xs-6.col-lg-6 .col-xs-6
%h3.text-success Affectés %h3.text-success Affectés
= smart_listing_render :accompagnateurs_assign = smart_listing_render :accompagnateurs_assign

View file

@ -2,18 +2,18 @@
%br %br
.row .row
.col-md-4.col-sm-4.col-xs-4.col-lg-4 .col-xs-4
= smart_listing_render :gestionnaires = smart_listing_render :gestionnaires
.col-md-1.col-lg-1.col-sm-1.col-xs-1.col-sm-1.col-xs-1 .col-xs-1
&nbsp; &nbsp;
.col-md-6.col-sm-6.col-xs-6.col-lg-6 .col-xs-6
%h3 Ajouter un accompagnateur %h3 Ajouter un accompagnateur
#procedure_new.section.section-label #procedure_new.section.section-label
= form_for @gestionnaire, url: {controller: 'admin/gestionnaires', action: :create} do |f| = form_for @gestionnaire, url: {controller: 'admin/gestionnaires', action: :create} do |f|
.row .row
.col-md-5.col-sm-5.col-xs-5.col-lg-5 .col-xs-5
= render partial: 'informations', locals: {f: f} = render partial: 'informations', locals: {f: f}
.col-md-2.col-sm-2.col-xs-2.col-lg-2 .col-xs-2
%br %br
%br %br
= f.submit 'Valider', class: 'btn btn-info', style: 'float:left' = f.submit 'Valider', class: 'btn btn-info', style: 'float:left'

View file

@ -0,0 +1,28 @@
.white-back
%h3
= @mail_template.decorate.name
= simple_form_for @mail_template.becomes(MailTemplate), url: admin_procedure_mail_template_path(@procedure, @mail_template) do |f|
.row
.col-md-6
= f.input :object, label: "Objet de l'email"
= f.input :body, label: "Corps de l'email", input_html: {class: 'wysihtml5'}
.text-right
= link_to "Annuler", admin_procedure_mail_templates_path(@procedure), class: "btn btn-default"
= f.button :submit, 'Mettre à jour', class: "btn-success"
.row
.col-md-8
%table.table
%tr
%th
Balise
%th
Description
- MailTemplate::TAGS.each do |balise|
%tr
%td.center
%b.text-success
= "--#{balise.first}--"
%td
=balise.second[:description]

View file

@ -0,0 +1,15 @@
.row.white-back
%h1 E-mails personnalisables
.row
.col-md-6
%table.table
%tr
%th{ colspan: 2 }
Type d'email
- @procedure.mail_templates.each do |mt|
%tr
%td
= mt.decorate.name
%td.text-right
= link_to "Personnaliser l'e-mail", edit_admin_procedure_mail_template_path(@procedure, mt)

View file

@ -1,28 +0,0 @@
.row.white-back
%h3
E-mail d'accusé de réception
- unless @procedure.mail_received.blank?
= form_for @procedure.mail_received, url: {controller: 'admin/mails', action: 'update', id: @procedure.mail_received.id} do |f|
=f.text_field :object, {class:'form-control', style:'width: 40%'}
%br
=f.text_area :body, {class: 'form-control wysihtml5'}
%br
=f.submit 'Mettre à jour', {class:'btn btn-success', style:'float: right'}
%table.table{style:'width: 50%'}
%tr
%th
Balise
%th
Description
- MailTemplate.tags.each do |balise|
%tr
%td.center
%b.text-success
\--
= balise.first
\--
%td
=balise.second[:description]

View file

@ -6,6 +6,12 @@
.form-group .form-group
%h4 Description %h4 Description
=ff.text_area :description, class: 'form-control description', placeholder: 'Description' =ff.text_area :description, class: 'form-control description', placeholder: 'Description'
.form-group
%h4
Lien du formulaire vierge
%small
(optionel)
=ff.url_field :lien_demarche, class: 'form-control', placeholder: 'Lien du document vierge'
.form-group .form-group
= ff.hidden_field :order_place, value: ff.index = ff.hidden_field :order_place, value: ff.index
@ -23,4 +29,3 @@
= f.submit('Ajouter la pièce', class: 'btn btn-success', id: 'add_piece_justificative') = f.submit('Ajouter la pièce', class: 'btn btn-success', id: 'add_piece_justificative')
- else - else
= link_to("", admin_procedure_piece_justificative_path(@procedure, ff.object.id), method: :delete, remote: true, id: "delete_type_de_piece_justificative_#{ff.object.id}", class: %w(form-control btn btn-danger fa fa-trash-o) ) = link_to("", admin_procedure_piece_justificative_path(@procedure, ff.object.id), method: :delete, remote: true, id: "delete_type_de_piece_justificative_#{ff.object.id}", class: %w(form-control btn btn-danger fa fa-trash-o) )

View file

@ -1,5 +1,7 @@
%br - if @procedure.locked?
.alert.alert-info
Cette procédure est publiée, certains éléments de la description ne sont plus modifiables
-{libelle: 'Libellé*', description: 'Description*', organisation: 'Organisation', direction: 'Direction', lien_site_web: 'Lien site internet', lien_notice: 'Lien notice'}.each do |key, value| -{libelle: 'Libellé*', description: 'Description*', organisation: 'Organisation', direction: 'Direction', lien_site_web: 'Lien site internet', lien_notice: 'Lien notice'}.each do |key, value|
.form-group .form-group
@ -12,64 +14,69 @@
= f.text_field key, class: 'form-control', placeholder: value = f.text_field key, class: 'form-control', placeholder: value
.row .row
.col-md-6.col-sm-6.col-xs-6.col-lg-6 .col-md-6
%h4 Logo de la procédure %h4 Logo de la procédure
- unless @procedure.logo.blank? - unless @procedure.logo.blank?
= image_tag @procedure.decorate.logo_img, {style: 'height: 40px; display: inline; margin-right: 6px', id: 'preview_procedure_logo'} = image_tag @procedure.decorate.logo_img, {style: 'height: 40px; display: inline; margin-right: 6px', id: 'preview_procedure_logo'}
= f.file_field(:logo, accept: 'image/png, image/jpg, image/jpeg', style: 'display:inline') = f.file_field :logo, accept: 'image/png, image/jpg, image/jpeg', style: 'display:inline'
%div{style:'margin-top:5px'} %div{style:'margin-top:5px'}
%i %i
Fichier accepté : JPG / JPEG / PNG Fichier accepté : JPG / JPEG / PNG
.col-md-6.col-sm-6.col-xs-6.col-lg-6 .col-md-6
%h4 Drapeau européen %h4 Drapeau européen
%label .checkbox
=f.check_box :euro_flag
Afficher le drapeau européen
%br
.row
.col-md-6.col-sm-6.col-xs-6.col-lg-6
%h4 Cartographie
= f.fields_for :module_api_carto, @procedure.module_api_carto do |ff|
%label %label
=ff.check_box :use_api_carto, {id: :procedure_module_api_carto_use_api_carto} =f.check_box :euro_flag
Utilisation de la cartographie Afficher le drapeau européen
%ul#modules_api_carto - unless @procedure.locked?
%li .row
.col-md-6
%h4 Cartographie
= f.fields_for :module_api_carto, @procedure.module_api_carto do |ff|
.checkbox
%label %label
= ff.check_box :quartiers_prioritaires =ff.check_box :use_api_carto, id: :procedure_module_api_carto_use_api_carto
Quartiers Prioritaires Utilisation de la cartographie
%li
%ul#modules_api_carto
%li
.checkbox
%label
= ff.check_box :quartiers_prioritaires
Quartiers Prioritaires
%li
.checkbox
%label
= ff.check_box :cadastre
Cadastre
.col-md-6
- if @procedure.cerfa_flag
%h4 Formulaire de demande ou CERFA
.checkbox
%label %label
= ff.check_box :cadastre = f.check_box :cerfa_flag
Cadastre Activer l'envoi de formulaire de demande ou CERFA
%br
= f.text_field :lien_demarche, class: 'form-control', placeholder: 'URL vers le formulaire vierge (facultatif)'
.col-md-6.col-sm-6.col-xs-6.col-lg-6 .row
%h4 Formulaire de demande ou CERFA .col-md-6
%label %h4 Particuliers
=f.check_box :cerfa_flag .checkbox
Activer l'envoi de formulaire de demande ou CERFA %label
%br =f.check_box :for_individual
=f.text_field :lien_demarche, class: 'form-control', placeholder: 'URL vers le formulaire vierge (facultatif)' Cette procédure s'adresse à un public qui
%b
ne possède pas (ou pas encore) de numéro SIRET,
qui doivent donc s'identifier en tant que personne physique.
%br %ul#individual_with_siret
.row
.col-md-6.col-sm-6.col-xs-6.col-lg-6
%h4 Particuliers
%div
%label
=f.check_box :for_individual
Cette procédure s'adresse à un public qui
%b
ne possède pas (ou pas encore) de numéro SIRET,
qui doivent donc s'identifier en tant que personne physique.
%ul#individual_with_siret{style:'margin-top: 8px'}
%li %li
%label .checkbox
=f.check_box :individual_with_siret %label
Donner la possibilité de renseigner un SIRET au cours de la construction du dossier. = f.check_box :individual_with_siret
Donner la possibilité de renseigner un SIRET au cours de la construction du dossier.

View file

@ -12,7 +12,7 @@
- procedure = procedure.decorate - procedure = procedure.decorate
%tr{id: "tr_dossier_#{procedure.id}", 'data-dossier_url' => admin_procedure_path(id: procedure.id)} %tr{id: "tr_dossier_#{procedure.id}", 'data-dossier_url' => admin_procedure_path(id: procedure.id)}
%td= procedure.id %td= procedure.id
%td.col-md-6.col-sm-6.col-xs-6.col-lg-6 %td.col-xs-6
= procedure.libelle = procedure.libelle
- if @active_class - if @active_class
%td= link_to procedure.lien, procedure.lien, class: 'procedure-lien', 'data-method' => :get %td= link_to procedure.lien, procedure.lien, class: 'procedure-lien', 'data-method' => :get

View file

@ -2,6 +2,5 @@
#procedure_new.section.section-label #procedure_new.section.section-label
= form_for @procedure, url: url_for({controller: 'admin/procedures', action: :update, id: @procedure.id}), multipart: true do |f| = form_for @procedure, url: url_for({controller: 'admin/procedures', action: :update, id: @procedure.id}), multipart: true do |f|
= render partial: 'informations', locals: {f: f} = render partial: 'informations', locals: {f: f}
= f.submit 'Editer', class: 'btn btn-success', style: 'float:right' .text-right
%br = f.submit 'Enregistrer', class: 'btn btn-success'
%br

View file

@ -39,17 +39,14 @@
Annuler Annuler
- if @facade.procedure.locked? - if @facade.procedure.locked?
#procedure_locked.center #procedure_locked
%h5 .alert.alert-info
.label.label-info La procédure ne peut plus être modifiée car elle a été publiée Cette procédure a été publiée, certains éléments ne peuvent plus être modifiés.
%div %div
%h3 Lien procédure %h3 Lien procédure
%div{style:'margin-left:3%'} %div{style:'margin-left:3%'}
- if @facade.procedure.archived? - if @facade.procedure.published?
%b
Cette procédure a été archivée et n'est plus accessible par le public.
- elsif @facade.procedure.published?
= link_to @facade.procedure.lien, @facade.procedure.lien, target: '_blank' = link_to @facade.procedure.lien, @facade.procedure.lien, target: '_blank'
- else - else
%b %b
@ -70,18 +67,18 @@
Champs Champs
.badge.progress-bar-info .badge.progress-bar-info
= @facade.procedure.types_de_champ.size = @facade.procedure.types_de_champ.size
- @facade.procedure.types_de_champ.order(:order_place).each do |champ| %ul
= champ.libelle - @facade.procedure.types_de_champ.order(:order_place).each do |champ|
%br %li= champ.libelle
.champs_private.col-xs-6.col-md-3 .champs_private.col-xs-6.col-md-3
%h4.text-info %h4.text-info
Champs privés Champs privés
.badge.progress-bar-info .badge.progress-bar-info
= @facade.procedure.types_de_champ_private.size = @facade.procedure.types_de_champ_private.size
- @facade.procedure.types_de_champ_private.order(:order_place).each do |champ| %ul
= champ.libelle - @facade.procedure.types_de_champ_private.order(:order_place).each do |champ|
%br %li= champ.libelle
.pieces_justificatives.col-xs-6.col-md-3 .pieces_justificatives.col-xs-6.col-md-3
%h4.text-info %h4.text-info
@ -96,7 +93,7 @@
=t('dynamics.admin.procedure.stats.title') =t('dynamics.admin.procedure.stats.title')
.row .row
.col-md-6.col-sm-6.col-xs-6.col-lg-6{style:'margin-left:3%'} .col-xs-6{style:'margin-left:3%'}
%h4 Total %h4 Total
%div %div
= @facade.dossiers_total = @facade.dossiers_total
@ -126,7 +123,7 @@
%p %p
0 0
.col-md-5.col-sm-5.col-xs-5.col-lg-5 .col-xs-5
%h4 Non archivés %h4 Non archivés
= javascript_include_tag "https://code.highcharts.com/highcharts.js", "chartkick" = javascript_include_tag "https://code.highcharts.com/highcharts.js", "chartkick"
- if @facade.dossiers_for_pie_highchart.blank? - if @facade.dossiers_for_pie_highchart.blank?

View file

@ -1,10 +1,10 @@
- unless smart_listing.empty? - unless smart_listing.empty?
%table.table %table.table
%thead %thead
%th.col-md-4.col-sm-4.col-xs-4.col-lg-4= smart_listing.sortable 'Email', :email %th.col-xs-4= smart_listing.sortable 'Email', :email
%th.col-md-4.col-sm-4.col-xs-4.col-lg-4= smart_listing.sortable 'Date de dernière connexion', :last_sign_in_at %th.col-xs-4= smart_listing.sortable 'Date de dernière connexion', :last_sign_in_at
%th.col-md-2.col-sm-2.col-xs-2.col-lg-2 Procédure active %th.col-xs-2 Procédure active
%th.col-md-2.col-sm-2.col-xs-2.col-lg-2 Dossier en cours %th.col-xs-2 Dossier en cours
- @admins.each do |admin| - @admins.each do |admin|
%tr %tr

View file

@ -3,7 +3,7 @@
%br %br
.row .row
.col-md-4.col-sm-4.col-xs-4.col-lg-4 .col-xs-4
- if @facade.followers.size > 0 - if @facade.followers.size > 0
%ul %ul
- @facade.followers.each do |follower| - @facade.followers.each do |follower|

View file

@ -3,9 +3,8 @@
- if smart_listing.name.to_s == 'follow_dossiers' - if smart_listing.name.to_s == 'follow_dossiers'
%th.col-md-1.col-lg-1.col-sm-1.col-xs-1.col-sm-1.col-xs-1.center %th.col-md-1.col-lg-1.col-sm-1.col-xs-1.col-sm-1.col-xs-1.center
%i.fa.fa-bell %i.fa.fa-bell
- unless Features.opensimplif %th.col-md-1.col-lg-1.col-sm-1.col-xs-1.col-sm-1.col-xs-1
%th.col-md-1.col-lg-1.col-sm-1.col-xs-1.col-sm-1.col-xs-1 État
État
- @facade_data_view.preference_list_dossiers_filter.each do |preference| - @facade_data_view.preference_list_dossiers_filter.each do |preference|
- unless preference.libelle == 'Statut' || preference.libelle == 'État' - unless preference.libelle == 'Statut' || preference.libelle == 'État'
@ -33,9 +32,8 @@
- else - else
.badge.progress-bar-warning .badge.progress-bar-warning
= total_notif = total_notif
- unless Features.opensimplif %td.col-md-1.col-lg-1.col-sm-1.col-xs-1.col-sm-1.col-xs-1
%td.col-md-1.col-lg-1.col-sm-1.col-xs-1.col-sm-1.col-xs-1 = dossier.decorate.display_state
= dossier.decorate.display_state
- @facade_data_view.preference_list_dossiers_filter.each_with_index do |preference, index| - @facade_data_view.preference_list_dossiers_filter.each_with_index do |preference, index|
- unless preference.libelle == 'Statut' || preference.libelle == 'État' - unless preference.libelle == 'Statut' || preference.libelle == 'État'
%td %td

View file

@ -27,7 +27,7 @@
- if index%2 == 0 || tables.first.to_s.include?('champs') - if index%2 == 0 || tables.first.to_s.include?('champs')
%tr %tr
%td.col-sm-5.col-md-5.col-sm-5.col-xs-5.col-lg-5{style: 'vertical-align: top', colspan: (tables.first == :champs ? 2 : 1)} %td.col-xs-5{style: 'vertical-align: top', colspan: (tables.first == :champs ? 2 : 1)}
%h5= tables.first.to_s.gsub('_', ' ').capitalize %h5= tables.first.to_s.gsub('_', ' ').capitalize
%ul %ul
- if tables.second - if tables.second

View file

@ -4,7 +4,7 @@
.row .row
.col-md-1.col-lg-1.col-sm-1.col-xs-1.col-sm-1.col-xs-1 .col-md-1.col-lg-1.col-sm-1.col-xs-1.col-sm-1.col-xs-1
.fa.fa-info-circle.text-info{style:'font-size: 2em; margin-top: 20%'} .fa.fa-info-circle.text-info{style:'font-size: 2em; margin-top: 20%'}
.col-md-11.col-sm-11.col-xs-11.col-lg-11 .col-xs-11
-if dossiers_list_facade.liste == 'nouveaux' -if dossiers_list_facade.liste == 'nouveaux'
Tous les dossiers présents dans cette liste sont ceux qui Tous les dossiers présents dans cette liste sont ceux qui
%b %b

View file

@ -14,11 +14,11 @@
%tr %tr
%td %td
= procedure.id = procedure.id
%td.col-md-4.col-sm-4.col-xs-4.col-lg-4 %td.col-xs-4
= link_to procedure.libelle, procedure.lien = link_to procedure.libelle, procedure.lien
%td %td
= procedure.description = procedure.description
%td.col-md-3.col-sm-3.col-xs-3.col-lg-3 %td.col-xs-3
= procedure.organisation = procedure.organisation
= smart_listing.paginate = smart_listing.paginate

View file

@ -4,7 +4,7 @@
.default_data_block .default_data_block
%div.row.show-block.infos %div.row.show-block.infos
%div.header %div.header
%div.col-lg-8.col-md-8.col-sm-8.col-xs-8.title-no-expanse %div.col-xs-8.title-no-expanse
%div.carret-right %div.carret-right
INFORMATIONS DU DEMANDEUR INFORMATIONS DU DEMANDEUR
- if !@current_gestionnaire && ["draft", "updated", "replied", "initiated"].include?(@facade.dossier.state) - if !@current_gestionnaire && ["draft", "updated", "replied", "initiated"].include?(@facade.dossier.state)
@ -16,34 +16,34 @@
.default_data_block .default_data_block
%div.row.show-block.infos#infos_entreprise %div.row.show-block.infos#infos_entreprise
%div.header %div.header
%div.col-lg-12.col-md-12.col-sm-12.col-xs-12.title %div.col-xs-12.title
%div.carret-right %div.carret-right
%div.carret-down %div.carret-down
INFORMATIONS DU DEMANDEUR INFORMATIONS DU DEMANDEUR
%div.body %div.body.display-block-on-print
= render partial: '/dossiers/infos_entreprise' = render partial: '/dossiers/infos_entreprise'
.default_data_block.default_visible .default_data_block.default_visible
%div.row.show-block.infos#infos_dossier %div.row.show-block.infos#infos_dossier
%div.header %div.header
%div.col-lg-10.col-md-10.col-sm-10.col-xs-10.title %div.col-xs-10.title
%div.carret-right %div.carret-right
%div.carret-down %div.carret-down
CONSTRUCTION DU DOSSIER CONSTRUCTION DU DOSSIER
= render partial: '/dossiers/edit_dossier' = render partial: '/dossiers/edit_dossier'
%div.body %div.body.display-block-on-print
= render partial: '/dossiers/infos_dossier' = render partial: '/dossiers/infos_dossier'
- if @facade.dossier.procedure.module_api_carto.use_api_carto - if @facade.dossier.procedure.module_api_carto.use_api_carto
.default_data_block.default_visible .default_data_block.default_visible.no-page-break-inside
%div.row.show-block#carto %div.row.show-block#carto
%div.header %div.header
%div.col-lg-10.col-md-10.col-sm-10.col-xs-10.title %div.col-xs-10.title
%div.carret-right %div.carret-right
%div.carret-down %div.carret-down
CARTOGRAPHIE CARTOGRAPHIE
= render partial: '/dossiers/edit_carto' = render partial: '/dossiers/edit_carto'
%div.body %div.body.display-block-on-print
%input{id: 'json_latlngs', type: 'hidden', value: "#{@facade.dossier.json_latlngs}", name: 'json_latlngs'} %input{id: 'json_latlngs', type: 'hidden', value: "#{@facade.dossier.json_latlngs}", name: 'json_latlngs'}
%input{id: 'quartier_prioritaires', type: 'hidden', value: "#{@facade.dossier.quartier_prioritaires.to_json}"} %input{id: 'quartier_prioritaires', type: 'hidden', value: "#{@facade.dossier.quartier_prioritaires.to_json}"}
%input{id: 'cadastres', type: 'hidden', value: "#{@facade.dossier.cadastres.to_json}"} %input{id: 'cadastres', type: 'hidden', value: "#{@facade.dossier.cadastres.to_json}"}
@ -56,11 +56,11 @@
.default_data_block.default_visible .default_data_block.default_visible
%div.row.show-block#private-fields %div.row.show-block#private-fields
%div.header %div.header
%div.col-lg-10.col-md-10.col-sm-10.col-xs-10.title %div.col-xs-10.title
%div.carret-right %div.carret-right
%div.carret-down %div.carret-down
= "formulaire privé".upcase = "formulaire privé".upcase
%div.col-lg-2.col-md-2.col-sm-2.col-xs-2.count %div.col-xs-2.count
- private_fields_count = @champs_private.count - private_fields_count = @champs_private.count
= (private_fields_count == 1) ? "1 champ" : "#{private_fields_count} champs" = (private_fields_count == 1) ? "1 champ" : "#{private_fields_count} champs"
%div.body %div.body

View file

@ -1,5 +1,5 @@
.row .row
.col-md-12.col-sm-12.col-xs-12.col-lg-12 .col-xs-12
#map.mini{class: @facade.dossier.procedure.module_api_carto.classes} #map.mini{class: @facade.dossier.procedure.module_api_carto.classes}
%input{id: 'json_latlngs', type:'hidden', value: "#{@facade.dossier.json_latlngs}"} %input{id: 'json_latlngs', type:'hidden', value: "#{@facade.dossier.json_latlngs}"}

View file

@ -2,50 +2,40 @@
.col-lg-12.col-md-12.col-sm-12.col-xs-12 .col-lg-12.col-md-12.col-sm-12.col-xs-12
- if @facade.procedure.for_individual? - if @facade.procedure.for_individual?
.row.title-row .row.title-row
%div.col-md-4.col-sm-4.col-xs-4.col-lg-4.split-hr %div.col-xs-4.split-hr
%div.col-md-4.col-sm-4.col-xs-4.col-lg-4.dossier-title= t('utils.depositaire').upcase %div.col-xs-4.dossier-title= t('utils.depositaire').upcase
%div.col-md-4.col-sm-4.col-xs-4.col-lg-4.split-hr %div.col-xs-4.split-hr
.row .row
%div.col-md-6.col-sm-6.col-xs-6.col-lg-6.depositaire-label Civilité %div.col-xs-6.depositaire-label Civilité
%div.col-md-1.col-lg-1.col-sm-1.col-xs-1.comments-off= "-" %div.col-md-1.col-lg-1.col-sm-1.col-xs-1.comments-off= "-"
%div.col-md-5.col-sm-5.col-xs-5.col-lg-5.depositaire-info= @facade.individual.gender %div.col-xs-5.depositaire-info= @facade.individual.gender
.row .row
%div.col-md-6.col-sm-6.col-xs-6.col-lg-6.depositaire-label Nom %div.col-xs-6.depositaire-label Nom
%div.col-md-1.col-lg-1.col-sm-1.col-xs-1.comments-off= "-" %div.col-md-1.col-lg-1.col-sm-1.col-xs-1.comments-off= "-"
%div.col-md-5.col-sm-5.col-xs-5.col-lg-5.depositaire-info= @facade.individual.nom %div.col-xs-5.depositaire-info= @facade.individual.nom
.row .row
%div.col-md-6.col-sm-6.col-xs-6.col-lg-6.depositaire-label Prénom %div.col-xs-6.depositaire-label Prénom
%div.col-md-1.col-lg-1.col-sm-1.col-xs-1.comments-off= "-" %div.col-md-1.col-lg-1.col-sm-1.col-xs-1.comments-off= "-"
%div.col-md-5.col-sm-5.col-xs-5.col-lg-5.despositaire-info= @facade.individual.prenom %div.col-xs-5.despositaire-info= @facade.individual.prenom
- unless Features.opensimplif .row
.row %div.col-xs-6.depositaire-label Date de naissance
%div.col-md-6.col-sm-6.col-xs-6.col-lg-6.depositaire-label Date de naissance %div.col-md-1.col-lg-1.col-sm-1.col-xs-1.comments-off= "-"
%div.col-md-1.col-lg-1.col-sm-1.col-xs-1.comments-off= "-" %div.col-xs-5.depositaire-info= @facade.individual.birthdate
%div.col-md-5.col-sm-5.col-xs-5.col-lg-5.depositaire-info= @facade.individual.birthdate
.row.margin-top-20 .row.margin-top-20
- unless @facade.champs.nil? - unless @facade.champs.nil?
- @facade.champs.each do |champ| - @facade.champs.each do |champ|
- if champ.type_champ == 'header_section' - if champ.type_champ == 'header_section'
.row.title-row.margin-top-40 .row.title-row.margin-top-40
%div.col-md-3.col-sm-3.col-xs-3.col-lg-3.split-hr %div.col-xs-3.split-hr
%div.col-md-6.col-sm-6.col-xs-6.col-lg-6.dossier-title= champ.libelle.upcase %div.col-xs-6.dossier-title= champ.libelle.upcase
%div.col-md-3.col-sm-3.col-xs-3.col-lg-3.split-hr %div.col-xs-3.split-hr
- else - else
.row .row
%div.col-md-6.col-sm-6.col-xs-6.col-lg-6.depositaire-label= champ.libelle %div.col-xs-6.depositaire-label= champ.libelle
-#- if Features.opensimplif
-# %div.col-md-1.col-lg-1.col-sm-1.col-xs-1.comments
-# - if gestionnaire_signed_in?
-# = link_to "", "data-href" => backoffice_dossier_commentaires_path(@facade.dossier, champs_id: champ.id), "data-toggle" => "modal", "data-target" => "#modalCommentairesDossierParChamp" do
-# %i.fa.fa-comment-o
-# - else
-# = link_to "", "data-href" => users_dossier_commentaires_path(@facade.dossier, champs_id: champ.id), "data-toggle" => "modal", "data-target" => "#modalCommentairesDossierParChamp" do
-# %i.fa.fa-commenting-o
-#- else
%div.col-md-1.col-lg-1.col-sm-1.col-xs-1.comments-off %div.col-md-1.col-lg-1.col-sm-1.col-xs-1.comments-off
= "-" = "-"
%div.col-md-5.col-sm-5.col-xs-5.col-lg-5.depositaire-info{ id: "champ-#{champ.id}-value" } %div.col-xs-5.depositaire-info{ id: "champ-#{champ.id}-value" }
- unless champ.decorate.value.blank? - unless champ.decorate.value.blank?
= champ.decorate.value.html_safe = champ.decorate.value.html_safe
@ -60,18 +50,18 @@
- if @facade.procedure.cerfa_flag? || @facade.dossier.types_de_piece_justificative.count > 0 - if @facade.procedure.cerfa_flag? || @facade.dossier.types_de_piece_justificative.count > 0
.col-lg-12.col-md-12.col-sm-12.col-xs-12 .col-lg-12.col-md-12.col-sm-12.col-xs-12
.row.title-row .row.title-row
%div.col-md-4.col-sm-4.col-xs-4.col-lg-4.split-hr %div.col-xs-4.split-hr
%div.col-md-4.col-sm-4.col-xs-4.col-lg-4.dossier-title= t('utils.pieces').upcase %div.col-xs-4.dossier-title= t('utils.pieces').upcase
%div.col-md-4.col-sm-4.col-xs-4.col-lg-4.split-hr %div.col-xs-4.split-hr
.col-lg-12.col-md-12.col-sm-12.col-xs-12#pieces_justificatives.margin-bot-40 .col-lg-12.col-md-12.col-sm-12.col-xs-12#pieces_justificatives.margin-bot-40
.row .row
- if @facade.procedure.cerfa_flag? - if @facade.procedure.cerfa_flag?
.col-md-12.col-sm-12.col-xs-12.col-lg-12#piece_justificative_0 .col-xs-12#piece_justificative_0
.row.piece-row .row.piece-row
.col-md-6.col-sm-6.col-xs-6.col-lg-6.depositaire-label= 'Formulaire' .col-xs-6.depositaire-label= 'Formulaire'
.col-md-1.col-lg-1.col-sm-1.col-xs-1.comments-off= "-" .col-md-1.col-lg-1.col-sm-1.col-xs-1.comments-off= "-"
.col-md-5.col-sm-5.col-xs-5.col-lg-5.despositaire-info .col-xs-5.despositaire-info
- if @facade.dossier.cerfa_available? - if @facade.dossier.cerfa_available?
%a{ href: "#{@facade.dossier.cerfa.last.content_url}", target: '_blank' } Consulter %a{ href: "#{@facade.dossier.cerfa.last.content_url}", target: '_blank' } Consulter
%span{style:'margin-left:12px'} %span{style:'margin-left:12px'}
@ -81,14 +71,14 @@
- else - else
= 'Pièce non fournie' = 'Pièce non fournie'
.row .row
.col-md-12.col-sm-12.col-xs-12.col-lg-12 .col-xs-12
- @facade.types_de_pieces_justificatives.each do |type_de_piece_justificative| - @facade.types_de_pieces_justificatives.each do |type_de_piece_justificative|
.row.piece-row .row.piece-row
.col-md-12.col-sm-12.col-xs-12.col-lg-12{ id: "piece_justificative_#{type_de_piece_justificative.id}" } .col-xs-12{ id: "piece_justificative_#{type_de_piece_justificative.id}" }
.row .row
%div.col-md-6.col-sm-6.col-xs-6.col-lg-6.depositaire-label= type_de_piece_justificative.libelle %div.col-xs-6.depositaire-label= type_de_piece_justificative.libelle
%div.col-md-1.col-lg-1.col-sm-1.col-xs-1.comments-off= "-" %div.col-md-1.col-lg-1.col-sm-1.col-xs-1.comments-off= "-"
%div.col-md-5.col-sm-5.col-xs-5.col-lg-5.despositaire-info %div.col-xs-5.despositaire-info
- if type_de_piece_justificative.api_entreprise - if type_de_piece_justificative.api_entreprise
%span.text-success Nous l'avons récupéré pour vous. %span.text-success Nous l'avons récupéré pour vous.
- elsif !(@pj = @facade.dossier.retrieve_last_piece_justificative_by_type(type_de_piece_justificative.id)).nil? - elsif !(@pj = @facade.dossier.retrieve_last_piece_justificative_by_type(type_de_piece_justificative.id)).nil?

View file

@ -2,51 +2,51 @@
%h4 %h4
= @facade.entreprise.raison_sociale_or_name = @facade.entreprise.raison_sociale_or_name
.row.split-row .row.split-row
%div.col-md-12.col-sm-12.col-xs-12.col-lg-12.split-hr %div.col-xs-12.split-hr
%div.row %div.row
.col-lg-12.col-md-12.col-sm-12.col-xs-12 .col-xs-12
.row .row
%div.col-md-4.col-sm-4.col-xs-4.col-lg-4.entreprise-label Siret : %div.col-xs-4.entreprise-label Siret :
%div.col-md-8.col-sm-8.col-xs-8.col-lg-8.entreprise-info= @facade.etablissement.siret %div.col-xs-8.entreprise-info= @facade.etablissement.siret
- if @facade.etablissement.siret != @facade.entreprise.siret_siege_social - if @facade.etablissement.siret != @facade.entreprise.siret_siege_social
.row .row
%div.col-md-4.col-sm-4.col-xs-4.col-lg-4.entreprise-label SIRET siège social : %div.col-xs-4.entreprise-label SIRET siège social :
%div.col-md-8.col-sm-8.col-xs-8.col-lg-8.entreprise-info= @facade.entreprise.siret_siege_social %div.col-xs-8.entreprise-info= @facade.entreprise.siret_siege_social
.row .row
%div.col-md-4.col-sm-4.col-xs-4.col-lg-4.entreprise-label Forme juridique : %div.col-xs-4.entreprise-label Forme juridique :
%div.col-md-8.col-sm-8.col-xs-8.col-lg-8.entreprise-info= @facade.entreprise.forme_juridique %div.col-xs-8.entreprise-info= @facade.entreprise.forme_juridique
.row .row
%div.col-md-4.col-sm-4.col-xs-4.col-lg-4.entreprise-label Libellé naf : %div.col-xs-4.entreprise-label Libellé naf :
%div.col-md-8.col-sm-8.col-xs-8.col-lg-8.entreprise-info= @facade.etablissement.libelle_naf %div.col-xs-8.entreprise-info= @facade.etablissement.libelle_naf
.row .row
%div.col-md-4.col-sm-4.col-xs-4.col-lg-4.entreprise-label Code naf : %div.col-xs-4.entreprise-label Code naf :
%div.col-md-8.col-sm-8.col-xs-8.col-lg-8.entreprise-info= @facade.etablissement.naf %div.col-xs-8.entreprise-info= @facade.etablissement.naf
.row .row
%div.col-md-4.col-sm-4.col-xs-4.col-lg-4.entreprise-label Date de création : %div.col-xs-4.entreprise-label Date de création :
%div.col-md-8.col-sm-8.col-xs-8.col-lg-8.entreprise-info= Time.at(@facade.entreprise.date_creation).strftime "%d-%m-%Y" %div.col-xs-8.entreprise-info= Time.at(@facade.entreprise.date_creation).strftime "%d-%m-%Y"
.row .row
%div.col-md-4.col-sm-4.col-xs-4.col-lg-4.entreprise-label Effectif organisation : %div.col-xs-4.entreprise-label Effectif organisation :
%div.col-md-8.col-sm-8.col-xs-8.col-lg-8.entreprise-info= @facade.entreprise.effectif %div.col-xs-8.entreprise-info= @facade.entreprise.effectif
.row .row
%div.col-md-4.col-sm-4.col-xs-4.col-lg-4.entreprise-label Code effectif : %div.col-xs-4.entreprise-label Code effectif :
%div.col-md-8.col-sm-8.col-xs-8.col-lg-8.entreprise-info= @facade.entreprise.code_effectif_entreprise %div.col-xs-8.entreprise-info= @facade.entreprise.code_effectif_entreprise
.row .row
%div.col-md-4.col-sm-4.col-xs-4.col-lg-4.entreprise-label Numéro TVA intracommunautaire : %div.col-xs-4.entreprise-label Numéro TVA intracommunautaire :
%div.col-md-8.col-sm-8.col-xs-8.col-lg-8.entreprise-info= @facade.entreprise.numero_tva_intracommunautaire %div.col-xs-8.entreprise-info= @facade.entreprise.numero_tva_intracommunautaire
.row .row
%div.col-md-4.col-sm-4.col-xs-4.col-lg-4.entreprise-label Adresse : %div.col-xs-4.entreprise-label Adresse :
%div.col-md-8.col-sm-8.col-xs-8.col-lg-8.entreprise-info %div.col-xs-8.entreprise-info
- @facade.etablissement.adresse.split("\n").each do |line| - @facade.etablissement.adresse.split("\n").each do |line|
= line = line
.row .row
%div.col-md-4.col-sm-4.col-xs-4.col-lg-4.entreprise-label Capital social : %div.col-xs-4.entreprise-label Capital social :
%div.col-md-8.col-sm-8.col-xs-8.col-lg-8.entreprise-info= @facade.entreprise.pretty_capital_social %div.col-xs-8.entreprise-info= @facade.entreprise.pretty_capital_social
.row .row
%div.col-md-4.col-sm-4.col-xs-4.col-lg-4.entreprise-label Exercices : %div.col-xs-4.entreprise-label Exercices :
%div.col-md-8.col-sm-8.col-xs-8.col-lg-8.entreprise-info %div.col-xs-8.entreprise-info
- @facade.etablissement.exercices.each_with_index do |exercice, index| - @facade.etablissement.exercices.each_with_index do |exercice, index|
%strong %strong
= "#{exercice.dateFinExercice.year} : " = "#{exercice.dateFinExercice.year} : "
@ -54,7 +54,7 @@
%br %br
.row.split-row .row.split-row
%div.col-md-12.col-sm-12.col-xs-12.col-lg-12.split-hr %div.col-xs-12.split-hr
- unless @facade.entreprise.rna_information.nil? - unless @facade.entreprise.rna_information.nil?
= render partial: '/dossiers/infos_rna' = render partial: '/dossiers/infos_rna'

View file

@ -1,11 +1,11 @@
#pieces_justificatives #pieces_justificatives
.row .row
- if @facade.procedure.cerfa_flag? - if @facade.procedure.cerfa_flag?
.col-md-12.col-sm-12.col-xs-12.col-lg-12#piece_justificative_0 .col-xs-12#piece_justificative_0
.row.piece-row .row.piece-row
.col-md-6.col-sm-6.col-xs-6.col-lg-6.piece-label= 'Formulaire' .col-xs-6.piece-label= 'Formulaire'
.col-md-1.col-lg-1.col-sm-1.col-xs-1.comments-off= "-" .col-md-1.col-lg-1.col-sm-1.col-xs-1.comments-off= "-"
.col-md-5.col-sm-5.col-xs-5.col-lg-5 .col-xs-5
- if @facade.dossier.cerfa_available? - if @facade.dossier.cerfa_available?
%a{ href: "#{@facade.dossier.cerfa.last.content_url}", target: '_blank' } Consulter %a{ href: "#{@facade.dossier.cerfa.last.content_url}", target: '_blank' } Consulter
%span{style:'margin-left:12px'} %span{style:'margin-left:12px'}
@ -20,13 +20,13 @@
= 'Pièce non fournie' = 'Pièce non fournie'
.row .row
.col-md-12.col-sm-12.col-xs-12.col-lg-12 .col-xs-12
- @facade.dossier.types_de_piece_justificative.order('order_place ASC').each do |type_de_piece_justificative| - @facade.dossier.types_de_piece_justificative.order('order_place ASC').each do |type_de_piece_justificative|
.row.piece-row .row.piece-row
.col-md-12.col-sm-12.col-xs-12.col-lg-12{ id: "piece_justificative_#{type_de_piece_justificative.id}" } .col-xs-12{ id: "piece_justificative_#{type_de_piece_justificative.id}" }
.row .row
.col-md-6.col-sm-6.col-xs-6.col-lg-6= type_de_piece_justificative.libelle .col-xs-6= type_de_piece_justificative.libelle
.col-md-6.col-sm-6.col-xs-6.col-lg-6 .col-xs-6
- if type_de_piece_justificative.api_entreprise - if type_de_piece_justificative.api_entreprise
%span.text-success Nous l'avons récupéré pour vous. %span.text-success Nous l'avons récupéré pour vous.
- elsif !(@pj = @facade.dossier.retrieve_last_piece_justificative_by_type(type_de_piece_justificative.id)).nil? - elsif !(@pj = @facade.dossier.retrieve_last_piece_justificative_by_type(type_de_piece_justificative.id)).nil?

View file

@ -1,5 +1,5 @@
.row{style: 'margin-top: -20px'} .row{style: 'margin-top: -20px'}
.col-md-12.col-sm-12.col-xs-12.col-lg-12 .col-xs-12
= form_for @facade.dossier, url: {controller: 'backoffice/private_formulaires', action: :update, dossier_id: @facade.dossier.id}, remote: true do = form_for @facade.dossier, url: {controller: 'backoffice/private_formulaires', action: :update, dossier_id: @facade.dossier.id}, remote: true do
= render partial: '/users/description/champs', locals:{private: true} = render partial: '/users/description/champs', locals:{private: true}
.row.center .row.center

View file

@ -2,7 +2,7 @@
%br %br
.row .row
.col-md-4.col-sm-4.col-xs-4.col-lg-4 .col-xs-4
- if @facade.invites.size > 0 - if @facade.invites.size > 0
%ul %ul
- @facade.invites.each do |invite| - @facade.invites.each do |invite|
@ -11,7 +11,7 @@
- else - else
Aucune personne invitée Aucune personne invitée
.col-md-3.col-sm-3.col-xs-3.col-lg-3 .col-xs-3
= form_tag invites_dossier_path(dossier_id: @facade.dossier.id), method: :post, class: 'form-inline' do = form_tag invites_dossier_path(dossier_id: @facade.dossier.id), method: :post, class: 'form-inline' do
= text_field_tag :email, '', class: 'form-control', placeholder: 'Envoyer une invitation' = text_field_tag :email, '', class: 'form-control', placeholder: 'Envoyer une invitation'
= submit_tag 'Ajouter', class: 'btn btn-success', id: 'send-invitation' = submit_tag 'Ajouter', class: 'btn btn-success', id: 'send-invitation'

View file

@ -11,21 +11,19 @@
.alert.alert-info .alert.alert-info
Cette messagerie permet d'échanger entre le demandeur et le service instructeur. Cette messagerie permet d'échanger entre le demandeur et le service instructeur.
.body .body.display-block-on-print
- if dossier_facade.commentaires.any? - if dossier_facade.commentaires.any?
.commentaires .commentaires
= render partial: 'dossiers/commentaires/commentaire', collection: dossier_facade.commentaires.object.sort = render partial: 'dossiers/commentaires/commentaire', collection: dossier_facade.commentaires.object.sort
.split-hr .split-hr
#new-commentaire #new-commentaire.hidden-print
= render partial: 'dossiers/commentaires/form', locals: { dossier_facade: @facade } = render partial: 'dossiers/commentaires/form', locals: { dossier_facade: @facade }
.last-commentaire.clearfix.hidden-print
.last-commentaire.clearfix
- if last_comment = dossier_facade.commentaires.first - if last_comment = dossier_facade.commentaires.first
%div %div
DERNIER MESSAGE DERNIER MESSAGE
= render partial: 'dossiers/commentaires/commentaire', object: last_comment = render partial: 'dossiers/commentaires/commentaire', object: last_comment
#open-message.new-action %button#open-message.new-action.btn.btn-danger
ENVOYER UN MESSAGE ENVOYER UN MESSAGE

View file

@ -7,5 +7,5 @@
%h4.text-primary{style: 'margin-top: 0px'} Ajouter un fichier %h4.text-primary{style: 'margin-top: 0px'} Ajouter un fichier
= file_field_tag "piece_justificative[content]", accept: PieceJustificative.accept_format, style: 'float: left; margin-left: 20px' = file_field_tag "piece_justificative[content]", accept: PieceJustificative.accept_format, style: 'float: left; margin-left: 20px'
.col-md-6 .col-md-6.text-right
%input#save-message.form-control.btn.btn-send{ type: 'submit', value: 'ENVOYER' } %input#save-message.form-control.btn.btn-danger{ type: 'submit', value: 'ENVOYER' }

View file

@ -1,4 +1,4 @@
.col-md-3.col-sm-3.col-xs-3.col-lg-3.center .col-xs-3.center
%h3 Ma procédure %h3 Ma procédure
#logos.center{class: (@facade.entreprise.nil? ? '' : 'mask')} #logos.center{class: (@facade.entreprise.nil? ? '' : 'mask')}
@ -9,9 +9,9 @@
#logo_procedure.flag #logo_procedure.flag
=image_tag( @facade.procedure.decorate.logo_img ) =image_tag( @facade.procedure.decorate.logo_img )
.etape.etapes_informations.col-md-9.col-sm-9.col-xs-9.col-lg-9 .etape.etapes_informations.col-xs-9
.row .row
.col-md-12.col-sm-12.col-xs-12.col-lg-12.padding-left-30 .col-xs-12.padding-left-30
%h2#titre_procedure.text-info %h2#titre_procedure.text-info
= @facade.procedure.libelle = @facade.procedure.libelle

View file

@ -1,6 +1,6 @@
.etape.etapes_menu.col-md-3.col-sm-3.col-xs-3.col-lg-3 .etape.etapes_menu.col-xs-3
%h3 %h3
Ma zone d'intervention Ma zone d'intervention
.etape.etapes_informations.col-md-9.col-sm-9.col-xs-9.col-lg-9 .etape.etapes_informations.col-xs-9
.row .row

View file

@ -1,6 +1,6 @@
.etape.etapes_menu.col-md-3.col-sm-3.col-xs-3.col-lg-3 .etape.etapes_menu.col-xs-3
%h3 %h3
Mon dossier Mon dossier
.etape.etapes_informations.col-md-9.col-sm-9.col-xs-9.col-lg-9 .etape.etapes_informations.col-xs-9
.row .row

View file

@ -1,4 +1,4 @@
.etape.etapes_menu.col-md-3.col-sm-3.col-xs-3.col-lg-3 .etape.etapes_menu.col-xs-3
%h3 %h3
Mes informations Mes informations
%br %br
@ -12,7 +12,7 @@
= f.submit 'Changer de SIRET', class: %w(btn btn-xs btn-primary) = f.submit 'Changer de SIRET', class: %w(btn btn-xs btn-primary)
.etape.etapes_informations.col-md-9.col-sm-9.col-xs-9.col-lg-9 .etape.etapes_informations.col-xs-9
.row .row
- if @facade.entreprise.nil? - if @facade.entreprise.nil?
#new_siret{style:'margin-left: 20%; margin-top: 5%'} #new_siret{style:'margin-left: 20%; margin-top: 5%'}

View file

@ -1,14 +1,14 @@
.col-md-3.col-sm-3.col-xs-3.col-lg-3.center .col-xs-3.center
%h3 Mes informations %h3 Mes informations
%p %p
Les informations de bases Les informations de bases
%br %br
vous concernant. vous concernant.
.etape.etapes_informations.col-md-9.col-sm-9.col-xs-9.col-lg-9 .etape.etapes_informations.col-xs-9
= form_for @facade.dossier, url: { controller: '/users/dossiers', action: :update } do |f| = form_for @facade.dossier, url: { controller: '/users/dossiers', action: :update } do |f|
.row .row
.col-md-12.col-sm-12.col-xs-12.col-lg-12.padding-left-30 .col-xs-12.padding-left-30
= f.hidden_field :id = f.hidden_field :id
= f.fields_for :individual, @facade.individual do |ff| = f.fields_for :individual, @facade.individual do |ff|
@ -40,7 +40,7 @@
Vos informations personnelles ne seront jamais utilisées dans un but lucratif ou commercial. Elles ne pourront être communiquées à de tiers personnes sans votre accord préalable. Elles pourront en revanche être communiquées aux administrations compétentes afin d'instruire votre dossier, conformément à la déclaration CNIL effectué par le service TPS. Vos informations personnelles ne seront jamais utilisées dans un but lucratif ou commercial. Elles ne pourront être communiquées à de tiers personnes sans votre accord préalable. Elles pourront en revanche être communiquées aux administrations compétentes afin d'instruire votre dossier, conformément à la déclaration CNIL effectué par le service TPS.
=link_to 'en savoir plus', cgu_path, target: '_blank' =link_to 'en savoir plus', cgu_path, target: '_blank'
.row .row
.col-md-5.col-sm-5.col-xs-5.col-lg-5.col-xs-5 .col-xs-5.col-xs-5
.col-md-2.col-sm-2.col-xs-2.col-lg-2.col-xs-2 .col-xs-2.col-xs-2
= f.submit 'Etape suivante', class: "action", id: 'etape_suivante' = f.submit 'Etape suivante', class: "action", id: 'etape_suivante'
.col-md-5.col-sm-5.col-xs-5.col-lg-5.col-xs-5 .col-xs-5.col-xs-5

View file

@ -1,6 +1,6 @@
- unless BrowserService.recommended_browser? - unless BrowserService.recommended_browser?
#support_navigator_banner.row #support_navigator_banner.row
.col-md-12.col-sm-12.col-xs-12.col-lg-12 .col-xs-12
= BROWSER.value.name = BROWSER.value.name
= BROWSER.value.version = BROWSER.value.version
\- \-

View file

@ -1,4 +1,4 @@
- if SwitchDeviseProfileService.new(warden).multiple_devise_profile_connect? && !Features.opensimplif - if SwitchDeviseProfileService.new(warden).multiple_devise_profile_connect?
#switch_menu.dropdown.dropup #switch_menu.dropdown.dropup
%button.btn.btn-default.dropdown-toggle{ type: :button, 'data-toggle' => 'dropdown', 'aria-haspopup' => true, 'aria-expanded' => false} %button.btn.btn-default.dropdown-toggle{ type: :button, 'data-toggle' => 'dropdown', 'aria-haspopup' => true, 'aria-expanded' => false}
%i.fa.fa-toggle-on %i.fa.fa-toggle-on

View file

@ -6,6 +6,7 @@
%meta{'http-equiv' => "X-UA-Compatible", :content => "IE=edge"} %meta{'http-equiv' => "X-UA-Compatible", :content => "IE=edge"}
= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
= stylesheet_link_tag 'print', media: 'print', 'data-turbolinks-track' => true
= javascript_include_tag 'application', 'data-turbolinks-track' => true = javascript_include_tag 'application', 'data-turbolinks-track' => true
= csrf_meta_tags = csrf_meta_tags
@ -32,7 +33,7 @@
= render partial: "layouts/navbar" = render partial: "layouts/navbar"
%div.row.no-margin %div.row.no-margin
- if RenderPartialService.left_panel_exist? @left_pannel_url - if RenderPartialService.left_panel_exist? @left_pannel_url
%div.col-lg-2.col-md-2.col-sm-2.col-xs-2#left-pannel %div.col-xs-2#left-panel
- if gestionnaire_signed_in? - if gestionnaire_signed_in?
#search-block #search-block
= render partial: 'layouts/left_panels/search_area' = render partial: 'layouts/left_panels/search_area'

View file

@ -0,0 +1 @@
= render partial: 'layouts/left_panels/left_panel_admin_procedurescontroller_navbar', locals: {active: 'E-mails'}

View file

@ -19,10 +19,9 @@
%div.procedure_list_element{class: ('active' if active == 'Accompagnateurs')} %div.procedure_list_element{class: ('active' if active == 'Accompagnateurs')}
=t('dynamics.admin.procedure.onglets.accompagnateurs') =t('dynamics.admin.procedure.onglets.accompagnateurs')
- unless @procedure.locked? %a{:href => "#{url_for edit_admin_procedure_path(@procedure)}", id: 'onglet-description'}
%a{:href => "#{url_for edit_admin_procedure_path(@procedure)}", id: 'onglet-description'} %div.procedure_list_element{class: ('active' if active == 'Description')}
%div.procedure_list_element{class: ('active' if active == 'Description')} Description
Description
- unless @procedure.locked? - unless @procedure.locked?
%a{:href => "#{url_for admin_procedure_types_de_champ_path(@procedure)}", id: 'onglet-champs'} %a{:href => "#{url_for admin_procedure_types_de_champ_path(@procedure)}", id: 'onglet-champs'}
@ -39,7 +38,7 @@
%div.procedure_list_element{class: ('active' if active == 'Champs privés')} %div.procedure_list_element{class: ('active' if active == 'Champs privés')}
Champs privés Champs privés
%a{:href => "#{url_for admin_procedure_mails_path(@procedure)}", id: 'onglet-inemailsfos'} %a{:href => "#{url_for admin_procedure_mail_templates_path(@procedure)}", id: 'onglet-inemailsfos'}
%div.procedure_list_element{class: ('active' if active == 'E-mails')} %div.procedure_list_element{class: ('active' if active == 'E-mails')}
E-mails E-mails

View file

@ -2,10 +2,9 @@
%div.dossiers-en-cours %div.dossiers-en-cours
.count= @facade_data_view.total_dossier_follow .count= @facade_data_view.total_dossier_follow
.text= "SUIVIS" .text= "SUIVIS"
- unless Features.opensimplif %div.nouveaux-dossiers
%div.nouveaux-dossiers .count= @facade_data_view.total_new_dossier
.count= @facade_data_view.total_new_dossier .text= "NOUVEAUX"
.text= "NOUVEAUX"
%div.nouvelles-notifications %div.nouvelles-notifications
.count= @facade_data_view.dossiers_with_unread_notifications.count .count= @facade_data_view.dossiers_with_unread_notifications.count
.text= "MODIFIÉS" .text= "MODIFIÉS"
@ -23,13 +22,11 @@
#procedure_list #procedure_list
- @facade_data_view.gestionnaire_procedures_name_and_id_list.each do |procedure| - @facade_data_view.gestionnaire_procedures_name_and_id_list.each do |procedure|
- url_path = Features.opensimplif ? simplification_path(procedure[:id]) : backoffice_dossiers_procedure_path(procedure[:id]) = link_to backoffice_dossiers_procedure_path(procedure[:id]), {title: procedure[:libelle]} do
= link_to url_path, {title: procedure[:libelle]} do
%div.procedure_list_element{ class: ('active' if procedure[:id] == @facade_data_view.procedure.id rescue '') } %div.procedure_list_element{ class: ('active' if procedure[:id] == @facade_data_view.procedure.id rescue '') }
= truncate(procedure[:libelle], length: 50) = truncate(procedure[:libelle], length: 50)
- total_new = @facade_data_view.new_dossier_number procedure[:id] - total_new = @facade_data_view.new_dossier_number procedure[:id]
- if total_new > 0 && !Features.opensimplif - if total_new > 0
.badge.progress-bar-success{title:'Nouveaux dossiers'} .badge.progress-bar-success{title:'Nouveaux dossiers'}
= total_new = total_new
-if procedure[:unread_notifications] > 0 -if procedure[:unread_notifications] > 0

View file

@ -2,38 +2,41 @@
%div.infos %div.infos
#dossier_id= t('dynamics.dossiers.numéro') + @facade.dossier.id.to_s #dossier_id= t('dynamics.dossiers.numéro') + @facade.dossier.id.to_s
- unless Features.opensimplif %div#action-block
%div#action-block - if gestionnaire_signed_in?
- if gestionnaire_signed_in? - if !@facade.dossier.read_only?
- if !@facade.dossier.read_only? = form_tag(url_for({controller: 'backoffice/dossiers', action: :valid, dossier_id: @facade.dossier.id}), class: 'form-inline', method: 'POST') do
= form_tag(url_for({controller: 'backoffice/dossiers', action: :valid, dossier_id: @facade.dossier.id}), class: 'form-inline', method: 'POST') do %button.action{'data-toggle' => :tooltip, title: 'En cliquant ici, vous figez le dossier et autorisez le dépôt du dossier pour instruction.'}
%button.action{'data-toggle' => :tooltip, title: 'En cliquant ici, vous figez le dossier et autorisez le dépôt du dossier pour instruction.'} = 'Déclarer complet'.upcase
= 'Déclarer complet'.upcase - elsif @facade.dossier.submitted?
- elsif @facade.dossier.submitted? = form_tag(url_for({controller: 'backoffice/dossiers', action: :receive, dossier_id: @facade.dossier.id}), class: 'form-inline', method: 'POST') do
= form_tag(url_for({controller: 'backoffice/dossiers', action: :receive, dossier_id: @facade.dossier.id}), class: 'form-inline', method: 'POST') do %button.action
%button.action = 'Accuser réception'.upcase
= 'Accuser réception'.upcase - elsif @facade.dossier.received?
- elsif @facade.dossier.received? = form_tag(url_for({controller: 'backoffice/dossiers', action: :close, dossier_id: @facade.dossier.id}), class: 'form-inline action_button', method: 'POST', style: 'display:inline', 'data-toggle' => :tooltip, title: 'Accepter') do
= form_tag(url_for({controller: 'backoffice/dossiers', action: :close, dossier_id: @facade.dossier.id}), class: 'form-inline action_button', method: 'POST', style: 'display:inline', 'data-toggle' => :tooltip, title: 'Accepter') do %button.action.close-dossier
%button.action.close-dossier %i.fa.fa-check
%i.fa.fa-check = form_tag(url_for({controller: 'backoffice/dossiers', action: :without_continuation, dossier_id: @facade.dossier.id}), class: 'form-inline action_button', method: 'POST', style: 'display:inline', 'data-toggle' => :tooltip, title: 'Classer sans suite') do
= form_tag(url_for({controller: 'backoffice/dossiers', action: :without_continuation, dossier_id: @facade.dossier.id}), class: 'form-inline action_button', method: 'POST', style: 'display:inline', 'data-toggle' => :tooltip, title: 'Classer sans suite') do %button.action.forget-dossier
%button.action.forget-dossier %i.fa.fa-circle-o
%i.fa.fa-circle-o = form_tag(url_for({controller: 'backoffice/dossiers', action: :refuse, dossier_id: @facade.dossier.id}), class: 'form-inline action_button', method: 'POST', style: 'display:inline', 'data-toggle' => :tooltip, title: 'Refuser') do
= form_tag(url_for({controller: 'backoffice/dossiers', action: :refuse, dossier_id: @facade.dossier.id}), class: 'form-inline action_button', method: 'POST', style: 'display:inline', 'data-toggle' => :tooltip, title: 'Refuser') do %button.action.refuse-dossier
%button.action.refuse-dossier %i.fa.fa-times
%i.fa.fa-times
- unless @facade.dossier.archived?
= link_to 'Archiver', backoffice_dossier_archive_path(@facade.dossier), method: :post, class: 'btn btn-default btn-block'
%div#menu-block %div#menu-block
%div#infos-block %div#infos-block
- unless Features.opensimplif %div.split-hr-left
%div.split-hr-left %div.dossier-state= @facade.dossier.display_state
%div.dossier-state= @facade.dossier.display_state
%div.split-hr-left %div.split-hr-left
%div.notifications %div.notifications
- if @facade.dossier.notifications.empty? - if @facade.dossier.notifications.empty?
= "Aucune notification pour le moment." Aucune notification pour le moment.
- else - else
%i.fa.fa-bell-o %i.fa.fa-bell-o
- @facade.last_notifications.each do |notification| - @facade.last_notifications.each do |notification|

View file

@ -1,3 +1,3 @@
%hmtl %html
%body %body
= yield = yield

View file

@ -1 +1 @@
<%= MailTemplate.replace_tags(@dossier.procedure.mail_received.body, @dossier).html_safe %> <%= @dossier.procedure.mail_received.body_for_dossier(@dossier).html_safe %>

View file

@ -0,0 +1 @@
<%= @dossier.procedure.mail_validated.body_for_dossier(@dossier).html_safe %>

View file

@ -1,14 +0,0 @@
Bonjour <%= @user.email %>
Votre dossier N°<%=@dossier.id%> est prêt à être déposé pour instruction.
Afin de finaliser son dépôt, merci de vous rendre sur <%=users_dossier_recapitulatif_url(dossier_id: @dossier.id)%>
Bonne journée,
---
Merci de ne pas répondre à ce mail. Postez directement vos questions dans votre dossier sur la plateforme.
---
---
L'équide TPS - tps@apientreprise.fr

View file

@ -1,14 +0,0 @@
$.ajax({
method: 'get',
url: '/simplifications/reload_smartlisting?id=<%= @procedure_id %>',
async: true
});
$.ajax({
methd: 'get',
url: '/backoffice/preference_list_dossier/reload_pref_list?procedure_id=<%= @procedure_id %>',
async: true
}).done(function (data) {
$("#pref_list_menu").html(data);
pref_list_dossier_actions();
});

View file

@ -1,43 +0,0 @@
#backoffice_index
#pref_list_menu
= render partial: 'backoffice/dossiers/pref_list'
.default_data_block.default_visible
%div.row.show-block#new_dossiers
%div.header
%div.col-lg-10.col-md-10.col-sm-10.col-xs-10.title
%div.carret-right
%div.carret-down
Mes simplifications
%div.col-lg-2.col-md-2.col-sm-2.col-xs-2.count
=current_user.dossiers.count
SIMPLIFICATIONS
%div.body
= smart_listing_render :mes_dossiers
.default_data_block.default_visible
%div.row.show-block#new_dossiers
%div.header
%div.col-lg-10.col-md-10.col-sm-10.col-xs-10.title
%div.carret-right
%div.carret-down
Les simplifications que je suivis
%div.col-lg-2.col-md-2.col-sm-2.col-xs-2.count
=@facade_data_view.suivi_total
simplifications
%div.body
= smart_listing_render :follow_dossiers
.default_data_block
%div.row.show-block#new_dossiers
%div.header
%div.col-lg-10.col-md-10.col-sm-10.col-xs-10.title
%div.carret-right
%div.carret-down
Les autres
%div.col-lg-2.col-md-2.col-sm-2.col-xs-2.count
=@facade_data_view.all_state_total
simplifications
%div.body
= smart_listing_render :all_state_dossiers

View file

@ -1,6 +0,0 @@
<%= smart_listing_update :mes_dossiers, {force: true} %>
<%= smart_listing_update :follow_dossiers, {force: true} %>
<%= smart_listing_update :all_state_dossiers, {force: true} %>
filters_init();
link_init();

View file

@ -1,6 +0,0 @@
.center
%h3.text-danger
Vous n'avez aucun droit de lecture sur cette plateforme.
%h4
Merci de prendre contact avec votre reponsable simplification afin de remedier à ce problème.

View file

@ -44,18 +44,19 @@
.col-md-4.col-lg-4 .col-md-4.col-lg-4
%h3.text-primary Acteurs publics %h3.text-primary Acteurs publics
%h4 Créez des démarches en ligne simplifiées et sécurisées. %h4 Créez des démarches en ligne simplifiées et sécurisées.
=link_to 'Démonstration', 'https://tps-dev.apientreprise.fr/administrateurs/sign_in/demo', {class: 'btn btn-lg btn-primary'} =link_to 'Démonstration', "#{@demo_environment_host}/administrateurs/sign_in/demo", {class: 'btn btn-lg btn-primary'}
.col-md-4.col-lg-4 .col-md-4.col-lg-4
%h3.text-warning Agents et services %h3.text-warning Agents et services
%h4 Accompagnez et co-traitez les projets avec les usagers. %h4 Accompagnez et co-traitez les projets avec les usagers.
=link_to 'Démonstration', 'https://tps-dev.apientreprise.fr/gestionnaires/sign_in/demo', {class: 'btn btn-lg btn-warning'} =link_to 'Démonstration', "#{@demo_environment_host}/gestionnaires/sign_in/demo", {class: 'btn btn-lg btn-warning'}
.col-md-4.col-lg-4 .col-md-4.col-lg-4
%h3.text-success Usagers %h3.text-success Usagers
%h4 Profitez de démarches simplifiées et déchanges continus avec les services traitants. %h4 Profitez de démarches simplifiées et déchanges continus avec les services traitants.
=link_to 'Démonstration', 'https://tps-dev.apientreprise.fr/users/sign_in/demo', {class: 'btn btn-lg btn-success'} =link_to 'Démonstration', "#{@demo_environment_host}/users/sign_in/demo", {class: 'btn btn-lg btn-success'}
%h1
= @demo_environment_host
.split-hr-left .split-hr-left
.center .center

View file

@ -1,15 +1,17 @@
-unless dossier.procedure.lien_demarche.blank?
%p
Récupérer le formulaire de demande ou CERFA vierge pour mon dossier :
= link_to "Télécharger", dossier.procedure.lien_demarche, target: '_blank', id: 'lien_cerfa'
%table.table %table.table
- if dossier.procedure.cerfa_flag - if dossier.procedure.cerfa_flag
%tr %tr
%th.col-lg-6 %th
Formulaire de demande ou CERFA (complété et numérisé) Formulaire de demande ou CERFA (complété et numérisé)
%td
-unless dossier.procedure.lien_demarche.blank?
%em
Récupérer le formulaire de demande ou CERFA vierge pour mon dossier :
= link_to "Télécharger", "#{dossier.procedure.lien_demarche}", target: :blank, id: :lien_cerfa
-# %a{ id: 'lien_cerfa', href: "#{dossier.procedure.lien_demarche}", target: '_blank'} Télécharger
%td.col-lg-5 %td
-if dossier.cerfa_available? -if dossier.cerfa_available?
%span.btn.btn-sm.btn-file.btn-success %span.btn.btn-sm.btn-file.btn-success
Modifier Modifier
@ -19,9 +21,16 @@
- dossier.types_de_piece_justificative.order('order_place ASC').each do |type_de_piece_justificative| - dossier.types_de_piece_justificative.order('order_place ASC').each do |type_de_piece_justificative|
%tr %tr
%th.col-lg-6.piece-libelle %th.piece-libelle
= type_de_piece_justificative.libelle = type_de_piece_justificative.libelle
%td.col-lg-5
%td
- unless type_de_piece_justificative.lien_demarche.blank?
%em
Récupérer le formulaire vierge pour mon dossier :
= link_to "Télécharger", type_de_piece_justificative.lien_demarche, target: :blank
%td
-if type_de_piece_justificative.api_entreprise -if type_de_piece_justificative.api_entreprise
%span.text-success{ id: "piece_justificative_#{type_de_piece_justificative.id}" } Nous l'avons récupéré pour vous. %span.text-success{ id: "piece_justificative_#{type_de_piece_justificative.id}" } Nous l'avons récupéré pour vous.
-else -else

View file

@ -6,7 +6,7 @@
.row .row
.col-md-1.col-lg-1.col-sm-1.col-xs-1 .col-md-1.col-lg-1.col-sm-1.col-xs-1
.fa.fa-info-circle.text-info{style:'font-size: 2em; margin-top: 20%'} .fa.fa-info-circle.text-info{style:'font-size: 2em; margin-top: 20%'}
.col-md-10.col-sm-10.col-xs-10.col-lg-10{style:'padding-right: 0px'} .col-xs-10{style:'padding-right: 0px'}
%b %b
=link_to 'Accéder au guide', @dossier.procedure.lien_notice, {target: '_blank'} =link_to 'Accéder au guide', @dossier.procedure.lien_notice, {target: '_blank'}
pour remplir pour votre dossier pour remplir pour votre dossier
@ -15,7 +15,7 @@
= @dossier.procedure.libelle = @dossier.procedure.libelle
-#TODO use form_for -#TODO use form_for
= form_tag(url_for({controller: 'users/description', action: :create, dossier_id: @dossier.id}), class: 'form-inline', method: 'POST', multipart: true) do = form_tag(url_for({controller: 'users/description', action: :create, dossier_id: @dossier.id}), class: 'form', method: 'POST', multipart: true) do
-unless @champs.nil? -unless @champs.nil?
#liste_champs #liste_champs
=render partial: 'users/description/champs', locals:{private: false} =render partial: 'users/description/champs', locals:{private: false}
@ -24,21 +24,21 @@
%br %br
%h3 Documents administratifs %h3 Documents administratifs
//TODO a refactorer //TODO a refactorer
.row .row
.col-lg-8 .col-lg-8
= render partial: 'users/description/pieces_justificatives', locals: { dossier: @dossier } = render partial: 'users/description/pieces_justificatives', locals: { dossier: @dossier }
- unless Features.opensimplif #state_description.row{style:'width: 50%; margin-left:20px'}
#state_description.row{style:'width: 50%; margin-left:20px'} .panel.panel-info
.panel.panel-info .panel-body.center
.panel-body.center .row
.row .col-md-1.col-lg-1.col-sm-1.col-xs-1
.col-md-1.col-lg-1.col-sm-1.col-xs-1 .fa.fa-info-circle.text-info{style:'font-size: 2em; margin-top: 20%'}
.fa.fa-info-circle.text-info{style:'font-size: 2em; margin-top: 20%'} .col-xs-11
.col-md-11.col-sm-11.col-xs-11.col-lg-11 Les documents administratifs ne sont pas indispensables afin d'initier votre dossier.
Les documents administratifs ne sont pas indispensables afin d'initier votre dossier. Vous pourrez dans tous les cas les compléter plus tard si vous ne les possédez pas de suite.
Vous pourrez dans tous les cas les compléter plus tard si vous ne les possédez pas de suite.
-route = Rails.application.routes.recognize_path(request.referrer) -route = Rails.application.routes.recognize_path(request.referrer)

View file

@ -1,6 +1,2 @@
%h4{style:'margin-left:15px;'} %input{type: 'hidden', name:"champs['#{champ.id}']", id: "champs_#{champ.id}", value: ''}
= champ.libelle %input{type: 'checkbox', style:'margin-left: 15px;', name:"champs['#{champ.id}']", id: "champs_#{champ.id}", checked: ('checked' if champ.value == 'on')}
- if champ.mandatory?
= '*'
%input{type: 'hidden', name:"champs['#{champ.id}']", id: "champs_#{champ.id}", value: ''}
%input{type: 'checkbox', style:'margin-left: 15px;', name:"champs['#{champ.id}']", id: "champs_#{champ.id}", checked: ('checked' if champ.value == 'on')}

View file

@ -1,7 +1,8 @@
%label.radio-inline %div
= radio_button_tag "champs['#{champ.id}']", "M.", champ.value == 'Mme' ? false : true %label.radio-inline
Monsieur = radio_button_tag "champs['#{champ.id}']", "M.", champ.value == 'Mme' ? false : true
Monsieur
%label.radio-inline %label.radio-inline
= radio_button_tag "champs['#{champ.id}']", "Mme", champ.value == 'Mme' = radio_button_tag "champs['#{champ.id}']", "Mme", champ.value == 'Mme'
Madame Madame

View file

@ -1,8 +1,2 @@
%h4{style:'margin-left:15px;'} %input{type: 'hidden', name:"champs['#{champ.id}']", id: "champs_#{champ.id}", value: ''}
= champ.libelle %input{type: 'checkbox', style:'margin-left: 15px;', name:"champs['#{champ.id}']", id: "champs_#{champ.id}", checked: ('checked' if champ.value == 'on')}
- if champ.mandatory?
= '*'
%input{type: 'hidden', name:"champs['#{champ.id}']", id: "champs_#{champ.id}", value: ''}
%input{type: 'checkbox', style:'margin-left: 15px;', name:"champs['#{champ.id}']", id: "champs_#{champ.id}", checked: ('checked' if champ.value == 'on')}
%div{style:'margin-left: 5%; margin-right: 5%; text-align: justify; text-justify: inter-word;'}
= champ.description.gsub(/\r\n/, '<br>').html_safe

View file

@ -1,54 +1,55 @@
-champs.each do |champ| - champs.decorate.each do |champ|
- if champ.order_place > order_place - if champ.order_place > order_place
- if champ.type_champ == 'header_section' - if champ.type_champ == 'header_section'
- break - break
- unless champ.type_champ == 'checkbox' || champ.type_champ == 'engagement'
%h4
= champ.libelle
- if champ.mandatory?
= '*'
-if champ.type_champ == 'textarea'
=render partial: 'users/description/champs/textarea', locals: {champ: champ}
-elsif champ.type_champ == 'checkbox'
= render partial: 'users/description/champs/checkbox', locals: {champ: champ}
-elsif champ.type_champ == 'civilite'
=render partial: 'users/description/champs/civilite', locals: {champ: champ}
- elsif champ.type_champ == 'datetime'
=render partial: 'users/description/champs/datetime', locals: {champ: champ}
- elsif champ.type_champ == 'yes_no'
=render partial: 'users/description/champs/yes_no', locals: {champ: champ}
- elsif champ.type_champ == 'drop_down_list'
=render partial: 'users/description/champs/drop_down_list', locals: {champ: champ}
- elsif champ.type_champ == 'pays'
=render partial: 'users/description/champs/pays', locals: {champ: champ}
- elsif champ.type_champ == 'regions'
=render partial: 'users/description/champs/regions', locals: {champ: champ}
- elsif champ.type_champ == 'engagement'
=render partial: 'users/description/champs/engagement', locals: {champ: champ}
- elsif champ.type_champ == 'departements'
=render partial: 'users/description/champs/departements', locals: {champ: champ}
-else
%input.form-control{name:"champs['#{champ.id}']",
placeholder: champ.libelle,
id: "champs_#{champ.id}",
value: champ.value,
type: champ.type_champ,
'data-provide' => champ.data_provide,
'data-date-format' => champ.data_date_format}
- unless champ.description.empty? || champ.type_champ == 'engagement'
.row .row
.col-lg-8.col-md-8.col-sm-8.col-xs-8{class: 'description_div', id:"description_champs_#{champ.id}"} %div{ class: if champ.type_champ == 'textarea' || champ.type_champ == 'engagement' then 'col-md-12' else 'col-md-6' end }
= champ.description .form-group
%label{ for: "champs_#{ champ.id }"}
= champ.libelle
- if champ.mandatory?
*
- if champ.type_champ == 'textarea'
= render partial: 'users/description/champs/textarea', locals: { champ: champ }
- elsif champ.type_champ == 'checkbox'
= render partial: 'users/description/champs/checkbox', locals: { champ: champ }
- elsif champ.type_champ == 'civilite'
= render partial: 'users/description/champs/civilite', locals: { champ: champ }
- elsif champ.type_champ == 'datetime'
= render partial: 'users/description/champs/datetime', locals: { champ: champ }
- elsif champ.type_champ == 'yes_no'
= render partial: 'users/description/champs/yes_no', locals: { champ: champ }
- elsif champ.type_champ == 'drop_down_list'
= render partial: 'users/description/champs/drop_down_list', locals: { champ: champ }
- elsif champ.type_champ == 'pays'
= render partial: 'users/description/champs/pays', locals: { champ: champ }
- elsif champ.type_champ == 'regions'
= render partial: 'users/description/champs/regions', locals: { champ: champ }
- elsif champ.type_champ == 'engagement'
= render partial: 'users/description/champs/engagement', locals: { champ: champ }
- elsif champ.type_champ == 'departements'
= render partial: 'users/description/champs/departements', locals: { champ: champ }
- else
%input.form-control{name:"champs['#{ champ.id }']",
placeholder: champ.libelle,
id: "champs_#{ champ.id }",
value: champ.value,
type: champ.type_champ,
'data-provide' => champ.data_provide,
'data-date-format' => champ.data_date_format}
- unless champ.description.empty?
%div{ id:"description_champs_#{ champ.id }", class: ('help-block' unless champ.type_champ == 'engagement') }
= champ.description_with_links

View file

@ -2,4 +2,4 @@
placeholder: champ.description, placeholder: champ.description,
id: "champs_#{champ.id}", id: "champs_#{champ.id}",
row: '6'} row: '6'}
=champ.value = champ.value

View file

@ -1,7 +1,8 @@
%label.radio-inline %div
= radio_button_tag "champs['#{champ.id}']", "true", champ.value == 'true' %label.radio-inline
Oui = radio_button_tag "champs['#{champ.id}']", "true", champ.value == 'true'
Oui
%label.radio-inline %label.radio-inline
= radio_button_tag "champs['#{champ.id}']", "false", champ.value == 'false' = radio_button_tag "champs['#{champ.id}']", "false", champ.value == 'false'
Non Non

View file

@ -2,11 +2,11 @@
%table#dossiers_list.table %table#dossiers_list.table
%thead %thead
%th#sort-id.col-md-1.col-lg-1.col-sm-1.col-xs-1= smart_listing.sortable 'Numéro', 'id' %th#sort-id.col-md-1.col-lg-1.col-sm-1.col-xs-1= smart_listing.sortable 'Numéro', 'id'
%th#sort-libelle.col-md-5.col-sm-5.col-xs-5.col-lg-5= smart_listing.sortable 'Procédure', 'procedure.libelle' %th#sort-libelle.col-xs-5= smart_listing.sortable 'Procédure', 'procedure.libelle'
%th#sort-state.col-md-2.col-sm-2.col-xs-2.col-lg-2= smart_listing.sortable 'État', 'state' %th#sort-state.col-xs-2= smart_listing.sortable 'État', 'state'
%th#sort-updated.col-md-2.col-sm-2.col-xs-2.col-lg-2= smart_listing.sortable 'Date de mise à jour', 'updated_at' %th#sort-updated.col-xs-2= smart_listing.sortable 'Date de mise à jour', 'updated_at'
- if @liste == "brouillon" - if @liste == "brouillon"
%th.col-md-2.col-sm-2.col-xs-2.col-lg-2= 'Action' %th.col-xs-2= 'Action'
- @dossiers.each do |dossier| - @dossiers.each do |dossier|
- if dossier.kind_of? Invite - if dossier.kind_of? Invite
- invite = dossier - invite = dossier

View file

@ -4,7 +4,7 @@
.row .row
.col-md-1.col-lg-1.col-sm-1.col-xs-1 .col-md-1.col-lg-1.col-sm-1.col-xs-1
.fa.fa-info-circle.text-info{style:'font-size: 2em; margin-top: 20%'} .fa.fa-info-circle.text-info{style:'font-size: 2em; margin-top: 20%'}
.col-md-11.col-sm-11.col-xs-11.col-lg-11 .col-xs-11
-if dossiers_list_facade.liste == 'brouillon' -if dossiers_list_facade.liste == 'brouillon'
Les dossiers présents dans cette liste Les dossiers présents dans cette liste
%b %b

Some files were not shown because too many files have changed in this diff Show more