Merge branch 'develop' into staging
This commit is contained in:
commit
b9dd1f7ada
11 changed files with 71 additions and 13 deletions
|
@ -1,5 +1,10 @@
|
|||
$(document).on('page:load', buttons_api_carto);
|
||||
$(document).ready(buttons_api_carto);
|
||||
$(document).on('page:load', button_edit_procedure_init);
|
||||
$(document).ready(button_edit_procedure_init);
|
||||
|
||||
function button_edit_procedure_init(){
|
||||
buttons_api_carto();
|
||||
button_cerfa();
|
||||
}
|
||||
|
||||
function buttons_api_carto () {
|
||||
|
||||
|
@ -9,4 +14,14 @@ function buttons_api_carto () {
|
|||
|
||||
if ($('#procedure_module_api_carto_use_api_carto').is(':checked'))
|
||||
$("#modules_api_carto").show();
|
||||
}
|
||||
|
||||
function button_cerfa () {
|
||||
|
||||
$("#procedure_cerfa_flag").on('change', function() {
|
||||
$("#procedure_lien_demarche").toggle()
|
||||
});
|
||||
|
||||
if ($('#procedure_cerfa_flag').is(':checked'))
|
||||
$("#procedure_lien_demarche").show();
|
||||
}
|
|
@ -1,3 +1,7 @@
|
|||
#modules_api_carto {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#procedure_lien_demarche{
|
||||
display: none;
|
||||
}
|
|
@ -187,7 +187,7 @@ class Admin::ProceduresController < AdminController
|
|||
private
|
||||
|
||||
def create_procedure_params
|
||||
params.require(:procedure).permit(:libelle, :description, :organisation, :direction, :lien_demarche, :euro_flag, :logo, :cerfa_flag, module_api_carto_attributes: [:id, :use_api_carto, :quartiers_prioritaires, :cadastre]).merge(administrateur_id: current_administrateur.id)
|
||||
params.require(:procedure).permit(:libelle, :description, :organisation, :direction, :lien_demarche, :lien_site_web, :lien_notice, :euro_flag, :logo, :cerfa_flag, module_api_carto_attributes: [:id, :use_api_carto, :quartiers_prioritaires, :cadastre]).merge(administrateur_id: current_administrateur.id)
|
||||
end
|
||||
|
||||
def create_module_api_carto_params
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
%br
|
||||
|
||||
-{libelle: 'Libellé*', description: 'Description*', lien_demarche: 'Lien démarche', organisation: 'Organisation', direction: 'Direction'}.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{class: ('has-error' if @procedure.errors.messages[key])}
|
||||
%h4
|
||||
=value
|
||||
|
@ -47,8 +47,11 @@
|
|||
%label
|
||||
= ff.check_box :cadastre
|
||||
Cadastre
|
||||
|
||||
.col-md-6.col-lg-6
|
||||
%h4 Formulaire / CERFA
|
||||
%label
|
||||
=f.check_box :cerfa_flag
|
||||
Activer l'envoi de formulaire / CERFA
|
||||
%br
|
||||
=f.text_field :lien_demarche, class: 'form-control', placeholder: 'URL vers le formulaire vierge (facultatif)'
|
||||
|
|
|
@ -7,9 +7,6 @@
|
|||
='Formulaire'
|
||||
%td.col-lg-6.col-md-6
|
||||
- if @facade.dossier.cerfa_available?
|
||||
-#- if user_signed_in?
|
||||
-# = 'Pièce fournie'
|
||||
-#- elsif gestionnaire_signed_in?
|
||||
%a{ href: "#{@facade.dossier.cerfa.last.content_url}", target: '_blank' } Consulter
|
||||
%span{style:'margin-left:12px'}
|
||||
\-
|
||||
|
|
|
@ -17,4 +17,8 @@
|
|||
= @facade.procedure.libelle
|
||||
|
||||
%p#description_procedure{style:'width: 95%;', class: (@facade.entreprise.nil? ? '' : 'mask')}
|
||||
= h @facade.procedure.description.html_safe
|
||||
= h @facade.procedure.description.html_safe
|
||||
|
||||
- unless @facade.procedure.lien_site_web.blank?
|
||||
.center
|
||||
=link_to truncate(@facade.procedure.lien_site_web, length: 40), @facade.procedure.lien_site_web, {target: '_blank'}
|
|
@ -2,7 +2,7 @@
|
|||
- if @dossier.procedure.cerfa_flag
|
||||
%tr
|
||||
%th{class:'col-lg-6'}
|
||||
='Formulaire'
|
||||
='Formulaire / CERFA'
|
||||
|
||||
%td{class:'col-lg-5'}
|
||||
-if @dossier.cerfa_available?
|
||||
|
@ -27,3 +27,13 @@
|
|||
Modifier
|
||||
= file_field_tag "piece_justificative_#{type_de_piece_justificative.id}", accept: PieceJustificative.accept_format, :max_file_size => 3.megabytes
|
||||
|
||||
|
||||
#state_description.row{style:'width: 50%; margin-left:20px'}
|
||||
.panel.panel-info
|
||||
.panel-body.center
|
||||
.row
|
||||
.col-md-1.col-lg-1
|
||||
.fa.fa-info-circle.text-info{style:'font-size: 2em; margin-top: 20%'}
|
||||
.col-md-11.col-lg-11
|
||||
Les documents administratifs ne sont pas indispensable 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.
|
|
@ -1,6 +1,19 @@
|
|||
.container#description_page
|
||||
%h2
|
||||
- unless @dossier.procedure.lien_notice.blank?
|
||||
#lien_notice_panel.row{style:'width: 280px; position: fixed; background-color: white; right: 5%; top: 80px;'}
|
||||
.panel.panel-info{style:'margin-bottom:0'}
|
||||
.panel-body.center
|
||||
.row
|
||||
.col-md-1.col-lg-1
|
||||
.fa.fa-info-circle.text-info{style:'font-size: 2em; margin-top: 20%'}
|
||||
.col-md-10.col-lg-10{style:'padding-right: 0px'}
|
||||
%b
|
||||
=link_to 'Accéder au guide', @dossier.procedure.lien_notice, {target: '_blank'}
|
||||
pour remplir pour votre dossier
|
||||
|
||||
%h2.text-info
|
||||
= @dossier.procedure.libelle
|
||||
|
||||
%h3 Votre dossier
|
||||
|
||||
-#TODO use form_for
|
||||
|
@ -16,8 +29,8 @@
|
|||
|
||||
-unless @procedure.lien_demarche.blank?
|
||||
%p
|
||||
Formulaire / documentation de la démarche :
|
||||
%a{style:'font-size:0.9em; padding-left:3px', id: 'lien_cerfa' ,href: "#{@procedure.lien_demarche}", :target => '_blank'} Accéder
|
||||
Récupérer le formulaire / CERFA vierge pour mon dossier :
|
||||
%a{style:'font-size:0.9em; padding-left:3px', id: 'lien_cerfa' ,href: "#{@procedure.lien_demarche}", :target => '_blank'} Télécharger
|
||||
|
||||
|
||||
%br
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
class AddLienSiteWebInProcedureTable < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :procedures, :lien_site_web, :string
|
||||
end
|
||||
end
|
|
@ -0,0 +1,5 @@
|
|||
class AddLienNoticeInProcedureTable < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :procedures, :lien_notice, :string
|
||||
end
|
||||
end
|
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20160822142045) do
|
||||
ActiveRecord::Schema.define(version: 20160824094451) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
|
@ -276,6 +276,8 @@ ActiveRecord::Schema.define(version: 20160822142045) do
|
|||
t.boolean "cerfa_flag", default: false
|
||||
t.string "logo_secure_token"
|
||||
t.boolean "published", default: false, null: false
|
||||
t.string "lien_site_web"
|
||||
t.string "lien_notice"
|
||||
end
|
||||
|
||||
create_table "quartier_prioritaires", force: :cascade do |t|
|
||||
|
|
Loading…
Reference in a new issue