Add lien_site_web attr and lien_notice attr
This commit is contained in:
parent
42943aad19
commit
c700701b36
7 changed files with 34 additions and 5 deletions
|
@ -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*', 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
|
||||
|
|
|
@ -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'}
|
|
@ -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
|
||||
|
|
|
@ -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