diff --git a/app/assets/javascripts/old_design/admin_procedures_modal.js b/app/assets/javascripts/old_design/admin_procedures_modal.js index 1d4c569e3..5a013cb53 100644 --- a/app/assets/javascripts/old_design/admin_procedures_modal.js +++ b/app/assets/javascripts/old_design/admin_procedures_modal.js @@ -64,10 +64,7 @@ function validatePath(path) { } function path_type_init() { - $(PROCEDURE_PATH_SELECTOR).bind('autocomplete:select', function( - ev, - suggestion - ) { - togglePathMessage(true, suggestion['mine']); + $(PROCEDURE_PATH_SELECTOR).on('autocomplete:select', function(event) { + togglePathMessage(true, event.detail['mine']); }); } diff --git a/app/controllers/admin/procedures_controller.rb b/app/controllers/admin/procedures_controller.rb index 6a37e24f4..5002e4cc2 100644 --- a/app/controllers/admin/procedures_controller.rb +++ b/app/controllers/admin/procedures_controller.rb @@ -40,8 +40,7 @@ class Admin::ProceduresController < AdminController def edit @path = @procedure.path || @procedure.default_path - @available = @procedure.path_available?(@path) - @mine = @procedure.path_is_mine?(@path) + @availability = @procedure.path_availability(@path) end def destroy @@ -60,8 +59,7 @@ class Admin::ProceduresController < AdminController def new @procedure ||= Procedure.new @procedure.module_api_carto ||= ModuleAPICarto.new - @available = true - @mine = true + @availability = Procedure::PATH_AVAILABLE end def create @@ -71,59 +69,51 @@ class Admin::ProceduresController < AdminController @procedure.module_api_carto = ModuleAPICarto.new(create_module_api_carto_params) end - @path = params.require(:procedure).permit(:path)[:path] - @available = !ProcedurePath.exists?(path: @path) - @mine = ProcedurePath.mine?(current_administrateur, @path) + @path = @procedure.path + @availability = Procedure.path_availability(current_administrateur, @procedure.path) - if !@procedure.validate + if !@procedure.save flash.now.alert = @procedure.errors.full_messages - return render 'new' - elsif Flipflop.publish_draft? && !ProcedurePath.valid?(Procedure.last, @path) - # FIXME: The code abow is a horrible hack that we need until we migrated path directly on procedure model - flash.now.alert = 'Lien de la démarche invalide.' - return render 'new' + render 'new' else - @procedure.save! - if Flipflop.publish_draft? - @procedure.publish_with_path!(@path) - end flash.notice = 'Démarche enregistrée.' + redirect_to admin_procedure_types_de_champ_path(procedure_id: @procedure.id) end - - redirect_to admin_procedure_types_de_champ_path(procedure_id: @procedure.id) end def update @procedure = current_administrateur.procedures.find(params[:id]) - path = params.require(:procedure).permit(:path)[:path] if !@procedure.update(procedure_params) - flash.alert = @procedure.errors.full_messages - elsif Flipflop.publish_draft? && @procedure.brouillon? - if ProcedurePath.valid?(@procedure, path) - @procedure.publish_with_path!(path) - reset_procedure - flash.notice = 'Démarche modifiée. Tous les dossiers de cette démarche ont été supprimés.' - else - flash.alert = 'Lien de la démarche invalide.' + flash.now.alert = @procedure.errors.full_messages + @path = procedure_params[:path] + if @path.present? + @availability = @procedure.path_availability(@path) end - else + render 'edit' + elsif Flipflop.publish_draft? && @procedure.brouillon? reset_procedure + flash.notice = 'Démarche modifiée. Tous les dossiers de cette démarche ont été supprimés.' + redirect_to edit_admin_procedure_path(id: @procedure.id) + else flash.notice = 'Démarche modifiée.' + redirect_to edit_admin_procedure_path(id: @procedure.id) end - - redirect_to edit_admin_procedure_path(id: @procedure.id) end def publish + path = params[:path] procedure = current_administrateur.procedures.find(params[:procedure_id]) - if !ProcedurePath.valid?(procedure, params[:procedure_path]) + procedure.path = path + if !procedure.validate flash.alert = 'Lien de la démarche invalide' return redirect_to admin_procedures_path + else + procedure.path = nil end - if procedure.publish_or_reopen!(params[:procedure_path]) + if procedure.publish_or_reopen!(path) flash.notice = "Démarche publiée" redirect_to admin_procedures_path else @@ -216,9 +206,10 @@ class Admin::ProceduresController < AdminController end def path_list - json_path_list = ProcedurePath + json_path_list = Procedure .find_with_path(params[:request]) - .pluck('procedure_paths.path', :administrateur_id) + .order(:id) + .pluck(:path, :administrateur_id) .map do |path, administrateur_id| { label: path, @@ -235,11 +226,9 @@ class Admin::ProceduresController < AdminController if procedure_id.present? procedure = current_administrateur.procedures.find(procedure_id) - @available = procedure.path_available?(path) - @mine = procedure.path_is_mine?(path) + @availability = procedure.path_availability(path) else - @available = !ProcedurePath.exists?(path: path) - @mine = ProcedurePath.mine?(current_administrateur, path) + @availability = Procedure.path_availability(current_administrateur, path) end end @@ -276,6 +265,9 @@ class Admin::ProceduresController < AdminController if @procedure&.locked? params.require(:procedure).permit(*editable_params) else + if Flipflop.publish_draft? + editable_params << :path + end params.require(:procedure).permit(*editable_params, :duree_conservation_dossiers_dans_ds, :duree_conservation_dossiers_hors_ds, :for_individual, :individual_with_siret, :ask_birthday, module_api_carto_attributes: [:id, :use_api_carto, :quartiers_prioritaires, :cadastre]).merge(administrateur_id: current_administrateur.id) end end diff --git a/app/controllers/manager/users_controller.rb b/app/controllers/manager/users_controller.rb index 882993909..d655c552b 100644 --- a/app/controllers/manager/users_controller.rb +++ b/app/controllers/manager/users_controller.rb @@ -6,12 +6,5 @@ module Manager flash[:notice] = "L'email d'activation de votre compte a été renvoyé." redirect_to manager_user_path(user) end - - def confirm - user = User.find(params[:id]) - user.confirm - flash[:notice] = "L’adresse email de l’utilisateur a été marquée comme activée." - redirect_to manager_user_path(user) - end end end diff --git a/app/controllers/new_administrateur/services_controller.rb b/app/controllers/new_administrateur/services_controller.rb index 24f61ce48..66d0c11da 100644 --- a/app/controllers/new_administrateur/services_controller.rb +++ b/app/controllers/new_administrateur/services_controller.rb @@ -7,18 +7,19 @@ module NewAdministrateur def new @procedure = procedure + @service = Service.new end def create - new_service = Service.new(service_params) - new_service.administrateur = current_administrateur + @service = Service.new(service_params) + @service.administrateur = current_administrateur - if new_service.save + if @service.save redirect_to services_path(procedure_id: params[:procedure_id]), - notice: "#{new_service.nom} créé" + notice: "#{@service.nom} créé" else @procedure = procedure - flash[:alert] = new_service.errors.full_messages + flash[:alert] = @service.errors.full_messages render :new end end diff --git a/app/controllers/users/dossiers_controller.rb b/app/controllers/users/dossiers_controller.rb index 0a292509b..914c41146 100644 --- a/app/controllers/users/dossiers_controller.rb +++ b/app/controllers/users/dossiers_controller.rb @@ -12,10 +12,9 @@ class Users::DossiersController < UsersController end def commencer_test - procedure_path = ProcedurePath.find_by(path: params[:procedure_path]) - procedure = procedure_path&.procedure + procedure = Procedure.brouillons.find_by(path: params[:path]) - if procedure&.brouillon? && procedure&.path.present? + if procedure.present? redirect_to new_users_dossier_path(procedure_id: procedure.id, brouillon: true) else flash.alert = "La démarche est inconnue." @@ -24,17 +23,10 @@ class Users::DossiersController < UsersController end def commencer - procedure_path = ProcedurePath.find_by(path: params[:procedure_path]) - procedure = procedure_path&.procedure + procedure = Procedure.publiees.find_by(path: params[:path]) if procedure.present? - if procedure.archivee? - @dossier = Dossier.new(procedure: procedure) - - render 'commencer/archived' - else - redirect_to new_users_dossier_path(procedure_id: procedure.id) - end + redirect_to new_users_dossier_path(procedure_id: procedure.id) else flash.alert = "La démarche est inconnue, ou la création de nouveaux dossiers pour cette démarche est terminée." redirect_to root_path diff --git a/app/helpers/procedure_helper.rb b/app/helpers/procedure_helper.rb index 2f28feed9..4305b05e5 100644 --- a/app/helpers/procedure_helper.rb +++ b/app/helpers/procedure_helper.rb @@ -2,9 +2,9 @@ module ProcedureHelper def procedure_lien(procedure) if procedure.path.present? if procedure.brouillon_avec_lien? - commencer_test_url(procedure_path: procedure.path) + commencer_test_url(path: procedure.path) else - commencer_url(procedure_path: procedure.path) + commencer_url(path: procedure.path) end end end diff --git a/app/lib/api_geo/rpg_adapter.rb b/app/lib/api_geo/rpg_adapter.rb index d63c18941..095825d6c 100644 --- a/app/lib/api_geo/rpg_adapter.rb +++ b/app/lib/api_geo/rpg_adapter.rb @@ -18,7 +18,10 @@ class ApiGeo::RPGAdapter :code_culture, :surface, :bio - ).merge({ geometry: feature[:geometry] }) + ).merge({ + geometry: feature[:geometry], + geo_reference_id: feature[:properties][:id] + }) end end end diff --git a/app/models/procedure.rb b/app/models/procedure.rb index c65f49366..ae429b517 100644 --- a/app/models/procedure.rb +++ b/app/models/procedure.rb @@ -9,7 +9,6 @@ class Procedure < ApplicationRecord has_one :module_api_carto, dependent: :destroy has_one :attestation_template, dependent: :destroy - has_one :procedure_path, dependent: :destroy belongs_to :administrateur belongs_to :parent_procedure, class_name: 'Procedure' @@ -46,12 +45,12 @@ class Procedure < ApplicationRecord scope :by_libelle, -> { order(libelle: :asc) } scope :created_during, -> (range) { where(created_at: range) } scope :cloned_from_library, -> { where(cloned_from_library: true) } - scope :avec_lien, -> { joins(:procedure_path) } + scope :avec_lien, -> { where.not(path: nil) } validates :libelle, presence: true, allow_blank: false, allow_nil: false validates :description, presence: true, allow_blank: false, allow_nil: false validate :check_juridique - validates :path, format: { with: /\A[a-z0-9_\-]{3,50}\z/ }, uniqueness: true, presence: true, allow_blank: false, allow_nil: true + validates :path, format: { with: /\A[a-z0-9_\-]{3,50}\z/ }, uniqueness: { scope: :aasm_state, case_sensitive: false }, presence: true, allow_blank: false, allow_nil: true # FIXME: remove duree_conservation_required flag once all procedures are converted to the new style validates :duree_conservation_dossiers_dans_ds, allow_nil: false, numericality: { only_integer: true, greater_than_or_equal_to: 1, less_than_or_equal_to: MAX_DUREE_CONSERVATION }, if: :durees_conservation_required validates :duree_conservation_dossiers_hors_ds, allow_nil: false, numericality: { only_integer: true, greater_than_or_equal_to: 0 }, if: :durees_conservation_required @@ -101,19 +100,6 @@ class Procedure < ApplicationRecord end end - def publish_with_path!(path) - procedure_path = ProcedurePath - .where(administrateur: administrateur) - .find_by(path: path) - - if procedure_path.present? - procedure_path.publish!(self) - else - create_procedure_path!(administrateur: administrateur, path: path) - end - update!(path: path) - end - def reset! if locked? raise "Can not reset a locked procedure." @@ -126,14 +112,6 @@ class Procedure < ApplicationRecord publiee_ou_archivee? end - def path_available?(path) - !ProcedurePath.where.not(procedure: self).exists?(path: path) - end - - def path_is_mine?(path) - ProcedurePath.where.not(procedure: self).mine?(administrateur, path) - end - # This method is needed for transition. Eventually this will be the same as brouillon?. def brouillon_avec_lien? Flipflop.publish_draft? && brouillon? && path.present? @@ -157,10 +135,6 @@ class Procedure < ApplicationRecord Dossier.new(procedure: self, champs: champs, champs_private: champs_private) end - def path - read_attribute(:path) || procedure_path&.path - end - def default_path libelle&.parameterize&.first(50) end @@ -332,21 +306,66 @@ class Procedure < ApplicationRecord mean_time(:en_instruction_at, :processed_at) end + PATH_AVAILABLE = :available + PATH_AVAILABLE_PUBLIEE = :available_publiee + PATH_NOT_AVAILABLE = :not_available + PATH_NOT_AVAILABLE_BROUILLON = :not_available_brouillon + PATH_CAN_PUBLISH = [PATH_AVAILABLE, PATH_AVAILABLE_PUBLIEE] + + def path_availability(path) + Procedure.path_availability(administrateur, path, id) + end + + def self.path_availability(administrateur, path, exclude_id = nil) + if exclude_id.present? + procedure = where.not(id: exclude_id).find_by(path: path) + else + procedure = find_by(path: path) + end + + if procedure.blank? + PATH_AVAILABLE + elsif administrateur.owns?(procedure) + if procedure.brouillon? + PATH_NOT_AVAILABLE_BROUILLON + else + PATH_AVAILABLE_PUBLIEE + end + else + PATH_NOT_AVAILABLE + end + end + + def self.find_with_path(path) + where.not(aasm_state: :archivee).where("path LIKE ?", "%#{path}%") + end + private - def can_publish?(path) - procedure_path = ProcedurePath.find_by(path: path) - if procedure_path.present? - administrateur.owns?(procedure_path) - else - true + def claim_path_ownership!(path) + procedure = Procedure.where(administrateur: administrateur).find_by(path: path) + + if procedure&.publiee? && procedure != self + procedure.archive! end + + update!(path: path) + end + + def can_publish?(path) + path_availability(path).in?(PATH_CAN_PUBLISH) end def after_publish(path) update!(published_at: Time.zone.now) - publish_with_path!(path) + claim_path_ownership!(path) + end + + def after_reopen(path) + update!(published_at: Time.zone.now, archived_at: nil) + + claim_path_ownership!(path) end def after_archive @@ -356,16 +375,9 @@ class Procedure < ApplicationRecord def after_hide now = Time.zone.now update!(hidden_at: now, path: nil) - procedure_path&.hide! dossiers.update_all(hidden_at: now) end - def after_reopen(path) - update!(published_at: Time.zone.now, archived_at: nil) - - publish_with_path!(path) - end - def after_draft update!(published_at: nil) end diff --git a/app/models/procedure_path.rb b/app/models/procedure_path.rb deleted file mode 100644 index 8606a9ff4..000000000 --- a/app/models/procedure_path.rb +++ /dev/null @@ -1,36 +0,0 @@ -class ProcedurePath < ApplicationRecord - validates :path, format: { with: /\A[a-z0-9_\-]{3,50}\z/ }, uniqueness: true, presence: true, allow_blank: false, allow_nil: false - validates :administrateur_id, presence: true, allow_blank: false, allow_nil: false - validates :procedure_id, presence: true, allow_blank: false, allow_nil: false - - belongs_to :procedure - belongs_to :administrateur - - def self.valid?(procedure, path) - create_with(procedure: procedure, administrateur: procedure.administrateur) - .find_or_initialize_by(path: path).validate - end - - def self.mine?(administrateur, path) - procedure_path = find_by(path: path) - procedure_path && administrateur.owns?(procedure_path) - end - - def self.find_with_path(path) - joins(:procedure) - .where.not(procedures: { aasm_state: :archivee }) - .where("procedure_paths.path LIKE ?", "%#{path}%") - .order(:id) - end - - def hide! - destroy! - end - - def publish!(new_procedure) - if procedure&.publiee? && procedure != new_procedure - procedure.archive! - end - update!(procedure: new_procedure) - end -end diff --git a/app/models/procedure_presentation.rb b/app/models/procedure_presentation.rb index 3695600af..1798ece76 100644 --- a/app/models/procedure_presentation.rb +++ b/app/models/procedure_presentation.rb @@ -111,7 +111,7 @@ class ProcedurePresentation < ApplicationRecord column = sanitized_column(filter) case table when 'self' - date = Time.zone.parse(filter['value']) rescue nil + date = Time.zone.parse(filter['value']).beginning_of_day rescue nil if date.present? dossiers.where("#{column} BETWEEN ? AND ?", date, date + 1.day) else diff --git a/app/serializers/commentaire_serializer.rb b/app/serializers/commentaire_serializer.rb index c7366b65b..19360bfdf 100644 --- a/app/serializers/commentaire_serializer.rb +++ b/app/serializers/commentaire_serializer.rb @@ -1,5 +1,10 @@ class CommentaireSerializer < ActiveModel::Serializer attributes :email, :body, - :created_at + :created_at, + :attachment + + def attachment + object.file_url + end end diff --git a/app/serializers/geo_area_serializer.rb b/app/serializers/geo_area_serializer.rb index 2b1f10766..c0e8477f5 100644 --- a/app/serializers/geo_area_serializer.rb +++ b/app/serializers/geo_area_serializer.rb @@ -1,5 +1,5 @@ class GeoAreaSerializer < ActiveModel::Serializer - attributes :geometry, :source + attributes :geometry, :source, :geo_reference_id attribute :surface_intersection, if: :include_cadastre? attribute :surface_parcelle, if: :include_cadastre? diff --git a/app/serializers/procedure_serializer.rb b/app/serializers/procedure_serializer.rb index 6982cfd84..bd5605a6c 100644 --- a/app/serializers/procedure_serializer.rb +++ b/app/serializers/procedure_serializer.rb @@ -21,9 +21,9 @@ class ProcedureSerializer < ActiveModel::Serializer def link if object.path.present? if object.brouillon_avec_lien? - commencer_test_url(procedure_path: object.path) + commencer_test_url(path: object.path) else - commencer_url(procedure_path: object.path) + commencer_url(path: object.path) end end end diff --git a/app/validators/procedure_path_format_validator.rb b/app/validators/procedure_path_format_validator.rb deleted file mode 100644 index 7c5e1f5b9..000000000 --- a/app/validators/procedure_path_format_validator.rb +++ /dev/null @@ -1,15 +0,0 @@ -class ProcedurePathFormatValidator < ActiveModel::Validator - def path_regex - /^[a-z0-9_]{3,30}$/ - end - - def validate(record) - if record.path.blank? - return false - end - - if !path_regex.match(record.path) - record.errors[:path] << "Path invalide" - end - end -end diff --git a/app/views/admin/procedures/_informations.html.haml b/app/views/admin/procedures/_informations.html.haml index 6650fa034..61fe6c136 100644 --- a/app/views/admin/procedures/_informations.html.haml +++ b/app/views/admin/procedures/_informations.html.haml @@ -16,11 +16,11 @@ %h4 Lien public* .procedure-lien %span.prefix - = commencer_test_url(procedure_path: '') + = commencer_test_url(path: '') = f.text_field :path, value: @path, class: 'form-control', data: { remote: true, debounce: true, url: admin_procedures_available_path, params: { id: @procedure.id }.to_query(:procedure) } %p.unavailable-path-message.text-warning - - if !@available - = render partial: 'unavailable', locals: { mine: @mine } + - if @availability != Procedure::PATH_AVAILABLE + = render partial: 'unavailable', locals: { availability: @availability } %p.help-block %i.fa.fa-info-circle Afin de faciliter l’accès à la démarche, vous êtes invité à personnaliser l’adresse d'accès public. C'est ce lien qu'il va falloir communiquer aux usagers souhaitant faire la démarche. diff --git a/app/views/admin/procedures/_modal_publish.html.haml b/app/views/admin/procedures/_modal_publish.html.haml index 2109792ae..686da7c15 100644 --- a/app/views/admin/procedures/_modal_publish.html.haml +++ b/app/views/admin/procedures/_modal_publish.html.haml @@ -20,8 +20,8 @@ %br %h4 Lien de la démarche %p.center - = commencer_url(procedure_path: '') - = text_field_tag('procedure_path', @procedure.path || @procedure.default_path, + = commencer_url(path: '') + = text_field_tag(:path, @procedure.path || @procedure.default_path, id: 'procedure_path', placeholder: 'Chemin vers la démarche', data: { autocomplete: 'path' }, @@ -41,7 +41,8 @@ %br Vous ne pouvez pas l’utiliser car il appartient à un autre administrateur. #path_is_invalid.text-danger.center.message - = t('activerecord.errors.models.procedure_path.attributes.path.format') + Ce lien + = t('activerecord.errors.models.procedure.attributes.path.invalid') .modal-footer = submit_tag procedure_modal_text(@procedure, :submit), class: %w(btn btn btn-success), disabled: :disabled, id: 'publish' = button_tag "Annuler", class: %w(btn btn btn-default), data: { dismiss: :modal }, id: 'cancel' diff --git a/app/views/admin/procedures/_unavailable.html.haml b/app/views/admin/procedures/_unavailable.html.haml index a47dfee6d..fd285d23a 100644 --- a/app/views/admin/procedures/_unavailable.html.haml +++ b/app/views/admin/procedures/_unavailable.html.haml @@ -1,8 +1,11 @@ -- if mine +- case availability +- when Procedure::PATH_AVAILABLE_PUBLIEE Ce lien est déjà utilisé par une de vos démarche. %br - Si vous voulez l’utiliser, l’ancienne démarche sera archivée (plus accessible du public). -- else + Si vous voulez l’utiliser, l’ancienne démarche sera archivée lors de la publication de la démarche (plus accessible du public). +- when Procedure::PATH_NOT_AVAILABLE_BROUILLON + Un brouillon de démarche existe déjà avec ce lien. +- when Procedure::PATH_NOT_AVAILABLE Ce lien est déjà utilisé par une démarche. %br Vous ne pouvez pas l’utiliser car il appartient à un autre administrateur. diff --git a/app/views/admin/procedures/check_availability.js.erb b/app/views/admin/procedures/check_availability.js.erb index 91c9a76ba..f5eed5960 100644 --- a/app/views/admin/procedures/check_availability.js.erb +++ b/app/views/admin/procedures/check_availability.js.erb @@ -1,11 +1,11 @@ -<% if @available %> +<% if @availability == Procedure::PATH_AVAILABLE %> <%= remove_element('.unavailable-path-message', inner: true) %> +<% else %> + <%= render_to_element('.unavailable-path-message', partial: 'unavailable', locals: { availability: @availability }) %> +<% end %> + +<% if @availability.in?(Procedure::PATH_CAN_PUBLISH) %> <%= enable_element('button[type=submit]') %> <% else %> - <%= render_to_element('.unavailable-path-message', partial: 'unavailable', locals: { mine: @mine }) %> - <% if @mine %> - <%= enable_element('button[type=submit]') %> - <% else %> - <%= disable_element('button[type=submit]') %> - <% end %> + <%= disable_element('button[type=submit]') %> <% end %> diff --git a/app/views/admin/procedures/edit.html.haml b/app/views/admin/procedures/edit.html.haml index 17bb396b8..1eb571224 100644 --- a/app/views/admin/procedures/edit.html.haml +++ b/app/views/admin/procedures/edit.html.haml @@ -3,7 +3,7 @@ = form_for @procedure, url: url_for({ controller: 'admin/procedures', action: :update, id: @procedure.id }), multipart: true do |f| = render partial: 'informations', locals: { f: f } .text-right - - if !Flipflop.publish_draft? || (@available || @mine) + - if !Flipflop.publish_draft? || @availability.in?(Procedure::PATH_CAN_PUBLISH) = f.button 'Enregistrer', class: 'btn btn-success' - else = f.button 'Enregistrer', class: 'btn btn-success', disabled: true diff --git a/app/views/admin/procedures/new.html.haml b/app/views/admin/procedures/new.html.haml index bb05ef17a..8451872a9 100644 --- a/app/views/admin/procedures/new.html.haml +++ b/app/views/admin/procedures/new.html.haml @@ -6,7 +6,7 @@ = form_for @procedure, url: { controller: 'admin/procedures', action: :create }, multipart: true do |f| = render partial: 'informations', locals: { f: f } .text-right - - if !Flipflop.publish_draft? || (@available || @mine) + - if !Flipflop.publish_draft? || @availability.in?(Procedure::PATH_CAN_PUBLISH) = f.button 'Valider', class: 'btn btn-info', id: 'save-procedure' - else = f.button 'Valider', class: 'btn btn-info', id: 'save-procedure', disabled: true diff --git a/app/views/commencer/archived.html.haml b/app/views/commencer/archived.html.haml deleted file mode 100644 index 84c72ab34..000000000 --- a/app/views/commencer/archived.html.haml +++ /dev/null @@ -1,15 +0,0 @@ -%br -%div{ style: 'text-align: center; max-width: 500px; margin-left: auto; margin-right: auto; padding: 20px;' } - = render partial: 'users/sessions/resume_procedure' - -.center{ style: 'margin-top: -20px;' } - %h3 - La campagne de création de nouveau dossier - %br - pour cette démarche en ligne est maintenant terminée. - - %br - %p - Si vous avez déjà déposé un ou plusieurs dossiers : - %a.btn.btn-lg.btn-info{ href: new_user_session_path } - Accéder à mon espace en ligne. diff --git a/app/views/fields/procedure_link_field/_show.html.haml b/app/views/fields/procedure_link_field/_show.html.haml index 250a02c4f..7d0ee3413 100644 --- a/app/views/fields/procedure_link_field/_show.html.haml +++ b/app/views/fields/procedure_link_field/_show.html.haml @@ -1,4 +1,4 @@ - if field.data.present? - = link_to "/commencer/#{field.data}", commencer_url(procedure_path: field.data), target: '_blank' + = link_to "/commencer/#{field.data}", commencer_url(path: field.data), target: '_blank' - else Plus en ligne diff --git a/app/views/layouts/left_panels/_left_panel_admin_procedurescontroller_update.html.haml b/app/views/layouts/left_panels/_left_panel_admin_procedurescontroller_update.html.haml new file mode 100644 index 000000000..43587373d --- /dev/null +++ b/app/views/layouts/left_panels/_left_panel_admin_procedurescontroller_update.html.haml @@ -0,0 +1 @@ += render partial: 'layouts/left_panels/left_panel_admin_procedurescontroller_navbar', locals: { active: 'Description' } diff --git a/app/views/manager/users/show.html.erb b/app/views/manager/users/show.html.erb index 46cd01b56..079866322 100644 --- a/app/views/manager/users/show.html.erb +++ b/app/views/manager/users/show.html.erb @@ -35,7 +35,6 @@ as well as a link to its edit page.