Merge branch 'staging'

This commit is contained in:
Xavier J 2017-01-03 10:48:19 +01:00
commit 7709d38bb4
435 changed files with 7123 additions and 3610 deletions

1
.gitignore vendored
View file

@ -25,6 +25,7 @@ public/uploads
public/downloads
bin/*
config/initializers/token.rb
config/initializers/super_admin.rb
doc/*.svg
rubocop.html
config/france_connect.yml

44
Gemfile
View file

@ -1,22 +1,23 @@
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.7.1'
gem 'rails', '5.0.0.1'
gem 'actioncable', '5.0.0.1'
gem 'redis'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.1.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
gem 'turbolinks', '~> 2.5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
@ -47,10 +48,11 @@ gem 'bootstrap-sass', '~> 3.3.5'
gem 'will_paginate-bootstrap'
# Decorators
gem 'draper'
gem 'draper', '~> 3.0.0.pre1'
gem 'unicode_utils'
#Gestion des comptes utilisateurs
gem 'devise', '~> 3.0'
gem 'devise'
gem 'openid_connect'
gem 'rest-client'
@ -83,13 +85,12 @@ gem 'mailjet'
gem "smart_listing"
# gem 'css_splitter'
gem 'bootstrap-wysihtml5-rails', '~> 0.3.3.8'
gem 'as_csv'
gem 'spreadsheet_architect'
gem 'apipie-rails', '=0.3.1'
gem 'apipie-rails'
gem "maruku" # for Markdown support in apipie
gem 'openstack'
@ -98,6 +99,7 @@ gem 'browser'
group :test do
gem 'capybara'
gem 'launchy'
gem 'factory_girl'
gem 'database_cleaner'
gem 'selenium-webdriver'
@ -106,14 +108,19 @@ group :test do
gem 'simplecov', require: false
gem 'poltergeist'
gem 'timecop'
# gem 'guard'
gem 'guard'
# gem 'guard-rspec', require: false
# gem 'guard-livereload', '~> 2.4', require: false
gem 'guard-livereload', '~> 2.4', require: false
gem 'vcr'
gem 'rails-controller-testing'
end
group :development do
gem 'web-console', '~> 2.0'
# Access an IRB console on exception pages or by using <%= console %> in views
gem 'web-console'
gem 'rack-handlers'
end
group :development, :test do
@ -124,11 +131,9 @@ group :development, :test do
gem 'byebug'
gem 'pry-byebug'
# Access an IRB console on exception pages or by using <%= console %> in views
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-commands-rspec'
# gem 'spring'
# gem 'spring-commands-rspec'
gem 'rspec-rails', '~> 3.0'
gem 'railroady'
@ -137,13 +142,12 @@ group :development, :test do
gem 'rubocop-checkstyle_formatter', require: false
gem 'rubocop-rspec', require: false
gem "nyan-cat-formatter"
gem 'parallel_tests', '~> 1.9.0'
gem 'parallel_tests', '~> 2.10'
gem 'brakeman', require: false
# Deploy
gem 'mina', git: 'https://github.com/mina-deploy/mina.git'
gem 'mina', ref: '343a7', git: 'https://github.com/mina-deploy/mina.git'
end
group :production, :staging do

View file

@ -1,154 +1,153 @@
GIT
remote: https://github.com/mina-deploy/mina.git
revision: a66b55a72833b19ac0ffb240afb37c86c0227582
revision: 343a7ab672d8b4f0ddb84ec240cde7d94b46397a
ref: 343a7
specs:
mina (0.3.7)
mina (0.3.8)
open4 (~> 1.3.4)
rake
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (2.3.2)
actionmailer (4.2.7.1)
actionpack (= 4.2.7.1)
actionview (= 4.2.7.1)
activejob (= 4.2.7.1)
CFPropertyList (2.3.4)
actioncable (5.0.0.1)
actionpack (= 5.0.0.1)
nio4r (~> 1.2)
websocket-driver (~> 0.6.1)
actionmailer (5.0.0.1)
actionpack (= 5.0.0.1)
actionview (= 5.0.0.1)
activejob (= 5.0.0.1)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 1.0, >= 1.0.5)
actionpack (4.2.7.1)
actionview (= 4.2.7.1)
activesupport (= 4.2.7.1)
rack (~> 1.6)
rack-test (~> 0.6.2)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-dom-testing (~> 2.0)
actionpack (5.0.0.1)
actionview (= 5.0.0.1)
activesupport (= 5.0.0.1)
rack (~> 2.0)
rack-test (~> 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (4.2.7.1)
activesupport (= 4.2.7.1)
actionview (5.0.0.1)
activesupport (= 5.0.0.1)
builder (~> 3.1)
erubis (~> 2.7.0)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
active_model_serializers (0.8.3)
activemodel (>= 3.0)
activejob (4.2.7.1)
activesupport (= 4.2.7.1)
globalid (>= 0.3.0)
activemodel (4.2.7.1)
activesupport (= 4.2.7.1)
active_model_serializers (0.10.3)
actionpack (>= 4.1, < 6)
activemodel (>= 4.1, < 6)
jsonapi (= 0.1.1.beta2)
activejob (5.0.0.1)
activesupport (= 5.0.0.1)
globalid (>= 0.3.6)
activemodel (5.0.0.1)
activesupport (= 5.0.0.1)
activemodel-serializers-xml (1.0.1)
activemodel (> 5.x)
activerecord (> 5.x)
activesupport (> 5.x)
builder (~> 3.1)
activerecord (4.2.7.1)
activemodel (= 4.2.7.1)
activesupport (= 4.2.7.1)
arel (~> 6.0)
activesupport (4.2.7.1)
activerecord (5.0.0.1)
activemodel (= 5.0.0.1)
activesupport (= 5.0.0.1)
arel (~> 7.0)
activesupport (5.0.0.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
addressable (2.3.8)
apipie-rails (0.3.1)
addressable (2.5.0)
public_suffix (~> 2.0, >= 2.0.2)
apipie-rails (0.3.7)
json
arel (6.0.3)
arel (7.1.4)
as_csv (2.0.2)
actionpack (>= 3.0)
activemodel (>= 3.0)
responders
ast (2.0.0)
astrolabe (1.3.0)
parser (>= 2.2.0.pre.3, < 3.0)
attr_required (1.0.0)
autoprefixer-rails (5.2.1)
ast (2.3.0)
attr_required (1.0.1)
autoprefixer-rails (6.5.4)
execjs
json
axlsx (2.0.1)
htmlentities (~> 4.3.1)
nokogiri (>= 1.4.1)
rubyzip (~> 1.0.0)
bcrypt (3.1.11)
bindata (2.1.0)
binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1)
bootstrap-datepicker-rails (1.4.0)
bindata (2.3.4)
bootstrap-datepicker-rails (1.6.4.1)
railties (>= 3.0)
bootstrap-sass (3.3.5)
autoprefixer-rails (>= 5.0.0.1)
sass (>= 3.2.19)
bootstrap-sass (3.3.7)
autoprefixer-rails (>= 5.2.1)
sass (>= 3.3.4)
bootstrap-wysihtml5-rails (0.3.3.8)
railties (>= 3.0)
brakeman (3.1.1)
erubis (~> 2.6)
fastercsv (~> 1.5)
haml (>= 3.0, < 5.0)
highline (~> 1.6)
multi_json (~> 1.2)
ruby2ruby (>= 2.1.1, < 2.3.0)
ruby_parser (~> 3.7.0)
sass (~> 3.0)
slim (>= 1.3.6, < 4.0)
terminal-table (~> 1.4)
browser (2.2.0)
brakeman (3.4.1)
browser (2.3.0)
builder (3.2.2)
byebug (5.0.0)
columnize (= 0.9.0)
capybara (2.4.4)
byebug (9.0.6)
capybara (2.11.0)
addressable
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (~> 2.0)
carrierwave (0.10.0)
carrierwave (0.11.2)
activemodel (>= 3.2.0)
activesupport (>= 3.2.0)
json (>= 1.7)
mime-types (>= 1.16)
chartkick (1.3.2)
childprocess (0.5.5)
mimemagic (>= 0.3.0)
chartkick (2.2.1)
childprocess (0.5.9)
ffi (~> 1.0, >= 1.0.11)
clamav-client (3.0.0)
clamav-client (3.1.0)
cliver (0.3.2)
coderay (1.1.0)
coffee-rails (4.1.0)
coderay (1.1.1)
coffee-rails (4.2.1)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.0)
railties (>= 4.0.0, < 5.2.x)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.9.1.1)
columnize (0.9.0)
coffee-script-source (1.11.1)
concurrent-ruby (1.0.2)
crack (0.4.2)
crack (0.4.3)
safe_yaml (~> 1.0.0)
database_cleaner (1.4.1)
database_cleaner (1.5.3)
debug_inspector (0.0.2)
deep_cloneable (2.2.1)
deep_cloneable (2.2.2)
activerecord (>= 3.1.0, < 5.2.0)
devise (3.5.10)
devise (4.2.0)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 3.2.6, < 5)
railties (>= 4.1.0, < 5.1)
responders
thread_safe (~> 0.1)
warden (~> 1.2.3)
diff-lcs (1.2.5)
docile (1.1.5)
domain_name (0.5.24)
domain_name (0.5.20161129)
unf (>= 0.0.5, < 1.0.0)
draper (2.1.0)
actionpack (>= 3.0)
activemodel (>= 3.0)
activesupport (>= 3.0)
draper (3.0.0.pre1)
actionpack (~> 5.0)
activemodel (~> 5.0)
activemodel-serializers-xml (~> 1.0)
activesupport (~> 5.0)
request_store (~> 1.0)
em-websocket (0.5.1)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
erubis (2.7.0)
excon (0.49.0)
eventmachine (1.2.1)
excon (0.54.0)
execjs (2.7.0)
factory_girl (4.5.0)
factory_girl (4.7.0)
activesupport (>= 3.0.0)
faraday (0.9.1)
faraday (0.10.0)
multipart-post (>= 1.2, < 3)
fastercsv (1.5.5)
ffi (1.9.6)
ffi (1.9.14)
fission (0.5.0)
CFPropertyList (~> 2.2)
fog (1.38.0)
@ -188,12 +187,12 @@ GEM
fog-atmos (0.1.0)
fog-core
fog-xml
fog-aws (0.9.2)
fog-core (~> 1.27)
fog-aws (1.0.0)
fog-core (~> 1.38)
fog-json (~> 1.0)
fog-xml (~> 0.1)
ipaddress (~> 0.8)
fog-brightbox (0.10.1)
fog-brightbox (0.11.0)
fog-core (~> 1.22)
fog-json
inflecto (~> 0.0.2)
@ -202,7 +201,7 @@ GEM
fog-json (~> 1.0)
fog-xml (~> 0.1)
ipaddress (~> 0.8)
fog-core (1.38.0)
fog-core (1.43.0)
builder
excon (~> 0.49)
formatador (~> 0.2)
@ -220,22 +219,20 @@ GEM
fog-json (1.0.2)
fog-core (~> 1.0)
multi_json (~> 1.10)
fog-local (0.3.0)
fog-local (0.3.1)
fog-core (~> 1.27)
fog-openstack (0.1.5)
fog-core (>= 1.38)
fog-openstack (0.1.18)
fog-core (>= 1.40)
fog-json (>= 1.0)
fog-xml (>= 0.1)
ipaddress (>= 0.8)
fog-powerdns (0.1.1)
fog-core (~> 1.27)
fog-json (~> 1.0)
fog-xml (~> 0.1)
fog-profitbricks (0.0.5)
fog-core
fog-xml
nokogiri
fog-rackspace (0.1.1)
fog-profitbricks (3.0.0)
fog-core (~> 1.42)
fog-json (~> 1.0)
fog-rackspace (0.1.2)
fog-core (>= 1.35)
fog-json (>= 1.0)
fog-xml (>= 0.1)
@ -254,7 +251,7 @@ GEM
fog-serverlove (0.1.2)
fog-core
fog-json
fog-softlayer (1.1.1)
fog-softlayer (1.1.4)
fog-core
fog-json
fog-storm_on_demand (0.1.1)
@ -269,21 +266,36 @@ GEM
fog-voxel (0.1.0)
fog-core
fog-xml
fog-vsphere (0.6.4)
fog-vsphere (1.5.2)
fog-core
rbvmomi (~> 1.8)
rbvmomi (~> 1.9)
fog-xenserver (0.2.3)
fog-core
fog-xml
fog-xml (0.1.2)
fog-core
nokogiri (~> 1.5, >= 1.5.11)
font-awesome-rails (4.4.0.0)
railties (>= 3.2, < 5.0)
font-awesome-rails (4.7.0.1)
railties (>= 3.2, < 5.1)
formatador (0.2.5)
globalid (0.3.7)
activesupport (>= 4.1.0)
haml (4.0.6)
guard (2.14.0)
formatador (>= 0.2.4)
listen (>= 2.7, < 4.0)
lumberjack (~> 1.0)
nenv (~> 0.1)
notiffany (~> 0.0)
pry (>= 0.9.12)
shellany (~> 0.0)
thor (>= 0.18.1)
guard-compat (1.2.1)
guard-livereload (2.5.2)
em-websocket (~> 0.5)
guard (~> 2.8)
guard-compat (~> 1.0)
multi_json (~> 1.8)
haml (4.0.7)
tilt
haml-rails (0.9.0)
actionpack (>= 4.0.1)
@ -291,105 +303,123 @@ GEM
haml (>= 4.0.6, < 5.0)
html2haml (>= 1.0.1)
railties (>= 4.0.1)
hashie (3.4.1)
highline (1.7.8)
hashdiff (0.3.1)
hashie (3.4.6)
html2haml (2.0.0)
erubis (~> 2.7.0)
haml (~> 4.0.0)
nokogiri (~> 1.6.0)
ruby_parser (~> 3.5)
htmlentities (4.3.4)
http-cookie (1.0.2)
http-cookie (1.0.3)
domain_name (~> 0.5)
httpclient (2.6.0.1)
http_parser.rb (0.6.0)
httpclient (2.8.3)
i18n (0.7.0)
inflecto (0.0.2)
ipaddress (0.8.3)
jbuilder (2.3.1)
activesupport (>= 3.0.0, < 5)
jbuilder (2.6.1)
activesupport (>= 3.0.0, < 5.1)
multi_json (~> 1.2)
jquery-rails (4.0.4)
rails-dom-testing (~> 1.0)
jquery-rails (4.2.1)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
json (1.8.3)
json-jwt (1.5.1)
json-jwt (1.7.0)
activesupport
bindata
multi_json (>= 1.3)
securecompare
url_safe_base64
kaminari (0.16.3)
jsonapi (0.1.1.beta2)
json (~> 1.8)
kaminari (0.17.0)
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
kgio (2.9.3)
kgio (2.10.0)
launchy (2.4.3)
addressable (~> 2.3)
leaflet-draw-rails (0.1.0)
leaflet-markercluster-rails (0.7.0)
railties (>= 3.1)
leaflet-rails (0.7.4)
libv8 (3.16.14.7)
leaflet-rails (0.7.7)
libv8 (3.16.14.17)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
logstash-event (1.2.02)
logstasher (0.6.5)
logstasher (1.1.0)
activerecord (>= 4.0)
activesupport (>= 4.0)
logstash-event (~> 1.2.0)
request_store
loofah (2.0.3)
nokogiri (>= 1.5.9)
lumberjack (1.0.10)
mail (2.6.4)
mime-types (>= 1.16, < 4)
mailjet (1.1.0)
mailjet (1.4.10)
activesupport (>= 3.1.0)
rack (>= 1.4.0)
rest-client
maruku (0.7.2)
method_source (0.8.2)
mime-types (2.99.2)
mime-types (3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521)
mimemagic (0.3.2)
mini_portile2 (2.1.0)
minitest (5.9.0)
multi_json (1.11.2)
minitest (5.10.1)
multi_json (1.12.1)
multipart-post (2.0.0)
netrc (0.10.3)
nokogiri (1.6.8)
nenv (0.3.0)
netrc (0.11.0)
nio4r (1.2.1)
nokogiri (1.6.8.1)
mini_portile2 (~> 2.1.0)
pkg-config (~> 1.1.7)
nyan-cat-formatter (0.11)
rspec (>= 2.99, >= 2.14.2, < 4)
notiffany (0.1.1)
nenv (~> 0.1)
shellany (~> 0.0)
open4 (1.3.4)
openid_connect (0.9.2)
openid_connect (0.12.0)
activemodel
attr_required (>= 1.0.0)
json (>= 1.4.3)
json-jwt (>= 1.5.0)
rack-oauth2 (>= 1.2.1)
rack-oauth2 (>= 1.3.1)
swd (>= 1.0.0)
tzinfo
validate_email
validate_url
webfinger (>= 1.0.1)
openstack (2.0.2)
openstack (3.3.7)
json
orm_adapter (0.5.0)
parallel (1.9.0)
parallel_tests (1.9.0)
parallel (1.10.0)
parallel_tests (2.10.0)
parallel
parser (2.2.2.2)
ast (>= 1.1, < 3.0)
pg (0.18.2)
pkg-config (1.1.7)
poltergeist (1.6.0)
parser (2.3.3.1)
ast (~> 2.2)
pg (0.19.0)
poltergeist (1.12.0)
capybara (~> 2.1)
cliver (~> 0.3.1)
multi_json (~> 1.0)
websocket-driver (>= 0.2.0)
powerpack (0.1.0)
pry (0.10.1)
powerpack (0.1.1)
pry (0.10.4)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
pry-byebug (3.2.0)
byebug (~> 5.0)
pry-byebug (3.4.2)
byebug (~> 9.0)
pry (~> 0.10)
rack (1.6.4)
rack-oauth2 (1.2.1)
public_suffix (2.0.4)
rack (2.0.1)
rack-handlers (0.7.3)
rack
rack-oauth2 (1.4.0)
activesupport (>= 2.3)
attr_required (>= 0.0.5)
httpclient (>= 2.4)
@ -397,90 +427,92 @@ GEM
rack (>= 1.1)
rack-test (0.6.3)
rack (>= 1.0)
railroady (1.3.0)
rails (4.2.7.1)
actionmailer (= 4.2.7.1)
actionpack (= 4.2.7.1)
actionview (= 4.2.7.1)
activejob (= 4.2.7.1)
activemodel (= 4.2.7.1)
activerecord (= 4.2.7.1)
activesupport (= 4.2.7.1)
railroady (1.5.2)
rails (5.0.0.1)
actioncable (= 5.0.0.1)
actionmailer (= 5.0.0.1)
actionpack (= 5.0.0.1)
actionview (= 5.0.0.1)
activejob (= 5.0.0.1)
activemodel (= 5.0.0.1)
activerecord (= 5.0.0.1)
activesupport (= 5.0.0.1)
bundler (>= 1.3.0, < 2.0)
railties (= 4.2.7.1)
sprockets-rails
rails-deprecated_sanitizer (1.0.3)
activesupport (>= 4.2.0.alpha)
rails-dom-testing (1.0.7)
activesupport (>= 4.2.0.beta, < 5.0)
railties (= 5.0.0.1)
sprockets-rails (>= 2.0.0)
rails-controller-testing (1.0.1)
actionpack (~> 5.x)
actionview (~> 5.x)
activesupport (~> 5.x)
rails-dom-testing (2.0.1)
activesupport (>= 4.2.0, < 6.0)
nokogiri (~> 1.6.0)
rails-deprecated_sanitizer (>= 1.0.1)
rails-html-sanitizer (1.0.3)
loofah (~> 2.0)
railties (4.2.7.1)
actionpack (= 4.2.7.1)
activesupport (= 4.2.7.1)
railties (5.0.0.1)
actionpack (= 5.0.0.1)
activesupport (= 5.0.0.1)
method_source
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rainbow (2.0.0)
raindrops (0.13.0)
rake (11.2.2)
rbvmomi (1.8.2)
builder
nokogiri (>= 1.4.1)
trollop
rdoc (4.2.0)
json (~> 1.4)
rainbow (2.1.0)
raindrops (0.17.0)
rake (12.0.0)
rb-fsevent (0.9.8)
rb-inotify (0.9.7)
ffi (>= 0.5.0)
rbvmomi (1.9.4)
builder (~> 3.2)
json (>= 1.8)
nokogiri (~> 1.5)
trollop (~> 2.1)
rdoc (4.3.0)
redis (3.3.0)
ref (2.0.0)
request_store (1.1.0)
request_store (1.3.1)
responders (2.3.0)
railties (>= 4.2.0, < 5.1)
rest-client (1.8.0)
rest-client (2.0.0)
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 3.0)
netrc (~> 0.7)
rgeo (0.3.20)
rgeo-geojson (0.3.1)
rgeo (~> 0.3)
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
rgeo (0.5.3)
rgeo-geojson (0.4.3)
rgeo (~> 0.5)
rodf (0.3.7)
activesupport (>= 3.0, < 6.0)
builder (~> 3.0)
rubyzip (~> 1.0)
rspec (3.2.0)
rspec-core (~> 3.2.0)
rspec-expectations (~> 3.2.0)
rspec-mocks (~> 3.2.0)
rspec-core (3.2.3)
rspec-support (~> 3.2.0)
rspec-expectations (3.2.1)
rspec-core (3.5.4)
rspec-support (~> 3.5.0)
rspec-expectations (3.5.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.2.0)
rspec-mocks (3.2.1)
rspec-support (~> 3.5.0)
rspec-mocks (3.5.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.2.0)
rspec-rails (3.2.1)
actionpack (>= 3.0, < 4.3)
activesupport (>= 3.0, < 4.3)
railties (>= 3.0, < 4.3)
rspec-core (~> 3.2.0)
rspec-expectations (~> 3.2.0)
rspec-mocks (~> 3.2.0)
rspec-support (~> 3.2.0)
rspec-support (3.2.2)
rubocop (0.30.1)
astrolabe (~> 1.3)
parser (>= 2.2.2.1, < 3.0)
rspec-support (~> 3.5.0)
rspec-rails (3.5.2)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec-core (~> 3.5.0)
rspec-expectations (~> 3.5.0)
rspec-mocks (~> 3.5.0)
rspec-support (~> 3.5.0)
rspec-support (3.5.0)
rubocop (0.46.0)
parser (>= 2.3.1.1, < 3.0)
powerpack (~> 0.1)
rainbow (>= 1.99.1, < 3.0)
ruby-progressbar (~> 1.4)
rubocop-checkstyle_formatter (0.2.0)
rubocop (>= 0.20.1)
rubocop-rspec (1.3.0)
ruby-progressbar (1.7.5)
ruby2ruby (2.1.4)
ruby_parser (~> 3.1)
sexp_processor (~> 4.0)
ruby_parser (3.7.0)
ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.0, >= 1.0.1)
rubocop-checkstyle_formatter (0.3.0)
rubocop (>= 0.30.1)
rubocop-rspec (1.8.0)
rubocop (>= 0.42.0)
ruby-progressbar (1.8.1)
ruby_dep (1.5.0)
ruby_parser (3.8.3)
sexp_processor (~> 4.1)
rubyzip (1.0.0)
safe_yaml (1.0.4)
@ -494,75 +526,68 @@ GEM
scenic (1.3.0)
activerecord (>= 4.0.0)
railties (>= 4.0.0)
sdoc (0.4.1)
sdoc (0.4.2)
json (~> 1.7, >= 1.7.7)
rdoc (~> 4.0)
securecompare (1.0.0)
selenium-webdriver (2.44.0)
selenium-webdriver (3.0.3)
childprocess (~> 0.5)
multi_json (~> 1.0)
rubyzip (~> 1.0)
websocket (~> 1.0)
sentry-raven (0.13.1)
faraday (>= 0.7.6)
sexp_processor (4.6.0)
shoulda-matchers (2.8.0)
activesupport (>= 3.0.0)
simplecov (0.9.1)
sentry-raven (2.2.0)
faraday (>= 0.7.6, < 1.0)
sexp_processor (4.7.0)
shellany (0.0.1)
shoulda-matchers (3.1.1)
activesupport (>= 4.0.0)
simplecov (0.12.0)
docile (~> 1.1.0)
multi_json (~> 1.0)
simplecov-html (~> 0.8.0)
simplecov-html (0.8.0)
slim (3.0.6)
temple (~> 0.7.3)
tilt (>= 1.3.3, < 2.1)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.0)
slop (3.6.0)
smart_listing (1.1.2)
smart_listing (1.2.0)
coffee-rails
jquery-rails
kaminari (~> 0.16.1)
kaminari (~> 0.17)
rails (>= 3.2)
spreadsheet_architect (1.4.7)
spreadsheet_architect (1.4.8)
axlsx (>= 2.0)
rodf (>= 0.3.6)
spring (1.3.6)
spring-commands-rspec (1.0.4)
spring (>= 0.9.1)
rodf (= 0.3.7)
sprockets (3.7.0)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.1.1)
sprockets-rails (3.2.0)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
swd (1.0.0)
swd (1.0.1)
activesupport (>= 3)
attr_required (>= 0.0.5)
httpclient (>= 2.4)
i18n
json (>= 1.4.3)
temple (0.7.6)
terminal-table (1.5.2)
therubyracer (0.12.2)
libv8 (~> 3.16.14.0)
ref
thor (0.19.1)
thor (0.19.4)
thread_safe (0.3.5)
tilt (2.0.5)
timecop (0.7.3)
timecop (0.8.1)
trollop (2.1.2)
turbolinks (2.5.3)
coffee-rails
tzinfo (1.2.2)
thread_safe (~> 0.1)
uglifier (3.0.2)
uglifier (3.0.4)
execjs (>= 0.3.0, < 3)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.1)
unicorn (4.9.0)
unf_ext (0.0.7.2)
unicode-display_width (1.1.2)
unicode_utils (1.4.0)
unicorn (5.2.0)
kgio (~> 2.6)
rack
raindrops (~> 0.7)
url_safe_base64 (0.2.2)
validate_email (0.1.6)
@ -571,26 +596,27 @@ GEM
validate_url (1.0.2)
activemodel (>= 3.0.0)
addressable
vcr (3.0.1)
vcr (3.0.3)
warden (1.2.6)
rack (>= 1.0)
web-console (2.2.1)
activemodel (>= 4.0)
binding_of_caller (>= 0.7.2)
railties (>= 4.0)
sprockets-rails (>= 2.0, < 4.0)
webfinger (1.0.1)
web-console (3.4.0)
actionview (>= 5.0)
activemodel (>= 5.0)
debug_inspector
railties (>= 5.0)
webfinger (1.0.2)
activesupport
httpclient (>= 2.4)
multi_json
webmock (1.21.0)
webmock (2.3.1)
addressable (>= 2.3.6)
crack (>= 0.3.2)
websocket (1.2.1)
websocket-driver (0.5.3)
hashdiff
websocket (1.2.3)
websocket-driver (0.6.4)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.2)
will_paginate (3.0.7)
will_paginate (3.1.5)
will_paginate-bootstrap (1.0.1)
will_paginate (>= 3.0.3)
xml-simple (1.1.5)
@ -601,8 +627,9 @@ PLATFORMS
ruby
DEPENDENCIES
actioncable (= 5.0.0.1)
active_model_serializers
apipie-rails (= 0.3.1)
apipie-rails
as_csv
bootstrap-datepicker-rails
bootstrap-sass (~> 3.3.5)
@ -614,19 +641,21 @@ DEPENDENCIES
carrierwave
chartkick
clamav-client
coffee-rails (~> 4.1.0)
database_cleaner
deep_cloneable (~> 2.2.1)
devise (~> 3.0)
draper
devise
draper (~> 3.0.0.pre1)
factory_girl
fog
fog-openstack
font-awesome-rails
guard
guard-livereload (~> 2.4)
haml-rails
hashie
jbuilder (~> 2.0)
jquery-rails
launchy
leaflet-draw-rails
leaflet-markercluster-rails (~> 0.7.0)
leaflet-rails
@ -634,15 +663,17 @@ DEPENDENCIES
mailjet
maruku
mina!
nyan-cat-formatter
openid_connect
openstack
parallel_tests (~> 1.9.0)
parallel_tests (~> 2.10)
pg
poltergeist
pry-byebug
rack-handlers
railroady
rails (= 4.2.7.1)
rails (= 5.0.0.1)
rails-controller-testing
redis
rest-client
rgeo-geojson
rspec-rails (~> 3.0)
@ -658,15 +689,14 @@ DEPENDENCIES
simplecov
smart_listing
spreadsheet_architect
spring
spring-commands-rspec
therubyracer
timecop
turbolinks
turbolinks (~> 2.5)
uglifier (>= 1.3.0)
unicode_utils
unicorn
vcr
web-console (~> 2.0)
web-console
webmock
will_paginate-bootstrap

View file

@ -43,7 +43,7 @@ guard 'livereload' do
rails_view_exts = %w(erb haml slim)
# file types LiveReload may optimize refresh for
compiled_exts = extensions.values.uniq
compiled_exts = extensions.values
watch(%r{public/.+\.(#{compiled_exts * '|'})})
extensions.each do |ext, type|
@ -64,24 +64,24 @@ guard 'livereload' do
watch(%r{config/locales/.+\.yml})
end
guard :rspec, cmd: 'bin/rspec' do
watch(%r{^spec/.+_spec\.rb$})
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
watch('spec/spec_helper.rb') { "spec" }
# Rails example
watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
watch(%r{^app/(.*)(\.erb|\.haml|\.slim)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
watch('config/routes.rb') { "spec/routing" }
watch('app/controllers/application_controller.rb') { "spec/controllers" }
watch('spec/rails_helper.rb') { "spec" }
# Capybara features specs
watch(%r{^app/views/(.+)/.*\.(erb|haml|slim)$}) { |m| "spec/features/#{m[1]}_spec.rb" }
# Turnip features and steps
watch(%r{^spec/acceptance/(.+)\.feature$})
watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'spec/acceptance' }
end
# guard :rspec, cmd: 'bin/rspec' do
# watch(%r{^spec/.+_spec\.rb$})
# watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
# watch('spec/spec_helper.rb') { "spec" }
#
# # Rails example
# watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
# watch(%r{^app/(.*)(\.erb|\.haml|\.slim)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
# watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
# watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
# watch('config/routes.rb') { "spec/routing" }
# watch('app/controllers/application_controller.rb') { "spec/controllers" }
# watch('spec/rails_helper.rb') { "spec" }
#
# # Capybara features specs
# watch(%r{^app/views/(.+)/.*\.(erb|haml|slim)$}) { |m| "spec/features/#{m[1]}_spec.rb" }
#
# # Turnip features and steps
# watch(%r{^spec/acceptance/(.+)\.feature$})
# watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'spec/acceptance' }
# end

View file

@ -7,8 +7,8 @@ TéléProcédure Simplifiée, ou TPS pour les intimes, est une plateforme 100% w
## Technologies utilisées
Ruby : 2.1.5
Rails : 4.2.0
Ruby : 2.3.1
Rails : 5.0.0.1
## Initialisation de l'environnement de développement

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 313 KiB

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 313 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

View file

@ -0,0 +1,13 @@
$(document).on('page:load', init_action_btn_rules);
$(document).ready(init_action_btn_rules);
function init_action_btn_rules() {
$('.btn-send').click(function () {
$(this).addClass("disabled");
this.addEventListener("click", lock_btn);
});
function lock_btn(event) {
event.preventDefault();
}
}

View file

@ -50,7 +50,7 @@ function scroll_to() {
$('.js-scrollTo').on('click', function () { // Au clic sur un élément
var page = $(this).attr('cible'); // Page cible
var speed = 600; // Durée de l'animation (en ms)
$('html, body').animate({scrollTop: $(page).offset().top - 100}, speed); // Go
$('html, body').animate({scrollTop: $(page).offset().top - 200}, speed); // Go
return false;
});
}

View file

@ -0,0 +1,13 @@
// Action Cable provides the framework to deal with WebSockets in Rails.
// You can generate new channels where WebSocket features live using the rails generate channel command.
//
//= require action_cable
//= require_self
//= require_tree ./channels
//(function() {
// this.App || (this.App = {});
//
// App.cable = ActionCable.createConsumer();
//
//}).call(this);

View file

@ -0,0 +1,9 @@
$(document).on('page:load', buttons_anchor);
$(document).ready(buttons_anchor);
function buttons_anchor(){
$("#cgu_menu_block").on('click', 'a', function(){
event.preventDefault();
$('html,body').animate({scrollTop:$(this.hash).offset().top-80}, 500);
});
}

View file

@ -0,0 +1,23 @@
//App.messages = App.cable.subscriptions.create('NotificationsChannel', {
// received: function (data) {
// if (window.location.href.indexOf('backoffice') !== -1) {
// $("#notification_alert").html(data['message']);
//
// slideIn_notification_alert();
// }
// }
//});
function slideIn_notification_alert (){
$("#notification_alert").animate({
right: '20px'
}, 250);
setTimeout(slideOut_notification_alert, 3500);
}
function slideOut_notification_alert (){
$("#notification_alert").animate({
right: '-250px'
}, 200);
}

View file

@ -0,0 +1,34 @@
$(document).on('page:load', init_default_data_block);
$(document).ready(init_default_data_block);
function init_default_data_block() {
$('.default_data_block #dossier .body').toggle();
$('.default_data_block #dossier .carret-right').toggle();
$('.default_data_block #dossier .carret-down').toggle();
$('.default_data_block .title').click(function () {
toggle_default_data_bloc(this, 400);
});
$('.new-action').click(function () {
var messages_block = $(this).parents().closest('.default_data_block').find('.title')
toggle_default_data_bloc(messages_block, 400);
});
$('.default_data_block.default_visible').each(function() {
toggle_default_data_bloc($(this).find('.title'), 0);
});
function toggle_default_data_bloc(element, duration) {
var block = $(element).parents('.show-block');
if (block.attr('id') == 'messages') {
block.children('.last-commentaire').toggle();
$(".commentaires").animate({ scrollTop: $(this).height() }, "slow");
}
block.children('.body').slideToggle(duration);
block.find('.carret-right').toggle();
block.find('.carret-down').toggle();
}
}

View file

@ -27,7 +27,6 @@ function action_type_de_champs() {
});
address_type_init();
toggle_header_section_composents();
}
function toggleErrorClass(node, boolean) {
@ -55,21 +54,3 @@ function validateNumber(number) {
function validateInput(input, regex) {
return regex.test(input);
}
function toggle_header_section_composents() {
$("a.mask_section_button").on('click', function (e) {
target = e.currentTarget;
header_section_id = target.id.split('mask_button_')[1];
header_section_composents = $(".header_section_" + header_section_id);
header_section_composents.slideToggle(200, function () {
if (header_section_composents.css('display') == 'none') {
$(target).html('Afficher la section <i class="fa fa-chevron-down" />')
}
else {
$(target).html('Masquer la section <i class="fa fa-chevron-up" />')
}
});
});
}

View file

@ -1,19 +1,36 @@
$(document).on('page:load', the_terms);
$(document).ready(the_terms);
$(document).on('page:load', pannel_switch);
$(document).ready(pannel_switch);
function pannel_switch() {
$('#switch-notifications').click(function () {
$('#procedure_list').addClass('hidden');
$('#notifications_list').removeClass('hidden');
$(this).addClass('active');
$('#switch-procedures').removeClass('active');
})
$('#switch-procedures').click(function () {
$('#notifications_list').addClass('hidden');
$('#procedure_list').removeClass('hidden');
$(this).addClass('active');
$('#switch-notifications').removeClass('active');
})
}
function the_terms() {
var the_terms = $("#dossier_autorisation_donnees");
if(the_terms.size() == 0)
if (the_terms.size() == 0)
return;
check_value (the_terms);
check_value(the_terms);
the_terms.click(function () {
check_value (the_terms);
check_value(the_terms);
});
function check_value (the_terms){
function check_value(the_terms) {
if (the_terms.is(":checked")) {
$("#etape_suivante").removeAttr("disabled");
} else {
@ -22,8 +39,8 @@ function the_terms() {
}
}
function error_form_siret(invalid_siret){
setTimeout(function(){
function error_form_siret(invalid_siret) {
setTimeout(function () {
$("input[type='submit']").val('Erreur SIRET');
}, 10);
@ -33,12 +50,12 @@ function error_form_siret(invalid_siret){
}
function reset_form_siret(){
function reset_form_siret() {
$("input[type='submit']").removeClass('btn-danger').addClass('btn-success').val('Valider');
$("#dossier_siret").removeClass('input-error');
}
function toggle_etape_1(){
function toggle_etape_1() {
$('.row.etape.etape_1 .etapes_menu #logos').toggle(100);
$('.row.etape.etape_1 .etapes_informations #description_procedure').toggle(100);
}

View file

@ -1,7 +1,6 @@
$(document).on('page:load', filters_init);
$(document).ready(filters_init);
function filters_init() {
$('html').click(function(event) {
var visible_filter = $('.filter_framed:visible')
@ -11,11 +10,13 @@ function filters_init() {
}
}
});
$(".filter").on('click', function (event) {
filter_framed_show(event);
filter_framed_close_all_excepted(framed_id(event));
event.stopPropagation();
});
$(".erase-filter").on('click', function (event) {
$(this).parent().find(".filter_input").val("");
});
@ -34,6 +35,11 @@ function framed_id(event) {
function filter_framed_show(event) {
dom_object = $(framed_id(event));
dom_object.css('top', (event.pageY + 7) + 'px');
dom_object.css('left', (event.pageX + 7) + 'px');
var offset = $('#main-container').offset();
var y = event.pageY - offset.top;
var x = event.pageX - offset.left;
dom_object.css('top', (y + 7) + 'px');
dom_object.css('left', (x + 7) + 'px');
}

View file

@ -1,9 +1,8 @@
$(document).on('page:load', link_init);
$(document).ready(link_init);
function link_init() {
$('#dossiers_list tr').on('click', function () {
$(location).attr('href', $(this).data('dossier_url'))
});
$('#dossiers_list tr').on('click', function () {
$(location).attr('href', $(this).data('dossier_url'))
});
}

View file

@ -1,17 +0,0 @@
$(document).on('page:load', all_video);
$(document).ready(all_video);
function all_video() {
$(".all_video").on('click', function(event){
$("#all_video").slideToggle(200);
if (event.stopPropagation) {
event.stopPropagation();
}
event.cancelBubble = true;
return false;
});
}

View file

@ -0,0 +1,60 @@
$(document).on('page:load', init_search_anim);
$(document).ready(init_search_anim);
function init_search_anim(){
$("#search_area").on('click', search_fadeIn);
}
function search_fadeIn(){
var search_area = $("#search_area");
var body_dom = $('body');
var positions = search_area.position();
var width = search_area.width();
search_area.css('position', 'fixed');
search_area.css('top', positions.top + $('.navbar').height());
search_area.css('left', positions.left);
search_area.css('z-index', 300);
search_area.css('width', width);
search_area.find('#q').animate({ height: '50px' });
search_area.find('#search_button').animate({ height: '50px' });
body_dom.append(search_area);
$('#mask_search').fadeIn(200);
var body_width = body_dom.width();
var search_area_width = body_width/2.5;
search_area.animate({
width: search_area_width,
left: (body_width/2 - search_area_width/2 + 40)
}, 400, function() {
search_area.off();
$("#search_area input").focus();
$('#mask_search').on('click', search_fadeOut)
});
}
function search_fadeOut(){
var search_area = $("#search_area");
$('#mask_search').fadeOut(200);
search_area.fadeOut(200, function(){
search_area.css('position', 'static');
search_area.css('top', '');
search_area.css('left', '');
search_area.css('z-index', '');
search_area.css('width', 'auto');
search_area.find('#q').css('height', 34);
search_area.find('#search_button').css('height', 34);
$('#search-block').append(search_area);
search_area.fadeIn(200);
init_search_anim();
});
}

View file

@ -1,17 +1,23 @@
.table {
#id {
width: 5%;
}
#admin_index{
margin-left: 2em;
margin-right: 2em;
#libelle {
width: 40%;
}
.table {
#id {
width: 5%;
}
#organisation {
width: 28%;
}
#libelle {
width: 40%;
}
#direction {
width: 22%;
#organisation {
width: 28%;
}
#direction {
width: 22%;
}
}
}

View file

@ -1,5 +1,5 @@
.header_section{
background-color: rgb(245,245,245);
background-color: rgb(0, 49, 137);
margin-top: 20px;
margin-bottom: 10px;
margin-left: 0;
@ -7,6 +7,12 @@
text-align:center;
padding-bottom: 8px;
color: white;
.form-control.libelle {
font-weight: bold;
}
.form-group.description {
display: none;
}

View file

@ -24,7 +24,7 @@
@import "bootstrap";
body {
background-color: rgb(255, 255, 255);
background-color: #F2F6FA;
}
html, body {
@ -32,16 +32,22 @@ html, body {
}
body {
padding-top: 50px;
padding-top: 60px;
}
form {
margin-bottom: 0.3em;
}
.wysihtml5-sandbox {
resize: vertical;
width: 100% !important;
}
#wrap {
min-height: 100%;
margin-bottom: -50px;
overflow: hidden;
}
#wrap:after {
@ -50,47 +56,23 @@ body {
}
#footer, #wrap:after {
height: 40px;
height: 50px;
}
#footer {
background-color: rgb(240, 240, 240)
}
.main_div {
margin-left: 10rem;
margin-right: 10rem;
}
.logo {
margin-left: 10px;
padding-top: 5px;
padding-bottom: 5px;
max-height: 100%;
}
.logo_navbar {
margin-left: 10px;
padding-top: 5px;
padding-bottom: 5px;
max-height: 100%;
}
#beta {
background-color: #F2F6FA;
text-align: center;
text-transform: uppercase;
position: absolute;
top: 26px;
right: -35px;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
width: 150px;
background-color: #008cba;
color: #fff;
padding: 5px;
font-size: 15px;
font-weight: 700;
z-index: 10;
padding: 0;
a, p {
color: #000000;
}
a:hover {
color: #000000;
}
p {
line-height: 40px;
padding: 0;
}
}
.beta_staging {
@ -104,34 +86,6 @@ body {
transform: translate(-50%, -50%);
}
#sign_out {
decorate: none;
box-shadow: none;
float: right;
margin-top: 8px;
margin-right: 105px;
}
#header {
top: 0;
left: -3px;
position: fixed;
width: 100%;
z-index: 10;
}
.navbar {
height: 35px;
background-color: rgba(235, 235, 235, 0.95);
.sign_in_FC {
margin-top: -18px;
height: 70px;
}
}
.text-purple {
color: #8B008B
}
@ -224,31 +178,6 @@ div.pagination {
}
}
.btn-nav {
background-color: transparent;
margin-top: 6px;
height: 36px;
}
.btn-nav:hover {
background-color: #eeeeee;
border-color: #eeeeee #eeeeee #ddd;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
.btn-nav.text-info:hover {
color: #23527c;
}
.btn-nav.text-success:hover {
color: #3c763d;
}
.btn-nav.text-danger:hover {
color: #a94442;
}
#confirm {
display: none;
}
@ -291,3 +220,11 @@ div.pagination {
}
}
.no-padding {
padding: 0;
}
.no-margin {
margin: 0;
}

View file

@ -1,3 +0,0 @@
/*
*= require 'application'
*/

View file

@ -1,17 +1,24 @@
#backoffice_search {
.table {
tr th {
border-top: none
#backoffice_index, #backoffice_search {
margin-left: 2rem;
margin-right: 2rem;
.default_data_block {
background-color: #FFFFFF;
margin-top: 20px;
.show-block {
width: 100%;
}
.body {
height: auto;
}
}
.fixed-right {
position: fixed;
right: 20px;
}
}
#backoffice_index, #backoffice_search {
margin-left: -7rem;
margin-right: -7rem;
}
#pref_list{
#pref_list {
.dropdown-menu {
padding: 10px;
width: 500px;

View file

@ -0,0 +1,4 @@
#cgu {
margin-left: 2em;
margin-right: 2em;
}

View file

@ -0,0 +1,69 @@
.default_data_block {
font-family: Arial;
.show-block {
width: 840px;
min-width: 840px;
margin-left: auto;
margin-right: auto;
box-shadow: 0 0 1px 0 rgba(0, 0, 0, 0.5);
margin-bottom: 40px;
}
.carret-right {
float: left;
width: 0;
height: 0;
border-top: 7px solid transparent;
border-bottom: 7px solid transparent;
border-left: 14px solid #FFFFFF;
margin: 12px 12px 0 15px;
}
.carret-down {
float: left;
width: 0;
height: 0;
display: none;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
border-top: 14px solid #FFFFFF;
margin: 12px 12px 0 15px;
}
.header {
background-color: #003C92;
height: 40px;
color: #FFFFFF;
font-size: 18px;
font-weight: bold;
.title, .title-no-expanse, .action, .count {
height: 100%;
line-height: 40px;
padding: 0px;
text-transform: uppercase;
}
.title-no-expanse {
cursor: not-allowed;
}
.title, .action, .count {
cursor: pointer;
}
.action {
background-color: #E45B51;
text-align: center;
line-height: 40px;
font-size: 15px;
text-decoration: none;
color: #FFFFFF;
}
.action:hover {
color: #F2F6FA;
}
.count {
font-size: 16px;
text-align: center;
}
}
.body {
background-color: #FFFFFF;
display: none;
}
}

View file

@ -2,8 +2,21 @@
@import "bootstrap-datepicker3";
#description_page #liste_champs {
.default_data_block {
.show-block {
width: 90%;
.body{
padding-left: 35px;
padding-right: 35px;
padding-bottom: 35px;
}
}
}
h4 {
margin-top: 35px;
padding-top: 35px;
margin: 0;
}
}
@ -28,8 +41,6 @@
.type_champ-header_section {
@extend .col-md-12;
@extend .col-lg-12;
margin-bottom: -25px;
}
.type_champ-address {

View file

@ -0,0 +1,196 @@
#backoffice_dossier_show, #users_recapitulatif_dossier_show {
#messages {
.last-commentaire {
display: block;
background-color: #FFFFFF;
.content, .new-action {
margin-bottom: 20px;
}
}
.body {
.commentaires {
max-height: 350px;
overflow-y: scroll;
background: linear-gradient(to bottom, rgba(0, 0, 0, 0.075) 0%, rgba(219, 219, 219, 0) 50%, rgba(250, 251, 253, 0.18) 51%, #ffffff 100%);
}
.no-commentaires {
text-align: center;
font-size: 18px;
padding-top: 20px;
}
}
.last-commentaire, .commentaire {
padding: 20px 0 0 20px;
.comment-header {
font-family: Arial;
font-size: 14px;
font-weight: bold;
line-height: 16px;
color: #000000;
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 {
padding-right: 70px;
text-align: center;
margin-bottom: 20px;
.link {
span {
width: 100%;
font-size: 40px;
}
}
}
}
.split-hr {
margin: 20px 20px 0 20px;
border-bottom: 1px solid #979797;
}
#new-commentaire {
padding: 35px;
.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 {
.split-row {
margin: 0 0 20px 0;
}
.entreprise-info {
font-size: 14px;
}
.entreprise-label {
font-weight: bold;
text-align: end;
}
}
#carto {
}
#private-fields {
.text-primary {
color: #337ab7;
}
}
#pieces-jointes {
.piece-row {
margin: 20px;
.piece-label {
text-align: right;
font-weight: bold;
}
}
.modal-title {
color: #000000;
}
}
#carto {
#map {
margin-bottom: 20px;
height: 350px;
}
}
#dossier, #pieces-jointes, .infos, #carto, #private-fields {
.body {
padding: 20px 20px 0 20px;
color: #000000;
.libelle-procedure {
font-style: italic;
padding: 10px;
}
.depositaire-label {
font-weight: bold;
text-align: end;
}
.depositaire-info {
}
.btn-action{
border: none;
margin: 20px 0 40px 0;
}
.btn-action:hover {
color: #EEEEEE;
}
.action {
margin: 50px 0 0 15px;
}
.action, .btn-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;
text-decoration: none;
a:hover {
color: #EEEEEE;
}
}
.historique {
color: #000000;
margin-left: 20px;
}
.comments {
margin-right: -10px;
}
.comments-off {
margin-right: -35px;
}
.dossier-title {
font-size: 16px;
min-height: 40px;
text-align: center;
}
.split-hr {
border-bottom: 1px solid #979797;
height: 12px;
min-height: 10px;
}
.title-row {
margin: 20px 10px 10px 10px;
}
.margin-top-40 {
margin-top: 40px;
}
.margin-top-20 {
margin-top: 20px;
}
.margin-bot-40 {
margin-bottom: 40px;
}
}
#pieces_justificatives {
.piece-row {
margin: 0 0 0 0;
}
}
}
}

View file

@ -29,7 +29,44 @@ h5 span {
}
}
#dossiers_list {
.filter {
cursor: pointer;
font-size: 1.1em;
display: inline;
}
}
#dossiers_list tr:hover{
background-color: #eeeeee;
cursor: pointer;
}
#procedure_list, #notifications_list {
margin-left: -10px;
margin-top: 20px;
a, a:hover {
color: #FFFFFF;
text-decoration: none;
}
.procedure_list_element.active, .notification.active {
background-color: #668ABD;
}
.procedure_list_element, .notification {
padding: 15px 40px 15px 20px;
cursor: pointer;
line-height: 1.8em;
.progress-bar-warning {
background-color: #E4594F;
}
}
.procedure_list_element:hover, .notification:hover {
background-color: #668ABD;
cursor: pointer;
}
}
.split-hr-left {
border-bottom: 1px solid #FFFFFF;
margin: 20px 10px 0px 10px;
}

View file

@ -1,18 +1,3 @@
.etapes_menu{
h3 {
margin-left: 3%;
}
padding-right: 0 !important;
}
.etapes_informations {
padding-left: 0 !important;
}
.etape{
margin-bottom: 0px;
}
.etape_2{
.etapes_menu{
#dossier_siret{

View file

@ -1,21 +1,26 @@
.max-size {
margin-left: -10rem;
margin-right: -10rem;
}
#landing {
background-image: image-url('landing_background.png');
background-attachment: fixed;
background-size: 130% auto;
background-position: top center;
background-repeat: no-repeat;
background-color: rgba(11,107,168,0.2);
h5{
color: grey;
}
.logos {
width: 150px;
}
#logo-tps {
width: 200px;
}
#title {
h1 {
font-size: 65px;
}
padding-bottom: 2%;
padding-top: 1%;
h2 {
font-size: 35px;
}
@ -23,104 +28,35 @@
.btn {
text-shadow: none;
}
color: white;
padding-top: 3%;
padding-bottom: 4%;
text-shadow: 0px 0px 10px rgb(0, 0, 0);
}
.logo img {
width: 70px;
}
}
#suite {
.row{
width: 100%;
margin-left: 0;
margin-right: 0;
}
.word {
border-bottom: solid darkgrey 1px;
.background-tps{
background-color: #668AEA;
color: white;
}
img {
padding-top: 50px;
padding-bottom: 50px;
width: 200px;
margin-left: 25%;
}
.latest_release{
margin-left: 1%
}
#landing_body{
.split-hr-left {
margin-left: auto;
margin-right: auto;
margin-top: 40px;
margin-bottom: 20px;
border-color: grey;
width: 40%;
}
.simplifier {
ul {
margin-top: 13%;
}
}
.securiser {
img {
width: 300px;
}
ul {
margin-top: 11%;
}
}
.echanger {
ul {
margin-top: 4%;
}
}
.profiter {
//border-bottom: none;
ul {
margin-top: 10%;
}
}
.news {
padding-top: 25px;
padding-bottom: 25px;
.latest_release {
.body {
margin-left: 3%;
}
}
}
.demo_account {
img {
margin-left: 0;
padding-top: 10px;
padding-bottom: 0;
}
padding-top: 25px;
padding-bottom: 25px;
.btn {
margin-top: 10%;
}
}
.documentation {
border-bottom: none;
padding-top: 15px;
padding-bottom: 15px;
a {
margin-top: 16%;
}
ul{
margin-top: 14%;
}
img {
margin-left: 0;
width: 22%;
}
#etapes, #request_access{
margin-top: 20px;
margin-bottom: 20px;
}
}

View file

@ -0,0 +1,226 @@
#left-pannel {
margin-top: 60px;
padding: 0;
background-color: #003189;
height: calc(100% - 60px);
position: fixed;
top: 0;
left: 0;
bottom: 0;
color: white;
overflow-y: scroll;
#first-block {
font-family: Arial;
font-size: 16px;
line-height: 18px;
margin-top: 20px;
.infos {
font-size: 25px;
text-align: center;
margin: 10px 10px 30px 0;
.projet-name {
font-size: 25px;
line-height: normal;
padding: 5px;
}
}
.count {
display: inline-block;
padding: 3px;
border-radius: 25px;
min-width: 40px;
text-align: center;
line-height: 23px;
}
.text {
display: inline-block;
width: 30px;
margin: 0 0 0 8px;
}
.dossiers-en-cours, .en-cours {
margin-top: 20px;
}
.dossiers-en-cours {
.count {
border: 1px solid #FFFFFF;
}
}
.nouveaux-dossiers {
.count {
background-color: #5CB85C;
}
}
.nouvelles-notifications {
.count {
background-color: #E4594F;
}
}
.dossiers-en-cours, .nouveaux-dossiers, .nouvelles-notifications, .en-cours {
margin: 5px auto 0 20px;
width: 150px;
}
}
#action-block {
text-align: center;
margin: 10px;
.action {
background-color: #E45B51;
text-align: center;
cursor: pointer;
color: #FFFFFF;
margin: 0 10px 0 0;
min-height: 40px;
padding: 5px;
font-family: Arial;
font-size: 16px;
font-weight: bold;
border: none;
width: 100%;
}
.close-dossier, .refuse-dossier, .forget-dossier {
border: 1px solid #FFFFFF;
border-radius: 25px;
margin: 5px;
margin-left: auto;
margin-right: auto;
width: 60px;
}
.close-dossier:hover, .refuse-dossier:hover, .forget-dossier:hover {
color: #000000;
border-color: #000000;
}
.close-dossier {
background-color: #2A9E2A;
}
.refuse-dossier {
background-color: #E4594F;
}
.forget-dossier {
background-color: #FF8300;
}
}
#menu-block {
#switch-buttons {
height: 30px;
line-height: 30px;
font-size: 16px;
margin-top: 20px;
margin-left: auto;
margin-right: auto;
width: 205px;
border: 1px solid;
padding: 0 0 0 10px;
border-radius: 25px;
cursor: pointer;
.active {
background-color: #668ABD !important;
cursor: default;
}
.separator {
height: 26px;
width: 1px;
display: inline-block;
background-color: #FFFFFF;
}
#switch-procedures:hover, #switch-notifications:hover {
background-color: #668AEA;
}
#switch-procedures {
height: 28px;
margin: 0 0 0 -10px;
padding-left: 10px;
width: 100px;
display: inline-block;
border-radius: 25px 0 0 25px;
}
#switch-notifications {
width: 103px;
display: inline-block;
border-radius: 0 25px 25px 0;
height: 28px;
margin: 0 0 0 -5px;
padding: 0 0 0 5px;
}
}
.split-hr {
border-bottom: 1px solid #FFFFFF;
width: 200px;
margin: 20px 0 20px 0;
}
}
#infos-block {
.split-hr {
border-bottom: 1px solid #FFFFFF;
width: 200px;
margin: 20px 0 20px 0;
}
.dossier-state {
text-align: center;
font-size: 25px;
width: 200px;
margin-top: 20px;
width: 200px;
margin-left: auto;
margin-right: auto;
}
#notifications_list {
.no-notification {
margin: 0 30px 0 30px;
}
.notification {
padding: 10px 2px 10px 15px;
.dossier, .updated-at {
display: inline-block;
color: #CCCCCC;
font-size: 12px;
text-align: left;
}
.dossier-index, .updated-at-index, .count {
display: inline-block;
color: #FFFFFF;
font-size: 14px;
text-align: left;
}
.count {
background-color: #F0AD4E;
border-radius: 25px;
padding: 0 5px 0 5px;
width: 25px;
text-align: center;
}
.type-notif {
font-size: 16px;
}
}
}
.notifications {
margin: 20px 10px 0 5px;
.fa {
font-size: 25px;
width: 100%;
margin: 0 0 15px 0;
}
.type-notif {
font-size: 16px;
float: right;
width: 30px;
}
.notification {
margin: 10px 0 10px 10px;
.type {
margin-bottom: 20px;
}
.updated-at {
color: #CCCCCC;
font-size: 12px;
text-align: left;
}
.split-hr {
width: 40px;
margin: auto;
}
}
}
}
}

View file

@ -0,0 +1,3 @@
#main-container {
float: right;
}

View file

@ -0,0 +1,210 @@
#header {
top: 0;
left: 0;
position: fixed;
width: 100%;
z-index: 10;
border-radius: 0;
height: 60px;
#title_navbar{
color: white;
font-weight: bold;
font-size: 1.8em;
z-index: 10;
overflow: hidden;
}
#title_navbar:hover{
text-decoration: none;
}
#home {
text-align: center;
box-shadow: 0 1px 2px 0 rgba(0,0,0,0.5);
background-color: #003189;
height: 60px;
.logo {
margin-top: 10px;
height: 40px;
}
#tps-title {
font-family: Arial;
font-size: 24px;
font-weight: bold;
line-height: 28px;
margin-top: 17px;
}
}
#navbar-body {
height: 60px;
background-color: #FFFFFF;
box-shadow: 0 1px 2px 0 rgba(50,50,50,0.5);
padding-left: 50px;
.main-info {
font-family: Arial;
font-size: 18px;
font-weight: bold;
line-height: 58px;
height: 58px;
color: #000000;
overflow: hidden;
text-overflow: ellipsis;
}
.options {
font-family: Arial;
font-size: 14px;
text-align: right;
line-height: 22px;
color: #666666;
padding: 8px;
border-right: 1px solid #C8C6C8;
height: 60px;
.dropdown-toggle {
cursor: pointer;
}
.dropdown-pannel {
min-height: 100px;
width: 400px;
padding-left: 10px;
}
.centered-option {
line-height: 40px;
height: 40px;
}
.caret-right {
border-bottom: 4px solid transparent;
border-top: 4px solid transparent;
border-left: 4px solid;
display: inline-block;
height: 0;
margin: 8px 2px 0 5px;
vertical-align: top;
width: 0;
}
}
#sign_in{
margin-top: 7px;
.btn {
color: #003C92;
float: right;
margin-right: 1.3em;
}
.btn:hover {
color: #668ABD;
}
}
#sign_out{
height: 60px;
.fa {
color: #003C92;
float: right;
width: 70px;
margin-top: 2%;
margin-right: 0.5em;
font-size: 40px;
}
.fa:hover {
color: #668ABD;
}
}
}
}
#download-menu {
.btn-sm {
color: #000000;
font-size: 14px;
}
}
.btn-nav {
color: white;
background-color: transparent;
margin-top: 6px;
height: 36px;
}
.btn-nav:hover {
background-color: #eeeeee;
border-color: #eeeeee #eeeeee #ddd;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
.btn-nav.text-info:hover {
color: #23527c;
}
.btn-nav.text-success:hover {
color: #3c763d;
}
.btn-nav.text-danger:hover {
color: #a94442;
}
.navbar {
border: 0 !important;
.sign_in_FC {
margin-top: -18px;
height: 70px;
}
}
#beta {
text-align: center;
text-transform: uppercase;
position: fixed;
bottom: 26px;
right: -35px;
-webkit-transform: rotate(-45deg);
transform: rotate(-45deg);
width: 150px;
background-color: #008cba;
color: #fff;
padding: 5px;
font-size: 15px;
font-weight: 700;
z-index: 10;
}
.button_navbar {
color: #666666;
cursor: pointer;
}
.button-navbar-action {
background-color: #E4594F;
color: #FFFFFF;
cursor: pointer;
display: block;
width: 150px;
text-align: center;
padding: 2px;
float: right;
.fa {
font-size: 20px;
margin-right: 10px;
}
}
.button-navbar-action:hover {
color: #F2F6FA;
}
.button_navbar:hover, .button-navbar-action:hover {
text-decoration: none;
}
#credentials {
display: none;
width: initial;
padding: 10px;
left: -130px;
text-align: center;
.description {
font-weight: bold;
font-size: 20px;
}
}

View file

@ -0,0 +1,12 @@
#notification_alert {
position: fixed;
top: 20px;
right: -250px;
z-index: 1000;
width: 250px;
height: 80px;
border: solid black 1px;
}

View file

@ -11,7 +11,7 @@
width: 470px;
height: calc(100% - 25px);
padding: 15px;
overflow: scroll;
overflow-y: scroll;
}
.open_pref_list {

View file

@ -1,13 +1,3 @@
#infos_dossier{
background-color:rgba(248,248,255,0.8);
padding-left:13%;
padding-right:13%;
padding-bottom:20px;
padding-top:15px;
margin-left:-10rem;
margin-right:-10rem;
}
#UploadPJmodal {
text-align: left;

View file

@ -0,0 +1,19 @@
#search-block{
margin: 15px 10px 0 10px;
height: 30px;
}
#search_button {
height: 34px;
}
#mask_search{
display: none;
position: fixed;
background-color: rgba(0, 0, 0, 0.4);
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 200;
}

View file

@ -0,0 +1,15 @@
#support_navigator_banner{
position: fixed;
text-align:center;
line-height: 2em;
color: white;
background-color: #990000;
width: 100%;
margin: 0;
bottom: 0;
left: 0;
z-index: 1000;
a{
color: #c3d9ff;
}
}

View file

@ -0,0 +1,6 @@
#switch_menu{
position: fixed;
left: 10px;
bottom: 10px;
z-index: 300;
}

View file

@ -0,0 +1,59 @@
#users_index, #admins_index{
margin-left: 2rem;
margin-right: 2rem;
.default_data_block {
margin-top: 20px;
background-color: #FFFFFF;
.show-block {
width: 100%;
}
.body {
height: auto;
}
}
}
#users_siret_index {
margin: 20px;
}
#description_page {
}
#carto_page {
margin: 20px;
}
.white-back {
margin: 20px !important;
#previsualisation {
margin-top: 30px;
}
}
.white-back, #users_siret_index, #description_page, #carto_page {
background-color: #FFFFFF;
box-shadow: 0 0 1px 0 rgba(0, 0, 0, 0.5);
padding: 20px;
.action {
background-color: #E45B51;
text-align: center;
line-height: 40px;
font-size: 15px;
text-decoration: none;
color: #FFFFFF;
text-transform: uppercase;
border: none;
padding: 10px;
}
.action:hover {
color: #F2F6FA;
}
.padding-left-30 {
padding-left: 30px;
}
h3 {
margin-bottom: 20px;
}
}

View file

@ -0,0 +1,5 @@
# Be sure to restart your server when you modify this file. Action Cable runs in a loop that does not support auto reloading.
module ApplicationCable
class Channel < ActionCable::Channel::Base
end
end

View file

@ -0,0 +1,5 @@
# Be sure to restart your server when you modify this file. Action Cable runs in a loop that does not support auto reloading.
module ApplicationCable
class Connection < ActionCable::Connection::Base
end
end

View file

@ -0,0 +1,5 @@
class NotificationsChannel < ApplicationCable::Channel
def subscribed
stream_from 'notifications'
end
end

View file

@ -21,7 +21,7 @@ class Admin::GestionnairesController < AdminController
assign_gestionnaire!
end
if procedure_id
if procedure_id.present?
redirect_to admin_procedure_accompagnateurs_path(procedure_id: procedure_id)
else
redirect_to admin_gestionnaires_path
@ -44,7 +44,7 @@ class Admin::GestionnairesController < AdminController
))
if @gestionnaire.errors.messages.empty?
User.create(attributes) if Features.unified_login
User.create(attributes)
flash.notice = 'Accompagnateur ajouté'
GestionnaireMailer.new_gestionnaire(@gestionnaire.email, @gestionnaire.password).deliver_now!
GestionnaireMailer.new_assignement(@gestionnaire.email, current_administrateur.email).deliver_now!

View file

@ -9,5 +9,10 @@ class Admin::PrevisualisationsController < AdminController
@dossier.build_default_champs
@champs = @dossier.ordered_champs
@headers = @champs.inject([]) do |acc, champ|
acc.push(champ) if champ.type_champ == 'header_section'
acc
end
end
end

View file

@ -105,6 +105,7 @@ class Admin::ProceduresController < AdminController
if procedure_path
if procedure_path.administrateur_id == current_administrateur.id
procedure_path.procedure.archive
procedure_path.delete
else
@mine = false
return render '/admin/procedures/publish', formats: 'js'

View file

@ -2,12 +2,12 @@ class Administrateurs::SessionsController < Sessions::SessionsController
def demo
return redirect_to root_path if Rails.env.production?
@administrateur = Administrateur.new(email: 'admin@tps.fr', password: 'password')
render 'new'
@user = User.new(email: DemoEmails[:admin], password: 'password')
render 'users/sessions/new'
end
def new
@administrateur = Administrateur.new
redirect_to new_user_session_path
end
def create

View file

@ -15,10 +15,6 @@ class AdministrationsController < ApplicationController
end
def show
@admin = Administrateur.find(params[:id])
end
def create
admin = Administrateur.new create_administrateur_params

View file

@ -16,7 +16,8 @@ class API::V1::DossiersController < APIController
def index
procedure = current_administrateur.procedures.find(params[:procedure_id])
dossiers = procedure.dossiers.where.not(state: :draft).paginate(page: params[:page])
render json: dossiers, each_serializer: DossiersSerializer, meta: pagination(dossiers), meta_key: 'pagination', status: 200
render json: {dossiers: dossiers.map{|dossier| DossiersSerializer.new(dossier)}, pagination: pagination(dossiers)}, status: 200
rescue ActiveRecord::RecordNotFound => e
render json: {}, status: 404
end
@ -39,9 +40,10 @@ class API::V1::DossiersController < APIController
def show
procedure = current_administrateur.procedures.find(params[:procedure_id])
dossier = procedure.dossiers.find(params[:id])
respond_to do |format|
format.json { render json: dossier, status: 200 }
format.csv { render csv: dossier, status: 200 }
format.json { render json: {dossier: DossierSerializer.new(dossier).as_json}, status: 200 }
format.csv { render csv: dossier.as_csv, status: 200 }
end
rescue ActiveRecord::RecordNotFound => e
render json: {}, status: 404

View file

@ -14,9 +14,9 @@ class API::V1::ProceduresController < APIController
}
def show
@procedure = current_administrateur.procedures.find(params[:id]).decorate
procedure = current_administrateur.procedures.find(params[:id]).decorate
render json: @procedure
render json: {procedure: ProcedureSerializer.new(procedure).as_json}
rescue ActiveRecord::RecordNotFound => e
Rails.logger.error(e.message)
render json: {}, status: 404

View file

@ -1,6 +1,6 @@
class APIController < ApplicationController
before_action :authenticate_user
before_filter :default_format_json
before_action :default_format_json
def authenticate_user
render json: {}, status: 401 unless valid_token?

View file

@ -2,14 +2,24 @@ class ApplicationController < ActionController::Base
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
protect_from_forgery with: :exception
before_filter :check_browser
before_action :check_browser
before_action :load_navbar_left_pannel_partial_url
def default_url_options
return { protocol: 'https' } if Rails.env.staging? || Rails.env.production?
return {protocol: 'https'} if Rails.env.staging? || Rails.env.production?
{}
end
def check_browser
BROWSER.value = Browser.new(request.user_agent)
BROWSER.value = BrowserService.get_browser(request)
end
def load_navbar_left_pannel_partial_url
controller = request.controller_class
method = params[:action]
service = RenderPartialService.new(controller, method)
@navbar_url = service.navbar
@left_pannel_url = service.left_panel
@facade_data_view = nil
end
end

View file

@ -7,14 +7,14 @@ class Backoffice::Dossiers::ProcedureController < Backoffice::DossiersListContro
render 'backoffice/dossiers/index'
rescue ActiveRecord::RecordNotFound
flash[:alert] = "Cette procédure n'existe pas ou vous n'y avez pas accès."
flash.alert = "Cette procédure n'existe pas ou vous n'y avez pas accès."
redirect_to backoffice_dossiers_path
end
def filter
super
redirect_to backoffice_dossiers_procedure_path(id: params[:id], liste: param_liste)
redirect_to backoffice_dossiers_procedure_path(id: params[:id])
end
private

View file

@ -2,14 +2,34 @@ class Backoffice::DossiersController < Backoffice::DossiersListController
respond_to :html, :xlsx, :ods, :csv
def index
super
procedure = current_gestionnaire.procedure_filter
dossiers_list_facade.service.filter_procedure_reset!
if procedure.nil?
procedure_list = dossiers_list_facade.gestionnaire_procedures_name_and_id_list
if procedure_list.count == 0
flash.alert = "Vous n'avez aucune procédure d'affectée."
return redirect_to root_path
end
procedure = procedure_list.first[:id]
end
redirect_to backoffice_dossiers_procedure_path(id: procedure)
end
def show
create_dossier_facade params[:id]
@champs = @facade.champs_private unless @facade.nil?
unless @facade.nil?
@champs_private = @facade.champs_private
@headers_private = @champs_private.inject([]) do |acc, champ|
acc.push(champ) if champ.type_champ == 'header_section'
acc
end
end
Notification.where(dossier_id: params[:id].to_i).update_all already_read: true
end
def filter
@ -26,8 +46,8 @@ class Backoffice::DossiersController < Backoffice::DossiersListController
dossiers = dossiers_list_facade(param_liste).dossiers_to_display
respond_to do |format|
format.xlsx { render xlsx: dossiers }
format.ods { render ods: dossiers }
format.csv { render csv: dossiers }
format.ods { render ods: dossiers }
format.csv { render csv: dossiers }
end
end
end
@ -36,20 +56,30 @@ class Backoffice::DossiersController < Backoffice::DossiersListController
@search_terms = params[:q]
# exact id match?
@dossier = Dossier.where(id: @search_terms)
@dossiers = Dossier.where(id: @search_terms.to_i) if @search_terms.to_i < 2147483647
@dossiers = Dossier.none if @dossiers.nil?
# full text search
unless @dossier.any?
@dossier ||= Search.new(
gestionnaire: current_gestionnaire,
query: @search_terms,
page: params[:page]
unless @dossiers.any?
@dossiers = Search.new(
gestionnaire: current_gestionnaire,
query: @search_terms,
page: params[:page]
).results
end
smartlisting_dossier @dossier, 'search'
smart_listing_create :search,
@dossiers,
partial: "backoffice/dossiers/list",
array: true,
default_sort: dossiers_list_facade.service.default_sort
rescue RuntimeError
smartlisting_dossier [], 'search'
smart_listing_create :search,
[],
partial: "backoffice/dossiers/list",
array: true,
default_sort: dossiers_list_facade.service.default_sort
end
def valid
@ -60,7 +90,7 @@ class Backoffice::DossiersController < Backoffice::DossiersListController
NotificationMailer.dossier_validated(@facade.dossier).deliver_now!
render 'show'
redirect_to backoffice_dossier_path(id: @facade.dossier.id)
end
def receive
@ -71,7 +101,7 @@ class Backoffice::DossiersController < Backoffice::DossiersListController
NotificationMailer.dossier_received(@facade.dossier).deliver_now!
render 'show'
redirect_to backoffice_dossier_path(id: @facade.dossier.id)
end
def refuse
@ -82,7 +112,7 @@ class Backoffice::DossiersController < Backoffice::DossiersListController
NotificationMailer.dossier_refused(@facade.dossier).deliver_now!
render 'show'
redirect_to backoffice_dossier_path(id: @facade.dossier.id)
end
def without_continuation
@ -93,7 +123,7 @@ class Backoffice::DossiersController < Backoffice::DossiersListController
NotificationMailer.dossier_without_continuation(@facade.dossier).deliver_now!
render 'show'
redirect_to backoffice_dossier_path(id: @facade.dossier.id)
end
def close
@ -104,7 +134,7 @@ class Backoffice::DossiersController < Backoffice::DossiersListController
NotificationMailer.dossier_closed(@facade.dossier).deliver_now!
render 'show'
redirect_to backoffice_dossier_path(id: @facade.dossier.id)
end
def follow
@ -123,7 +153,6 @@ class Backoffice::DossiersController < Backoffice::DossiersListController
@liste = cookies[:liste] || 'a_traiter'
end
dossiers_list_facade @liste
smartlisting_dossier
render 'backoffice/dossiers/index', formats: :js

View file

@ -9,7 +9,6 @@ class Backoffice::DossiersListController < ApplicationController
unless DossiersListGestionnaireService.dossiers_liste_libelle.include?(param_liste)
cookies[:liste] = 'a_traiter'
return redirect_to backoffice_dossiers_path
end
dossiers_list_facade param_liste
@ -25,22 +24,37 @@ class Backoffice::DossiersListController < ApplicationController
end
def dossiers_list_facade liste='a_traiter'
@dossiers_list_facade ||= DossiersListFacades.new current_gestionnaire, liste, retrieve_procedure
@facade_data_view ||= DossiersListFacades.new current_gestionnaire, liste, retrieve_procedure
end
def smartlisting_dossier dossiers_list=nil, liste='a_traiter'
dossiers_list_facade liste
dossiers_list = dossiers_list_facade.dossiers_to_display if dossiers_list.nil?
new_dossiers_list = dossiers_list_facade.service.nouveaux
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
@dossiers = smart_listing_create :dossiers,
dossiers_list,
partial: "backoffice/dossiers/list",
array: true,
default_sort: dossiers_list_facade.service.default_sort
smart_listing_create :new_dossiers,
new_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
private

View file

@ -1,4 +1,4 @@
class Backoffice::PreferenceListDossierController < ApplicationController
class Backoffice::PreferenceListDossierController < Backoffice::DossiersListController
include SmartListing::Helper::ControllerExtensions
helper SmartListing::Helper
@ -22,7 +22,7 @@ class Backoffice::PreferenceListDossierController < ApplicationController
end
def reload_pref_list
@dossiers_list_facade = DossiersListFacades.new current_gestionnaire, '', retrieve_procedure
dossiers_list_facade
render partial: 'backoffice/dossiers/pref_list', id: params_procedure_id
end

View file

@ -1,9 +1,9 @@
class CommentairesController < ApplicationController
def index
@facade = DossierFacades.new(
params[:dossier_id],
(current_gestionnaire || current_user).email,
params[:champs_id]
params[:dossier_id],
(current_gestionnaire || current_user).email,
params[:champs_id]
)
render layout: false
rescue ActiveRecord::RecordNotFound
@ -36,7 +36,11 @@ class CommentairesController < ApplicationController
@commentaire.body = params['texte_commentaire']
saved = false
saved = @commentaire.save unless flash.alert
unless @commentaire.body.blank? && @commentaire.piece_justificative.nil?
saved = @commentaire.save unless flash.alert
else
flash.alert = "Veuillez rédiger un message ou ajouter une pièce jointe."
end
if is_gestionnaire?
unless current_gestionnaire.follow? @commentaire.dossier
@ -44,12 +48,15 @@ class CommentairesController < ApplicationController
end
NotificationMailer.new_answer(@commentaire.dossier).deliver_now! if saved
redirect_to url_for(controller: 'backoffice/dossiers', action: :show, id: params['dossier_id'])
elsif current_user.email != @commentaire.dossier.user.email
invite = Invite.where(dossier: @commentaire.dossier, user: current_user).first
redirect_to url_for(controller: 'users/dossiers/invites', action: :show, id: invite.id)
else
redirect_to url_for(controller: :recapitulatif, action: :show, dossier_id: params['dossier_id'])
if current_user.email != @commentaire.dossier.user.email
invite = Invite.where(dossier: @commentaire.dossier, user: current_user).first
redirect_to url_for(controller: 'users/dossiers/invites', action: :show, id: invite.id)
else
redirect_to url_for(controller: :recapitulatif, action: :show, dossier_id: params['dossier_id'])
end
end
end

View file

@ -83,7 +83,8 @@ class FranceConnect::ParticulierController < ApplicationController
unless user.valid?
flash.alert = 'Email non valide'
return redirect_to france_connect_particulier_new_path fci_id: params[:fci_id], salt: params[:salt], user: params[:user]
return redirect_to france_connect_particulier_new_path fci_id: params[:fci_id], salt: params[:salt], user: {email_france_connect: params[:user]['email_france_connect']}
end
user.save

View file

@ -1,5 +1,6 @@
class Gestionnaires::PasswordsController < Devise::PasswordsController
after_action :try_to_authenticate_user, only: %i(update)
after_action :try_to_authenticate_administrateur, only: %i(update)
# GET /resource/password/new
# def new
@ -38,4 +39,11 @@ class Gestionnaires::PasswordsController < Devise::PasswordsController
sign_in user if user
end
end
def try_to_authenticate_administrateur
if gestionnaire_signed_in?
administrateur = Administrateur.find_by(email: current_gestionnaire.email)
sign_in administrateur if administrateur
end
end
end

View file

@ -2,12 +2,12 @@ class Gestionnaires::SessionsController < Sessions::SessionsController
def demo
return redirect_to root_path if Rails.env.production?
@gestionnaire = Gestionnaire.new(email: 'gestionnaire@apientreprise.fr', password: 'password')
render 'new'
@user = User.new(email: DemoEmails[:gestionnaire], password: 'password')
render 'users/sessions/new'
end
def new
@gestionnaire = Gestionnaire.new
redirect_to new_user_session_path
end
def create

View file

@ -1,22 +1,37 @@
class RootController < ApplicationController
def index
route = Rails.application.routes.recognize_path(request.referrer)
if user_signed_in?
redirect_to users_dossiers_path
if user_signed_in? && !route[:controller].match('users').nil?
return redirect_to users_dossiers_path
elsif administrateur_signed_in? && !route[:controller].match('admin').nil?
return redirect_to admin_procedures_path
elsif gestionnaire_signed_in?
redirect_to backoffice_dossiers_path
procedure_id = current_gestionnaire.procedure_filter
if procedure_id.nil?
procedure_list = current_gestionnaire.procedures
if procedure_list.count > 0
return redirect_to backoffice_dossiers_procedure_path(id: procedure_list.first.id)
else
flash.alert = "Vous n'avez aucune procédure d'affectée"
end
else
return redirect_to backoffice_dossiers_procedure_path(id: procedure_id)
end
elsif user_signed_in?
return redirect_to users_dossiers_path
elsif administrateur_signed_in?
redirect_to admin_procedures_path
return redirect_to admin_procedures_path
elsif administration_signed_in?
redirect_to administrations_path
else
# @latest_release = Github::Releases.latest
@latest_release = nil
render 'landing'
return redirect_to administrations_path
end
render 'landing'
end
end

View file

@ -32,7 +32,8 @@ class Users::CarteController < UsersController
end
def get_position
point = Carto::Geocodeur.convert_adresse_to_point(current_user_dossier.etablissement.geo_adresse)
etablissement = current_user_dossier.etablissement
point = Carto::Geocodeur.convert_adresse_to_point(etablissement.geo_adresse) unless etablissement.nil?
lon = '2.428462'
lat = '46.538192'

View file

@ -1,28 +0,0 @@
class Users::ConfirmationsController < Devise::ConfirmationsController
# GET /resource/confirmation/new
# def new
# super
# end
# POST /resource/confirmation
# def create
# super
# end
# GET /resource/confirmation?confirmation_token=abcdef
# def show
# super
# end
# protected
# The path used after resending confirmation instructions.
# def after_resending_confirmation_instructions_path_for(resource_name)
# super(resource_name)
# end
# The path used after confirmation.
# def after_confirmation_path_for(resource_name, resource)
# super(resource_name, resource)
# end
end

View file

@ -12,16 +12,21 @@ class Users::DescriptionController < UsersController
@procedure = @dossier.procedure
@champs = @dossier.ordered_champs
@headers = @champs.inject([]) do |acc, champ|
acc.push(champ) if champ.type_champ == 'header_section'
acc
end
rescue ActiveRecord::RecordNotFound
flash.alert = t('errors.messages.dossier_not_found')
redirect_to url_for(root_path)
end
def error
show
flash.now.alert = 'Un ou plusieurs attributs obligatoires sont manquants ou incorrects.'
render 'show'
end
# def error
# show
# flash.now.alert = 'Un ou plusieurs attributs obligatoires sont manquants ou incorrects.'
# render 'show'
# end
def create
@dossier = current_user_dossier
@ -34,16 +39,16 @@ class Users::DescriptionController < UsersController
unless @dossier.update_attributes(create_params)
@dossier = @dossier.decorate
flash.now.alert = @dossier.errors.full_messages.join('<br />').html_safe
return render 'show'
flash.alert = @dossier.errors.full_messages.join('<br />').html_safe
return redirect_to users_dossier_description_path(dossier_id: @dossier.id)
end
unless params[:champs].nil?
champs_service_errors = ChampsService.save_formulaire @dossier.champs, params, mandatory
unless champs_service_errors.empty?
flash.now.alert = (champs_service_errors.inject('') { |acc, error| acc+= error[:message]+'<br>' }).html_safe
return render 'show'
flash.alert = (champs_service_errors.inject('') { |acc, error| acc+= error[:message]+'<br>' }).html_safe
return redirect_to users_dossier_description_path(dossier_id: @dossier.id)
end
end
@ -51,15 +56,15 @@ class Users::DescriptionController < UsersController
unless params[:cerfa_pdf].nil?
cerfa = Cerfa.new(content: params[:cerfa_pdf], dossier: @dossier, user: current_user)
unless cerfa.save
flash.now.alert = cerfa.errors.full_messages.join('<br />').html_safe
return render 'show'
flash.alert = cerfa.errors.full_messages.join('<br />').html_safe
return redirect_to users_dossier_description_path(dossier_id: @dossier.id)
end
end
end
unless (errors_upload = PiecesJustificativesService.upload!(@dossier, current_user, params)).empty?
flash.alert = errors_upload.html_safe
return render 'show'
return redirect_to users_dossier_description_path(dossier_id: @dossier.id)
end

View file

@ -27,7 +27,7 @@ class Users::DossiersController < UsersController
def commencer
unless params[:procedure_path].nil?
procedure = ProcedurePath.where(path: params[:procedure_path]).first!.procedure
procedure = ProcedurePath.where(path: params[:procedure_path]).last.procedure
end
if procedure.archived?
@ -115,12 +115,12 @@ class Users::DossiersController < UsersController
@facade = facade params[:dossier][:id]
if checked_autorisation_donnees?
begin
@facade.dossier.update_attributes!(update_params)
rescue
flash.now.alert = @facade.dossier.errors.full_messages.join('<br />').html_safe
return render 'show'
unless Dossier.find(@facade.dossier.id).update_attributes update_params
flash.alert = @facade.dossier.errors.full_messages.join('<br />').html_safe
return redirect_to users_dossier_path(id: @facade.dossier.id)
end
if @facade.dossier.procedure.module_api_carto.use_api_carto
redirect_to url_for(controller: :carte, action: :show, dossier_id: @facade.dossier.id)
else

View file

@ -1,5 +1,6 @@
class Users::PasswordsController < Devise::PasswordsController
after_action :try_to_authenticate_gestionnaire, only: %i(update)
after_action :try_to_authenticate_administrateur, only: %i(update)
# GET /resource/password/new
# def new
@ -38,4 +39,11 @@ class Users::PasswordsController < Devise::PasswordsController
sign_in gestionnaire if gestionnaire
end
end
def try_to_authenticate_administrateur
if user_signed_in?
administrateur = Administrateur.find_by(email: current_user.email)
sign_in administrateur if administrateur
end
end
end

View file

@ -14,7 +14,7 @@ class Users::RecapitulatifController < UsersController
@facade.dossier.next_step! 'user', 'initiate'
flash.notice = 'Dossier soumis avec succès.'
render 'show'
redirect_to users_dossier_recapitulatif_path
end
def submit
@ -23,12 +23,12 @@ class Users::RecapitulatifController < UsersController
@facade.dossier.submit!
flash.notice = 'Dossier déposé avec succès.'
render 'show'
redirect_to users_dossier_recapitulatif_path
end
def self.route_authorization
{
states: [:initiated, :replied, :updated, :validated, :received, :submitted, :without_continuation, :closed]
states: [:initiated, :replied, :updated, :validated, :received, :submitted, :without_continuation, :closed, :refused]
}
end

View file

@ -1,6 +1,6 @@
class Users::RegistrationsController < Devise::RegistrationsController
# before_filter :configure_sign_up_params, only: [:create]
# before_filter :configure_account_update_params, only: [:update]
# before_action :configure_sign_up_params, only: [:create]
# before_action :configure_account_update_params, only: [:update]
def after_sign_up_path_for(resource_or_scope)
WelcomeMailer.welcome_email(resource_or_scope).deliver_now!
@ -69,6 +69,6 @@ class Users::RegistrationsController < Devise::RegistrationsController
def check_invite! user
Invite.where(email: user.email)
.each { |invite| invite.update_attribute(:user, user) }
.each { |invite| invite.update user: user }
end
end

View file

@ -1,11 +1,10 @@
class Users::SessionsController < Sessions::SessionsController
# before_filter :configure_sign_in_params, only: [:create]
# before_action :configure_sign_in_params, only: [:create]
def demo
return redirect_to root_path if Rails.env.production?
@user = User.new(email: 'demo@tps.fr', password: 'password')
@user = User.new(email: DemoEmails[:user], password: 'password')
render 'new'
end
@ -23,7 +22,8 @@ class Users::SessionsController < Sessions::SessionsController
#POST /resource/sign_in
def create
try_to_authenticate(User)
try_to_authenticate(Gestionnaire) if Features.unified_login
try_to_authenticate(Gestionnaire)
try_to_authenticate(Administrateur)
if user_signed_in?
current_user.update_attributes(loged_in_with_france_connect: '')
@ -33,7 +33,10 @@ class Users::SessionsController < Sessions::SessionsController
redirect_to after_sign_in_path_for(:user)
elsif gestionnaire_signed_in?
redirect_to backoffice_path
elsif administrateur_signed_in?
redirect_to admin_path
else
flash.alert = 'Mauvais couple login / mot de passe'
new
render :new, status: 401
end
@ -41,9 +44,8 @@ class Users::SessionsController < Sessions::SessionsController
# DELETE /resource/sign_out
def destroy
if gestionnaire_signed_in?
sign_out :gestionnaire
end
sign_out :gestionnaire if gestionnaire_signed_in?
sign_out :administrateur if administrateur_signed_in?
if user_signed_in?
connected_with_france_connect = current_user.loged_in_with_france_connect

View file

@ -1,28 +0,0 @@
class Users::UnlocksController < Devise::UnlocksController
# GET /resource/unlock/new
# def new
# super
# end
# POST /resource/unlock
# def create
# super
# end
# GET /resource/unlock?unlock_token=abcdef
# def show
# super
# end
# protected
# The path used after sending unlock password instructions
# def after_sending_unlock_instructions_path_for(resource)
# super(resource)
# end
# The path used after unlocking the resource
# def after_unlock_path_for(resource)
# super(resource)
# end
end

View file

@ -1,4 +1,5 @@
class ChampDecorator < Draper::Decorator
delegate_all
def value
if type_champ == 'checkbox'
@ -6,8 +7,4 @@ class ChampDecorator < Draper::Decorator
end
object.value
end
def type_champ
object.type_de_champ.type_champ
end
end

View file

@ -3,7 +3,5 @@ class CommentaireDecorator < Draper::Decorator
def created_at_fr
created_at.localtime.strftime('%d/%m/%Y - %H:%M')
rescue
'dd/mm/YYYY - HH:MM'
end
end

View file

@ -2,12 +2,6 @@ class DossierDecorator < Draper::Decorator
delegate :current_page, :per_page, :offset, :total_entries, :total_pages
delegate_all
def display_date
date_previsionnelle.localtime.strftime('%d/%m/%Y')
rescue
'dd/mm/YYYY'
end
def first_creation
created_at.localtime.strftime('%d/%m/%Y %H:%M')
end
@ -20,16 +14,6 @@ class DossierDecorator < Draper::Decorator
DossierDecorator.case_state_fr state
end
def class_qp_active
'qp' if procedure.module_api_carto.quartiers_prioritaires
end
def state_color_class
return 'text-danger' if waiting_for_gestionnaire?
return 'text-info' if waiting_for_user?
return 'text-success' if termine?
end
def self.case_state_fr state=self.state
h.t("activerecord.attributes.dossier.state.#{state}")
end

View file

@ -1,15 +1,4 @@
class DossiersDecorator < Draper::CollectionDecorator
delegate :current_page, :per_page, :offset, :total_entries, :total_pages
def active_class_a_traiter page
'active' if page == 'a_traiter'
end
def active_class_en_attente page
'active' if page == 'en_attente'
end
def active_class_termine page
'active' if page == 'termine'
end
end

View file

@ -0,0 +1,8 @@
class NotificationDecorator < Draper::Decorator
delegate_all
def index_display
['champs', 'piece_justificative'].include?(type_notif) ? type = liste.join(" ") : type = liste.last
{ dossier: "Dossier n°#{dossier.id}", date: created_at.strftime('%d/%m %H:%M'), type: type }
end
end

View file

@ -3,7 +3,6 @@ class DossierFacades
#TODO rechercher en fonction de la personne/email
def initialize(dossier_id, email, champ_id = nil)
@dossier = Dossier.where(archived: false).find(dossier_id)
@email = email
@champ_id = champ_id
end
@ -11,6 +10,10 @@ class DossierFacades
@dossier.decorate
end
def last_notifications
@dossier.notifications.order("updated_at DESC").limit(5)
end
def champs
@dossier.ordered_champs
end
@ -27,6 +30,10 @@ class DossierFacades
@dossier.ordered_pieces_justificatives
end
def types_de_pieces_justificatives
@dossier.types_de_piece_justificative.order('order_place ASC')
end
def champ_id
@champ_id
end
@ -35,10 +42,6 @@ class DossierFacades
@dossier.ordered_commentaires.where(champ_id: @champ_id).decorate
end
def commentaire_email
@email
end
def procedure
@dossier.procedure
end

View file

@ -1,6 +1,8 @@
class DossiersListFacades
include Rails.application.routes.url_helpers
attr_accessor :procedure, :current_devise_profil, :liste
def initialize current_devise_profil, liste, procedure = nil
@current_devise_profil = current_devise_profil
@liste = liste
@ -16,12 +18,28 @@ class DossiersListFacades
end
end
def liste
@liste
def total_dossier
current_devise_profil.dossiers.where(archived: false).count
end
def total_new_dossier
current_devise_profil.dossiers.where(state: :initiated, archived: false).count
end
def new_dossier_number procedure_id
current_devise_profil.dossiers.where(state: :initiated, archived: false, procedure_id: procedure_id).count
end
def gestionnaire_procedures_name_and_id_list
@current_devise_profil.procedures.order('libelle ASC').inject([]) { |acc, procedure| acc.push({id: procedure.id, libelle: procedure.libelle}) }
@current_devise_profil.procedures.order('libelle ASC').inject([]) { |acc, procedure| acc.push({id: procedure.id, libelle: procedure.libelle, unread_notifications: @current_devise_profil.dossier_with_notification_for(procedure)}) }
end
def unread_notifications
current_devise_profil.notifications
end
def dossiers_with_unread_notifications
(unread_notifications.inject([]) { |acc, notif| acc.push(notif.dossier) }).uniq
end
def procedure_id
@ -42,34 +60,18 @@ class DossiersListFacades
preference_list_dossiers_filter.where(table: :champs).where.not(filter: '').size == 0
end
def all_state_class
(@liste == 'all_state' ? 'active' : '')
end
def brouillon_class
(@liste == 'brouillon' ? 'active' : '')
end
def nouveaux_class
(@liste == 'nouveaux' ? 'active' : '')
end
def a_traiter_class
(@liste == 'a_traiter' ? 'active' : '')
end
def en_construction_class
(@liste == 'a_traiter' ? 'active' : '')
end
def fige_class
(@liste == 'fige' ? 'active' : '')
end
def en_attente_class
(@liste == 'en_attente' ? 'active' : '')
end
def deposes_class
(@liste == 'deposes' ? 'active' : '')
end
def valides_class
(@liste == 'valides' ? 'active' : '')
end
@ -78,24 +80,16 @@ class DossiersListFacades
(@liste == 'en_instruction' ? 'active' : '')
end
def a_instruire_class
(@liste == 'a_instruire' ? 'active' : '')
end
def termine_class
(@liste == 'termine' ? 'active' : '')
end
def suivi_class
(@liste == 'suivi' ? 'active' : '')
end
def invite_class
(@liste == 'invite' ? 'active' : '')
end
def search_class
(@liste == 'search' ? 'active' : '')
def all_state_total
service.all_state.count
end
def brouillon_total
@ -106,38 +100,18 @@ class DossiersListFacades
service.nouveaux.count
end
def a_traiter_total
service.ouvert.count
end
def en_construction_total
service.en_construction.count
end
def fige_total
service.fige.count
end
def en_attente_total
service.waiting_for_user.count
end
def valides_total
service.valides.count
end
def deposes_total
service.deposes.count
end
def en_instruction_total
service.en_instruction.count
end
def a_instruire_total
service.a_instruire.count
end
def termine_total
service.termine.count
end
@ -150,42 +124,6 @@ class DossiersListFacades
service.invite.count
end
def brouillon_url
base_url 'brouillon'
end
def nouveaux_url
base_url 'nouveaux'
end
def a_traiter_url
base_url 'a_traiter'
end
def en_construction_url
base_url 'a_traiter'
end
def fige_url
base_url 'fige'
end
def en_attente_url
base_url 'en_attente'
end
def deposes_url
base_url 'deposes'
end
def a_instruire_url
base_url 'a_instruire'
end
def termine_url
base_url 'termine'
end
def filter_url
@procedure.nil? ? backoffice_dossiers_filter_path(liste: liste) : backoffice_dossiers_procedure_filter_path(id: @procedure.id, liste: liste)
end

View file

@ -2,8 +2,6 @@ class InviteDossierFacades < DossierFacades
#TODO rechercher en fonction de la personne/email
def initialize dossier_id, email
@dossier = (Invite.where(email: email).find(dossier_id)).dossier
@email = email
@dossier = Invite.where(email: email, dossier_id: dossier_id).first!.dossier
end
end

View file

@ -0,0 +1,2 @@
class ApplicationJob < ActiveJob::Base
end

View file

@ -11,7 +11,15 @@ module Carto
end
def self.pays
File.open('lib/carto/geo_api/pays.json').read
File.open('app/lib/carto/geo_api/pays.json').read
end
def self.departements_url
'https://geo.api.gouv.fr/departements'
end
def self.regions_url
'https://geo.api.gouv.fr/regions'
end
private
@ -22,13 +30,6 @@ module Carto
nil
end
def self.departements_url
'https://geo.api.gouv.fr/departements'
end
def self.regions_url
'https://geo.api.gouv.fr/regions'
end
end
end
end

View file

@ -21,6 +21,9 @@ class CARTO::SGMAP::API
url,
verify_ssl: verify_ssl_mode,
).post params[:geojson], content_type: 'application/json'
rescue RestClient::InternalServerError
raise RestClient::ResourceNotFound
end
def self.base_url

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