include philippe notes

This commit is contained in:
Tanguy PATTE 2015-09-02 17:34:13 +02:00
parent 1c817c4a57
commit fe3f235860
12 changed files with 26 additions and 11 deletions

View file

@ -57,7 +57,7 @@ gem 'bootstrap-datepicker-rails'
gem 'chartkick'
gem 'leaflet-rails'
gem 'logstasher'

View file

@ -1,4 +1,4 @@
function onDocumentReady() { if (typeof L != 'undefined') {
function onDocumentReady() { if (typeof L != 'undefined' && typeof L.drawLocal != 'undefined') {
(function () {
API_URL = '//api-adresse.data.gouv.fr';

View file

@ -17,4 +17,5 @@
//= require jquery
//= require bootstrap-sprockets
//= require bootstrap-datepicker/core
//= require bootstrap-datepicker/locales/bootstrap-datepicker.fr.js
//= require bootstrap-datepicker/locales/bootstrap-datepicker.fr.js
//= require leaflet

View file

@ -1,3 +1,5 @@
//= depend_on_asset "layers.png"
//= depend_on_asset "layers-2x.png"
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
@ -13,6 +15,7 @@
*= require_tree .
*= require_self
*= require bootstrap-datepicker3
*= require leaflet
*/
@import "bootstrap-sprockets";
@import "bootstrap";

View file

@ -32,8 +32,16 @@ class Dossier < ActiveRecord::Base
end
end
def sous_domaine
if Rails.env.production?
'tps'
else
'tps-dev'
end
end
def mailto
"mailto:#{formulaire.email_contact}?subject=Demande%20de%20contact&body=Bonjour,%0A%0AJe%20vous%20informe%20que%20j'ai%20rempli%20le%20dossier%20sur%20admi_facile.%20Vous%20pouvez%20y%20acc%C3%A9der%20en%20suivant%20le%20lien%20suivant%20:%20%0Ahttps://admi_facile.apientreprise.fr/admin/dossiers/#{id}%20%0A%20Le%20num%C3%A9ro%20de%20mon%20dossier%20est%20le%20#{id}"
"mailto:#{formulaire.email_contact}?subject=Demande%20de%20contact&body=Bonjour,%0A%0AJe%20vous%20informe%20que%20j'ai%20rempli%20le%20dossier%20sur%20TPS.%20Vous%20pouvez%20y%20acc%C3%A9der%20en%20suivant%20le%20lien%20suivant%20:%20%0Ahttps://#{sous_domaine}.apientreprise.fr/admin/dossiers/#{id}%20%0A%20Le%20num%C3%A9ro%20de%20mon%20dossier%20est%20le%20#{id}"
end
private

View file

@ -1,5 +1,5 @@
%div#sources_CSS_api_carto
%link{:href => "https://leaflet.github.io/Leaflet.draw/leaflet.draw.css", :rel => "stylesheet", :type => "text/css"}
%link{:href => "https://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css", :rel => "stylesheet", :type => "text/css"}
%link{:href => "https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css", :rel => "stylesheet"}
%link{:href => "https://cdn.rawgit.com/CliffCloud/Leaflet.EasyButton/dd04bbf160aa33c44aa63e8a744b3632c162c340/src/easy-button.css", :rel => "stylesheet"}

View file

@ -2,7 +2,7 @@
="var dossier_id =#{@dossier.id}"
%div#sources_JS_api_carto
%script{:src => "https://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"}
%script{:src => "https://leaflet.github.io/Leaflet.draw/leaflet.draw.js"}
%script{:src => "https://cdnjs.cloudflare.com/ajax/libs/spin.js/2.0.1/spin.min.js"}
%script{:src => "https://cdn.rawgit.com/CliffCloud/Leaflet.EasyButton/14332b70b18bdec80f4cce86c643372883bf90aa/src/easy-button.bar.js"}

View file

@ -3,7 +3,7 @@
="var ref_dossier=#{@dossier.ref_dossier}"
%div#sources_JS_api_carto_backend
%script{:src => "https://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"}
%script{:src => "https://leaflet.github.io/Leaflet.draw/leaflet.draw.js"}
%script{:src => "https://cdnjs.cloudflare.com/ajax/libs/spin.js/2.0.1/spin.min.js"}
%script{:src => "https://cdn.rawgit.com/CliffCloud/Leaflet.EasyButton/14332b70b18bdec80f4cce86c643372883bf90aa/src/easy-button.bar.js"}

View file

@ -1,5 +1,6 @@
.container
%h2 Récapitulatif de vos informations
%h2 Récapitulatif de vos informations <em class="small">(récupérées auprès de l'INSEE et d'INFOGREFFE)</em>
%br
%div.row
= render partial: 'infos_entreprise'

View file

@ -1,6 +1,7 @@
.container.center
%h1.cover-heading TPS
%h4.cover-heading Téléprocédures simplifiées
%h1.cover-heading <b>T</b>élé<b>P</b>rocédure administrative <b>S</b>implifiée
%p
Site de démonstration dun service public de saisie dun projet ou de dépôt dune démarche administrative, auprès dun ou plusieurs organismes publics, simplifié des informations déjà connues des administrations, grâce à la fourniture du numéro SIRET.
.row{style:'margin-top:10%'}
-if !user_signed_in?
.col-lg-6.col-md-6

View file

@ -25,6 +25,7 @@ module TPS
config.assets.paths << Rails.root.join('app', 'assets', 'javascript')
config.assets.paths << Rails.root.join('app', 'assets', 'javascript', 'api_carto')
config.assets.paths << Rails.root.join('app', 'assets', 'javascript', 'api_carto', 'lib')
config.assets.paths << Rails.root.join('app', 'assets', 'javascript', 'api_carto', 'lib', 'images')
# Do not swallow errors in after_commit/after_rollback callbacks.
config.active_record.raise_in_transactional_callbacks = true

View file

@ -126,7 +126,7 @@ describe Dossier do
let(:dossier) { create(:dossier) }
let(:email_contact) { dossier.formulaire.email_contact }
subject { dossier.mailto }
it { is_expected.to eq("mailto:#{email_contact}?subject=Demande%20de%20contact&body=Bonjour,%0A%0AJe%20vous%20informe%20que%20j'ai%20rempli%20le%20dossier%20sur%20admi_facile.%20Vous%20pouvez%20y%20acc%C3%A9der%20en%20suivant%20le%20lien%20suivant%20:%20%0Ahttps://admi_facile.apientreprise.fr/admin/dossiers/#{dossier.id}%20%0A%20Le%20num%C3%A9ro%20de%20mon%20dossier%20est%20le%20#{dossier.id}")}
it { is_expected.to eq("mailto:#{email_contact}?subject=Demande%20de%20contact&body=Bonjour,%0A%0AJe%20vous%20informe%20que%20j'ai%20rempli%20le%20dossier%20sur%20TPS.%20Vous%20pouvez%20y%20acc%C3%A9der%20en%20suivant%20le%20lien%20suivant%20:%20%0Ahttps://tps-dev.apientreprise.fr/admin/dossiers/#{dossier.id}%20%0A%20Le%20num%C3%A9ro%20de%20mon%20dossier%20est%20le%20#{dossier.id}")}
end
end
end