Merge branch 'staging'
This commit is contained in:
commit
a6708ce1f0
411 changed files with 2720 additions and 2129 deletions
70
.circleci/config.yml
Normal file
70
.circleci/config.yml
Normal file
|
@ -0,0 +1,70 @@
|
||||||
|
version: 2
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
docker:
|
||||||
|
- image: ruby:2.3.1
|
||||||
|
- image: postgres:9.4.1
|
||||||
|
environment:
|
||||||
|
POSTGRES_USER: tps_test
|
||||||
|
POSTGRES_PASSWORD: tps_test
|
||||||
|
POSTGRES_DB: tps_test
|
||||||
|
|
||||||
|
working_directory: /tps
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- run:
|
||||||
|
name: Install System Dependencies
|
||||||
|
command: apt-get update -qq && apt-get install -y build-essential nodejs
|
||||||
|
- restore_cache:
|
||||||
|
key: bundle-install-v3-{{ checksum "Gemfile.lock" }}
|
||||||
|
- run:
|
||||||
|
name: Install Ruby Dependencies
|
||||||
|
command: bundle install
|
||||||
|
- save_cache:
|
||||||
|
key: bundle-install-v3-{{ checksum "Gemfile.lock" }}
|
||||||
|
paths:
|
||||||
|
- /usr/local/bundle
|
||||||
|
- restore_cache:
|
||||||
|
key: phantomjs-2-1-1
|
||||||
|
- run:
|
||||||
|
name: Install PhantomJS Dependencies
|
||||||
|
command: |
|
||||||
|
[ -f /usr/local/bin/phantomjs ] || apt-get update
|
||||||
|
[ -f /usr/local/bin/phantomjs ] || apt-get install -y fontconfig wget
|
||||||
|
- run:
|
||||||
|
name: Install PhantomJS
|
||||||
|
command: |
|
||||||
|
[ -f /usr/local/bin/phantomjs ] || wget -O /tmp/phantomjs.tar.bz2 https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2
|
||||||
|
[ -f /usr/local/bin/phantomjs ] || tar -xjf /tmp/phantomjs.tar.bz2 -C /tmp
|
||||||
|
[ -f /usr/local/bin/phantomjs ] || mv /tmp/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs
|
||||||
|
- save_cache:
|
||||||
|
key: phantomjs-2-1-1
|
||||||
|
paths:
|
||||||
|
- /usr/local/bin/phantomjs
|
||||||
|
- run:
|
||||||
|
environment:
|
||||||
|
DATABASE_URL: "postgres://tps_test@localhost:5432/tps_test"
|
||||||
|
name: Create DB
|
||||||
|
command: bundle exec rake db:create db:schema:load db:migrate RAILS_ENV=test
|
||||||
|
- run:
|
||||||
|
environment:
|
||||||
|
DATABASE_URL: "postgres://tps_test@localhost:5432/tps_test"
|
||||||
|
name: Run Tests, Splitted by Timings
|
||||||
|
command: |
|
||||||
|
TESTFILES=$(circleci tests glob "spec/**/*.rb"| xargs -n 1 echo | grep -v "spec/factories/" | tr " " "\n" | circleci tests split --split-by=timings)
|
||||||
|
bundle exec rspec --color --require spec_helper -- ${TESTFILES}
|
||||||
|
- run:
|
||||||
|
name: Run haml-lint
|
||||||
|
command: bundle exec haml-lint app/views/
|
||||||
|
- add_ssh_keys:
|
||||||
|
fingerprints:
|
||||||
|
- "0a:67:42:7d:7e:b7:e1:3c:48:8f:bf:68:10:51:a8:44"
|
||||||
|
- deploy:
|
||||||
|
command: |
|
||||||
|
if [ "${CIRCLE_BRANCH}" == "staging" ]; then
|
||||||
|
bundle exec rake deploy_ha
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "${CIRCLE_BRANCH}" == "master" ]; then
|
||||||
|
bundle exec rake deploy_ha to=production
|
||||||
|
fi
|
11
.editorconfig
Normal file
11
.editorconfig
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
end_of_line = lf
|
||||||
|
insert_final_newline = true
|
||||||
|
|
||||||
|
[*.{haml,html,js,scss,rake,rb,yml}]
|
||||||
|
charset = utf-8
|
||||||
|
indent_size = 2
|
||||||
|
indent_style = space
|
||||||
|
trim_trailing_whitespace = true
|
119
.haml-lint.yml
Normal file
119
.haml-lint.yml
Normal file
|
@ -0,0 +1,119 @@
|
||||||
|
linters:
|
||||||
|
AlignmentTabs:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
AltText:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
ClassAttributeWithStaticValue:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
ClassesBeforeIds:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
ConsecutiveComments:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
ConsecutiveSilentScripts:
|
||||||
|
enabled: false
|
||||||
|
max_consecutive: 2
|
||||||
|
|
||||||
|
EmptyObjectReference:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
EmptyScript:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
FinalNewline:
|
||||||
|
enabled: true
|
||||||
|
present: true
|
||||||
|
|
||||||
|
HtmlAttributes:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
IdNames:
|
||||||
|
enabled: false
|
||||||
|
style: lisp_case
|
||||||
|
|
||||||
|
ImplicitDiv:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
Indentation:
|
||||||
|
enabled: true
|
||||||
|
character: space # or tab
|
||||||
|
width: 2 # ignored if character == tab
|
||||||
|
|
||||||
|
InstanceVariables:
|
||||||
|
enabled: false
|
||||||
|
file_types: partials
|
||||||
|
matchers:
|
||||||
|
all: .*
|
||||||
|
partials: \A_.*\.haml\z
|
||||||
|
|
||||||
|
LeadingCommentSpace:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
LineLength:
|
||||||
|
enabled: false
|
||||||
|
max: 80
|
||||||
|
|
||||||
|
MultilinePipe:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
MultilineScript:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
ObjectReferenceAttributes:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
RepeatedId:
|
||||||
|
enabled: false
|
||||||
|
severity: error
|
||||||
|
|
||||||
|
RuboCop:
|
||||||
|
enabled: false
|
||||||
|
# These cops are incredibly noisy when it comes to HAML templates, so we
|
||||||
|
# ignore them.
|
||||||
|
ignored_cops:
|
||||||
|
- Lint/BlockAlignment
|
||||||
|
- Lint/EndAlignment
|
||||||
|
- Lint/Void
|
||||||
|
- Metrics/BlockLength
|
||||||
|
- Metrics/LineLength
|
||||||
|
- Style/AlignParameters
|
||||||
|
- Style/BlockNesting
|
||||||
|
- Style/ElseAlignment
|
||||||
|
- Style/EndOfLine
|
||||||
|
- Style/FileName
|
||||||
|
- Style/FinalNewline
|
||||||
|
- Style/FrozenStringLiteralComment
|
||||||
|
- Style/IfUnlessModifier
|
||||||
|
- Style/IndentationWidth
|
||||||
|
- Style/Next
|
||||||
|
- Style/TrailingBlankLines
|
||||||
|
- Style/TrailingWhitespace
|
||||||
|
- Style/WhileUntilModifier
|
||||||
|
|
||||||
|
RubyComments:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
SpaceBeforeScript:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
SpaceInsideHashAttributes:
|
||||||
|
enabled: true
|
||||||
|
style: space
|
||||||
|
|
||||||
|
TagName:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
TrailingWhitespace:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
UnnecessaryInterpolation:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
# Disabled because too agressive, but to enable
|
||||||
|
# locally from time to time
|
||||||
|
UnnecessaryStringOutput:
|
||||||
|
enabled: false
|
9
Gemfile
9
Gemfile
|
@ -16,7 +16,7 @@ gem 'therubyracer', platforms: :ruby
|
||||||
# Use jquery as the JavaScript library
|
# Use jquery as the JavaScript library
|
||||||
gem 'jquery-rails'
|
gem 'jquery-rails'
|
||||||
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
|
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
|
||||||
gem 'turbolinks', '~> 2.5'
|
gem 'turbolinks', '~> 5.0'
|
||||||
# bundle exec rake doc:rails generates the API under doc/api.
|
# bundle exec rake doc:rails generates the API under doc/api.
|
||||||
gem 'sdoc', '~> 0.4.0', group: :doc
|
gem 'sdoc', '~> 0.4.0', group: :doc
|
||||||
|
|
||||||
|
@ -93,6 +93,8 @@ gem 'simple_form'
|
||||||
|
|
||||||
gem 'newrelic_rpm'
|
gem 'newrelic_rpm'
|
||||||
|
|
||||||
|
gem 'scenic'
|
||||||
|
|
||||||
# Sidekiq
|
# Sidekiq
|
||||||
gem 'sidekiq'
|
gem 'sidekiq'
|
||||||
gem 'sidekiq-cron', '~> 0.4.4'
|
gem 'sidekiq-cron', '~> 0.4.4'
|
||||||
|
@ -114,7 +116,6 @@ group :test do
|
||||||
gem 'guard-livereload', '~> 2.4', require: false
|
gem 'guard-livereload', '~> 2.4', require: false
|
||||||
gem 'vcr'
|
gem 'vcr'
|
||||||
gem 'rails-controller-testing'
|
gem 'rails-controller-testing'
|
||||||
gem 'sqlite3'
|
|
||||||
end
|
end
|
||||||
|
|
||||||
group :development do
|
group :development do
|
||||||
|
@ -122,6 +123,7 @@ group :development do
|
||||||
gem 'web-console'
|
gem 'web-console'
|
||||||
gem 'rack-handlers'
|
gem 'rack-handlers'
|
||||||
gem 'xray-rails'
|
gem 'xray-rails'
|
||||||
|
gem 'haml-lint'
|
||||||
end
|
end
|
||||||
|
|
||||||
group :development, :test do
|
group :development, :test do
|
||||||
|
@ -145,6 +147,3 @@ group :production, :staging do
|
||||||
gem 'sentry-raven'
|
gem 'sentry-raven'
|
||||||
end
|
end
|
||||||
|
|
||||||
group :production, :staging, :development do
|
|
||||||
gem 'scenic'
|
|
||||||
end
|
|
||||||
|
|
58
Gemfile.lock
58
Gemfile.lock
|
@ -69,7 +69,7 @@ GEM
|
||||||
i18n (~> 0.7)
|
i18n (~> 0.7)
|
||||||
minitest (~> 5.1)
|
minitest (~> 5.1)
|
||||||
tzinfo (~> 1.1)
|
tzinfo (~> 1.1)
|
||||||
addressable (2.5.0)
|
addressable (2.5.1)
|
||||||
public_suffix (~> 2.0, >= 2.0.2)
|
public_suffix (~> 2.0, >= 2.0.2)
|
||||||
apipie-rails (0.3.7)
|
apipie-rails (0.3.7)
|
||||||
json
|
json
|
||||||
|
@ -78,6 +78,7 @@ GEM
|
||||||
actionpack (>= 3.0)
|
actionpack (>= 3.0)
|
||||||
activemodel (>= 3.0)
|
activemodel (>= 3.0)
|
||||||
responders
|
responders
|
||||||
|
ast (2.3.0)
|
||||||
attr_required (1.0.1)
|
attr_required (1.0.1)
|
||||||
autoprefixer-rails (6.5.4)
|
autoprefixer-rails (6.5.4)
|
||||||
execjs
|
execjs
|
||||||
|
@ -95,9 +96,9 @@ GEM
|
||||||
bootstrap-wysihtml5-rails (0.3.3.8)
|
bootstrap-wysihtml5-rails (0.3.3.8)
|
||||||
railties (>= 3.0)
|
railties (>= 3.0)
|
||||||
browser (2.3.0)
|
browser (2.3.0)
|
||||||
builder (3.2.2)
|
builder (3.2.3)
|
||||||
byebug (9.0.6)
|
byebug (9.0.6)
|
||||||
capybara (2.11.0)
|
capybara (2.13.0)
|
||||||
addressable
|
addressable
|
||||||
mime-types (>= 1.16)
|
mime-types (>= 1.16)
|
||||||
nokogiri (>= 1.3.3)
|
nokogiri (>= 1.3.3)
|
||||||
|
@ -120,8 +121,8 @@ GEM
|
||||||
coffee-script (2.4.1)
|
coffee-script (2.4.1)
|
||||||
coffee-script-source
|
coffee-script-source
|
||||||
execjs
|
execjs
|
||||||
coffee-script-source (1.11.1)
|
coffee-script-source (1.12.2)
|
||||||
concurrent-ruby (1.0.2)
|
concurrent-ruby (1.0.5)
|
||||||
connection_pool (2.2.1)
|
connection_pool (2.2.1)
|
||||||
crack (0.4.3)
|
crack (0.4.3)
|
||||||
safe_yaml (~> 1.0.0)
|
safe_yaml (~> 1.0.0)
|
||||||
|
@ -313,12 +314,20 @@ GEM
|
||||||
rspec (>= 2.99.0, < 4.0)
|
rspec (>= 2.99.0, < 4.0)
|
||||||
haml (4.0.7)
|
haml (4.0.7)
|
||||||
tilt
|
tilt
|
||||||
|
haml-lint (0.999.999)
|
||||||
|
haml_lint
|
||||||
haml-rails (0.9.0)
|
haml-rails (0.9.0)
|
||||||
actionpack (>= 4.0.1)
|
actionpack (>= 4.0.1)
|
||||||
activesupport (>= 4.0.1)
|
activesupport (>= 4.0.1)
|
||||||
haml (>= 4.0.6, < 5.0)
|
haml (>= 4.0.6, < 5.0)
|
||||||
html2haml (>= 1.0.1)
|
html2haml (>= 1.0.1)
|
||||||
railties (>= 4.0.1)
|
railties (>= 4.0.1)
|
||||||
|
haml_lint (0.24.0)
|
||||||
|
haml (>= 4.0, < 5.1)
|
||||||
|
rainbow
|
||||||
|
rake (>= 10, < 13)
|
||||||
|
rubocop (>= 0.47.0)
|
||||||
|
sysexits (~> 1.1)
|
||||||
hashdiff (0.3.1)
|
hashdiff (0.3.1)
|
||||||
hashie (3.4.6)
|
hashie (3.4.6)
|
||||||
html2haml (2.0.0)
|
html2haml (2.0.0)
|
||||||
|
@ -331,7 +340,7 @@ GEM
|
||||||
domain_name (~> 0.5)
|
domain_name (~> 0.5)
|
||||||
http_parser.rb (0.6.0)
|
http_parser.rb (0.6.0)
|
||||||
httpclient (2.8.3)
|
httpclient (2.8.3)
|
||||||
i18n (0.7.0)
|
i18n (0.8.1)
|
||||||
inflecto (0.0.2)
|
inflecto (0.0.2)
|
||||||
ipaddress (0.8.3)
|
ipaddress (0.8.3)
|
||||||
jquery-rails (4.2.1)
|
jquery-rails (4.2.1)
|
||||||
|
@ -412,11 +421,14 @@ GEM
|
||||||
openstack (3.3.7)
|
openstack (3.3.7)
|
||||||
json
|
json
|
||||||
orm_adapter (0.5.0)
|
orm_adapter (0.5.0)
|
||||||
|
parser (2.4.0.0)
|
||||||
|
ast (~> 2.2)
|
||||||
pg (0.19.0)
|
pg (0.19.0)
|
||||||
poltergeist (1.12.0)
|
poltergeist (1.14.0)
|
||||||
capybara (~> 2.1)
|
capybara (~> 2.1)
|
||||||
cliver (~> 0.3.1)
|
cliver (~> 0.3.1)
|
||||||
websocket-driver (>= 0.2.0)
|
websocket-driver (>= 0.2.0)
|
||||||
|
powerpack (0.1.1)
|
||||||
pry (0.10.4)
|
pry (0.10.4)
|
||||||
coderay (~> 1.1.0)
|
coderay (~> 1.1.0)
|
||||||
method_source (~> 0.8.1)
|
method_source (~> 0.8.1)
|
||||||
|
@ -424,7 +436,7 @@ GEM
|
||||||
pry-byebug (3.4.2)
|
pry-byebug (3.4.2)
|
||||||
byebug (~> 9.0)
|
byebug (~> 9.0)
|
||||||
pry (~> 0.10)
|
pry (~> 0.10)
|
||||||
public_suffix (2.0.4)
|
public_suffix (2.0.5)
|
||||||
rack (2.0.1)
|
rack (2.0.1)
|
||||||
rack-handlers (0.7.3)
|
rack-handlers (0.7.3)
|
||||||
rack
|
rack
|
||||||
|
@ -452,9 +464,9 @@ GEM
|
||||||
actionpack (~> 5.x)
|
actionpack (~> 5.x)
|
||||||
actionview (~> 5.x)
|
actionview (~> 5.x)
|
||||||
activesupport (~> 5.x)
|
activesupport (~> 5.x)
|
||||||
rails-dom-testing (2.0.1)
|
rails-dom-testing (2.0.2)
|
||||||
activesupport (>= 4.2.0, < 6.0)
|
activesupport (>= 4.2.0, < 6.0)
|
||||||
nokogiri (~> 1.6.0)
|
nokogiri (~> 1.6)
|
||||||
rails-html-sanitizer (1.0.3)
|
rails-html-sanitizer (1.0.3)
|
||||||
loofah (~> 2.0)
|
loofah (~> 2.0)
|
||||||
railties (5.0.0.1)
|
railties (5.0.0.1)
|
||||||
|
@ -463,6 +475,7 @@ GEM
|
||||||
method_source
|
method_source
|
||||||
rake (>= 0.8.7)
|
rake (>= 0.8.7)
|
||||||
thor (>= 0.18.1, < 2.0)
|
thor (>= 0.18.1, < 2.0)
|
||||||
|
rainbow (2.2.1)
|
||||||
raindrops (0.17.0)
|
raindrops (0.17.0)
|
||||||
rake (12.0.0)
|
rake (12.0.0)
|
||||||
rb-fsevent (0.9.8)
|
rb-fsevent (0.9.8)
|
||||||
|
@ -513,6 +526,13 @@ GEM
|
||||||
rspec-mocks (~> 3.5.0)
|
rspec-mocks (~> 3.5.0)
|
||||||
rspec-support (~> 3.5.0)
|
rspec-support (~> 3.5.0)
|
||||||
rspec-support (3.5.0)
|
rspec-support (3.5.0)
|
||||||
|
rubocop (0.48.1)
|
||||||
|
parser (>= 2.3.3.1, < 3.0)
|
||||||
|
powerpack (~> 0.1)
|
||||||
|
rainbow (>= 1.99.1, < 3.0)
|
||||||
|
ruby-progressbar (~> 1.7)
|
||||||
|
unicode-display_width (~> 1.0, >= 1.0.1)
|
||||||
|
ruby-progressbar (1.8.1)
|
||||||
ruby_dep (1.5.0)
|
ruby_dep (1.5.0)
|
||||||
ruby_parser (3.8.3)
|
ruby_parser (3.8.3)
|
||||||
sexp_processor (~> 4.1)
|
sexp_processor (~> 4.1)
|
||||||
|
@ -574,30 +594,32 @@ GEM
|
||||||
actionpack (>= 4.0)
|
actionpack (>= 4.0)
|
||||||
activesupport (>= 4.0)
|
activesupport (>= 4.0)
|
||||||
sprockets (>= 3.0.0)
|
sprockets (>= 3.0.0)
|
||||||
sqlite3 (1.3.13)
|
|
||||||
swd (1.0.1)
|
swd (1.0.1)
|
||||||
activesupport (>= 3)
|
activesupport (>= 3)
|
||||||
attr_required (>= 0.0.5)
|
attr_required (>= 0.0.5)
|
||||||
httpclient (>= 2.4)
|
httpclient (>= 2.4)
|
||||||
i18n
|
i18n
|
||||||
json (>= 1.4.3)
|
json (>= 1.4.3)
|
||||||
|
sysexits (1.2.0)
|
||||||
therubyracer (0.12.2)
|
therubyracer (0.12.2)
|
||||||
libv8 (~> 3.16.14.0)
|
libv8 (~> 3.16.14.0)
|
||||||
ref
|
ref
|
||||||
thor (0.19.4)
|
thor (0.19.4)
|
||||||
thread_safe (0.3.5)
|
thread_safe (0.3.6)
|
||||||
tilt (2.0.5)
|
tilt (2.0.5)
|
||||||
timecop (0.8.1)
|
timecop (0.8.1)
|
||||||
trollop (2.1.2)
|
trollop (2.1.2)
|
||||||
turbolinks (2.5.3)
|
turbolinks (5.0.1)
|
||||||
coffee-rails
|
turbolinks-source (~> 5)
|
||||||
tzinfo (1.2.2)
|
turbolinks-source (5.0.0)
|
||||||
|
tzinfo (1.2.3)
|
||||||
thread_safe (~> 0.1)
|
thread_safe (~> 0.1)
|
||||||
uglifier (3.0.4)
|
uglifier (3.0.4)
|
||||||
execjs (>= 0.3.0, < 3)
|
execjs (>= 0.3.0, < 3)
|
||||||
unf (0.1.4)
|
unf (0.1.4)
|
||||||
unf_ext
|
unf_ext
|
||||||
unf_ext (0.0.7.2)
|
unf_ext (0.0.7.2)
|
||||||
|
unicode-display_width (1.1.3)
|
||||||
unicode_utils (1.4.0)
|
unicode_utils (1.4.0)
|
||||||
unicorn (5.2.0)
|
unicorn (5.2.0)
|
||||||
kgio (~> 2.6)
|
kgio (~> 2.6)
|
||||||
|
@ -625,7 +647,7 @@ GEM
|
||||||
addressable (>= 2.3.6)
|
addressable (>= 2.3.6)
|
||||||
crack (>= 0.3.2)
|
crack (>= 0.3.2)
|
||||||
hashdiff
|
hashdiff
|
||||||
websocket-driver (0.6.4)
|
websocket-driver (0.6.5)
|
||||||
websocket-extensions (>= 0.1.0)
|
websocket-extensions (>= 0.1.0)
|
||||||
websocket-extensions (0.1.2)
|
websocket-extensions (0.1.2)
|
||||||
will_paginate (3.1.5)
|
will_paginate (3.1.5)
|
||||||
|
@ -666,6 +688,7 @@ DEPENDENCIES
|
||||||
guard
|
guard
|
||||||
guard-livereload (~> 2.4)
|
guard-livereload (~> 2.4)
|
||||||
guard-rspec
|
guard-rspec
|
||||||
|
haml-lint
|
||||||
haml-rails
|
haml-rails
|
||||||
hashie
|
hashie
|
||||||
jquery-rails
|
jquery-rails
|
||||||
|
@ -704,10 +727,9 @@ DEPENDENCIES
|
||||||
spreadsheet_architect
|
spreadsheet_architect
|
||||||
spring
|
spring
|
||||||
spring-commands-rspec
|
spring-commands-rspec
|
||||||
sqlite3
|
|
||||||
therubyracer
|
therubyracer
|
||||||
timecop
|
timecop
|
||||||
turbolinks (~> 2.5)
|
turbolinks (~> 5.0)
|
||||||
uglifier (>= 1.3.0)
|
uglifier (>= 1.3.0)
|
||||||
unicode_utils
|
unicode_utils
|
||||||
unicorn
|
unicorn
|
||||||
|
|
|
@ -73,6 +73,7 @@ guard :rspec, cmd: 'spring rspec' do
|
||||||
watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
|
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/(.*)(\.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{^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{^app/services/(.+)_(service)\.rb$}) { |m| "spec/services/#{m[1]}_service_spec.rb" }
|
||||||
watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
|
watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
|
||||||
watch('config/routes.rb') { "spec/routing" }
|
watch('config/routes.rb') { "spec/routing" }
|
||||||
watch('app/controllers/application_controller.rb') { "spec/controllers" }
|
watch('app/controllers/application_controller.rb') { "spec/controllers" }
|
||||||
|
|
33
README.md
33
README.md
|
@ -5,10 +5,15 @@
|
||||||
TéléProcédure Simplifiée, ou TPS pour les intimes, est une plateforme 100 % web et 0 % email, conçue afin de répondre au besoin urgent de l'État d'appliquer la directive sur le 100 % démat' à l'horizon 2018 pour les démarches administratives.
|
TéléProcédure Simplifiée, ou TPS pour les intimes, est une plateforme 100 % web et 0 % email, conçue afin de répondre au besoin urgent de l'État d'appliquer la directive sur le 100 % démat' à l'horizon 2018 pour les démarches administratives.
|
||||||
|
|
||||||
|
|
||||||
## Technologies utilisées
|
## Dépendances
|
||||||
|
|
||||||
Ruby : 2.3.1
|
### Tous environnements
|
||||||
Rails : 5.0.0.1
|
|
||||||
|
- postgresql
|
||||||
|
|
||||||
|
### Tests
|
||||||
|
|
||||||
|
- PhantomJS
|
||||||
|
|
||||||
|
|
||||||
## Initialisation de l'environnement de développement
|
## Initialisation de l'environnement de développement
|
||||||
|
@ -20,32 +25,23 @@ Afin d'initialiser l'environnement de développement, éxécutez la commande sui
|
||||||
|
|
||||||
## Création de la base de données
|
## Création de la base de données
|
||||||
|
|
||||||
L'application utilise une base de donnée Postgresql. Pour en installer une, utilisez la commande suivante :
|
|
||||||
|
|
||||||
sudo apt-get install postgresql
|
|
||||||
|
|
||||||
Les informations nécessaire à l'initialisation de la base doivent être pré-configurées à la main grâce à la procédure suivante :
|
Les informations nécessaire à l'initialisation de la base doivent être pré-configurées à la main grâce à la procédure suivante :
|
||||||
|
|
||||||
su - postgres
|
su - postgres
|
||||||
psql
|
psql
|
||||||
> create user tps with password 'lol' superuser;
|
> create user tps_development with password 'tps_development' superuser;
|
||||||
|
> create user tps_test with password 'tps_test' superuser;
|
||||||
> \q
|
> \q
|
||||||
|
|
||||||
|
|
||||||
Afin de générer la BDD de l'application, il est nécessaire d'éxécuter les commandes suivantes :
|
Afin de générer la BDD de l'application, il est nécessaire d'éxécuter les commandes suivantes :
|
||||||
|
|
||||||
rake db:create db:schema:load db:migrate
|
rake db:create db:schema:load db:migrate
|
||||||
rake db:create db:schema:load db:migrate RAILS_ENV=test
|
rake db:create db:schema:load db:migrate RAILS_ENV=test
|
||||||
|
|
||||||
|
|
||||||
## Installation de Phantom JS
|
## Exécution des tests (RSpec)
|
||||||
|
|
||||||
Installer PhantomJS qui est utilisé par les tests automatisés de l'application.
|
Pour exécuter les tests de l'application, plusieurs possibilités :
|
||||||
|
|
||||||
|
|
||||||
## Exécution des tests (Rspec)
|
|
||||||
|
|
||||||
Pour éxécuter les tests de l'application, plusieurs possibilités :
|
|
||||||
|
|
||||||
- Lancer tous les tests
|
- Lancer tous les tests
|
||||||
|
|
||||||
|
@ -62,8 +58,11 @@ Pour éxécuter les tests de l'application, plusieurs possibilités :
|
||||||
rake spec SPEC=file_path/file_name_spec.rb
|
rake spec SPEC=file_path/file_name_spec.rb
|
||||||
rspec file_path/file_name_spec.rb
|
rspec file_path/file_name_spec.rb
|
||||||
|
|
||||||
|
## Linting
|
||||||
|
|
||||||
## Regénérer les binstubs
|
- Linter les fichiers HAML : `bundle exec haml-lint app/views/`
|
||||||
|
|
||||||
|
## Régénérer les binstubs
|
||||||
|
|
||||||
bundle binstub railties --force
|
bundle binstub railties --force
|
||||||
rake rails:update:bin
|
rake rails:update:bin
|
||||||
|
|
BIN
app/assets/images/landing/users/Pilat.sketch
Normal file
BIN
app/assets/images/landing/users/Pilat.sketch
Normal file
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 176 KiB |
Binary file not shown.
Before Width: | Height: | Size: 35 KiB |
Binary file not shown.
Before Width: | Height: | Size: 24 KiB |
Binary file not shown.
Before Width: | Height: | Size: 10 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.2 KiB |
|
@ -1,5 +1,4 @@
|
||||||
$(document).on('page:load', init_action_btn_rules);
|
$(document).on('turbolinks:load', init_action_btn_rules);
|
||||||
$(document).ready(init_action_btn_rules);
|
|
||||||
|
|
||||||
function init_action_btn_rules() {
|
function init_action_btn_rules() {
|
||||||
$('.btn-send').click(function () {
|
$('.btn-send').click(function () {
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
$(document).on('page:load', init_admin);
|
$(document).on('turbolinks:load', init_admin);
|
||||||
$(document).ready(init_admin);
|
|
||||||
|
|
||||||
function init_admin(){
|
function init_admin(){
|
||||||
destroy_action();
|
destroy_action();
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
$(document).on('page:load', init_path_modal);
|
$(document).on('turbolinks:load', init_path_modal);
|
||||||
$(document).ready(init_path_modal);
|
|
||||||
|
|
||||||
function init_path_modal() {
|
function init_path_modal() {
|
||||||
path_modal_action();
|
path_modal_action();
|
||||||
|
|
|
@ -33,8 +33,7 @@
|
||||||
//= require typeahead.bundle
|
//= require typeahead.bundle
|
||||||
//= require select2
|
//= require select2
|
||||||
|
|
||||||
$(document).on('page:load', application_init);
|
$(document).on('turbolinks:load', application_init);
|
||||||
$(document).ready(application_init);
|
|
||||||
|
|
||||||
|
|
||||||
function application_init(){
|
function application_init(){
|
||||||
|
@ -55,4 +54,3 @@ function scroll_to() {
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
$(document).on('page:load', buttons_archived);
|
$(document).on('turbolinks:load', buttons_archived);
|
||||||
$(document).ready(buttons_archived);
|
|
||||||
|
|
||||||
function buttons_archived(){
|
function buttons_archived(){
|
||||||
$("button#archive").on('click', function(){
|
$("button#archive").on('click', function(){
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
$(document).ready(wysihtml5_active);
|
$(document).on('turbolinks:load', wysihtml5_active);
|
||||||
$(document).on('page:load', wysihtml5_active);
|
|
||||||
|
|
||||||
function wysihtml5_active (){
|
function wysihtml5_active (){
|
||||||
$('.wysihtml5').each(function(i, elem) {
|
$('.wysihtml5').each(function(i, elem) {
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
$(document).on('page:load', buttons_anchor);
|
$(document).on('turbolinks:load', buttons_anchor);
|
||||||
$(document).ready(buttons_anchor);
|
|
||||||
|
|
||||||
function buttons_anchor(){
|
function buttons_anchor(){
|
||||||
$("#cgu_menu_block").on('click', 'a', function(){
|
$("#cgu_menu_block").on('click', 'a', function(){
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
$(document).on('page:load', init_default_data_block);
|
$(document).on('turbolinks:load', init_default_data_block);
|
||||||
$(document).ready(init_default_data_block);
|
|
||||||
|
|
||||||
function init_default_data_block() {
|
function init_default_data_block() {
|
||||||
$('.default_data_block #dossier .body').toggle();
|
$('.default_data_block #dossier .body').toggle();
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
$(document).on('page:load', action_type_de_champs);
|
$(document).on('turbolinks:load', action_type_de_champs);
|
||||||
$(document).ready(action_type_de_champs);
|
|
||||||
|
|
||||||
|
|
||||||
function action_type_de_champs() {
|
function action_type_de_champs() {
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
$(document).on('page:load', init_modal_commentaire);
|
$(document).on('turbolinks:load', init_modal_commentaire);
|
||||||
$(document).ready(init_modal_commentaire);
|
|
||||||
|
|
||||||
function init_modal_commentaire() {
|
function init_modal_commentaire() {
|
||||||
var modal = $("#modalCommentairesDossierParChamp");
|
var modal = $("#modalCommentairesDossierParChamp");
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
$(document).on('page:load', the_terms);
|
$(document).on('turbolinks:load', the_terms);
|
||||||
$(document).ready(the_terms);
|
$(document).on('turbolinks:load', pannel_switch);
|
||||||
$(document).on('page:load', pannel_switch);
|
|
||||||
$(document).ready(pannel_switch);
|
|
||||||
|
|
||||||
function pannel_switch() {
|
function pannel_switch() {
|
||||||
$('#switch-notifications').click(function () {
|
$('#switch-notifications').click(function () {
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
$(document).on('page:load', filters_init);
|
$(document).on('turbolinks:load', filters_init);
|
||||||
$(document).ready(filters_init);
|
|
||||||
|
|
||||||
function filters_init() {
|
function filters_init() {
|
||||||
$('html').click(function(event) {
|
$('html').click(function(event) {
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
$(document).on('page:load', link_init);
|
$(document).on('turbolinks:load', link_init);
|
||||||
$(document).ready(link_init);
|
|
||||||
|
|
||||||
function link_init() {
|
function link_init() {
|
||||||
$('#dossiers_list tr').on('click', function () {
|
$('#dossiers_list tr').on('click', function () {
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
$(document).on('page:load', franceconnect_kit);
|
$(document).on('turbolinks:load', franceconnect_kit);
|
||||||
$(document).ready(franceconnect_kit);
|
|
||||||
|
|
||||||
function franceconnect_kit() {
|
function franceconnect_kit() {
|
||||||
franceConnectKit.init()
|
franceConnectKit.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
$(document).on('page:load', modal_action);
|
$(document).on('turbolinks:load', modal_action);
|
||||||
$(document).ready(modal_action);
|
|
||||||
|
|
||||||
function modal_action() {
|
function modal_action() {
|
||||||
$('#PJmodal').on('show.bs.modal', function (event) {
|
$('#PJmodal').on('show.bs.modal', function (event) {
|
||||||
|
|
36
app/assets/javascripts/new-description.js
Normal file
36
app/assets/javascripts/new-description.js
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
(function() {
|
||||||
|
var showNotFound = function() {
|
||||||
|
$('.dossier-link .text-info').hide();
|
||||||
|
$('.dossier-link .text-warning').show();
|
||||||
|
};
|
||||||
|
|
||||||
|
var showData = function(data) {
|
||||||
|
$('.dossier-link .procedureLibelle').text(data.procedureLibelle);
|
||||||
|
$('.dossier-link .text-info').show();
|
||||||
|
$('.dossier-link .text-warning').hide();
|
||||||
|
};
|
||||||
|
|
||||||
|
var hideEverything = function() {
|
||||||
|
$('.dossier-link .text-info').hide();
|
||||||
|
$('.dossier-link .text-warning').hide();
|
||||||
|
};
|
||||||
|
|
||||||
|
var fetchProcedureLibelle = function(e) {
|
||||||
|
var dossierId = $(e.target).val();
|
||||||
|
if(dossierId) {
|
||||||
|
$.get('/users/dossiers/' + dossierId + '/procedure_libelle')
|
||||||
|
.done(showData)
|
||||||
|
.fail(showNotFound);
|
||||||
|
} else {
|
||||||
|
hideEverything();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var timeOut = null;
|
||||||
|
var debounceFetchProcedureLibelle = function(e) {
|
||||||
|
if(timeOut){ clearTimeout(timeOut); }
|
||||||
|
timeOut = setTimeout(function() { fetchProcedureLibelle(e); }, 300);
|
||||||
|
};
|
||||||
|
|
||||||
|
$(document).on('input', '[data-type=dossier-link]', debounceFetchProcedureLibelle);
|
||||||
|
})();
|
|
@ -1,5 +1,4 @@
|
||||||
$(document).on('page:load', pref_list_dossier_actions);
|
$(document).on('turbolinks:load', pref_list_dossier_actions);
|
||||||
$(document).ready(pref_list_dossier_actions);
|
|
||||||
|
|
||||||
function pref_list_dossier_actions() {
|
function pref_list_dossier_actions() {
|
||||||
pref_list_dossier_open_action();
|
pref_list_dossier_open_action();
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
$(document).on('page:load', button_edit_procedure_init);
|
$(document).on('turbolinks:load', button_edit_procedure_init);
|
||||||
$(document).ready(button_edit_procedure_init);
|
|
||||||
|
|
||||||
function button_edit_procedure_init(){
|
function button_edit_procedure_init(){
|
||||||
buttons_api_carto();
|
buttons_api_carto();
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
$(document).on('page:load', init_search_anim);
|
$(document).on('turbolinks:load', init_search_anim);
|
||||||
$(document).ready(init_search_anim);
|
|
||||||
|
|
||||||
function init_search_anim(){
|
function init_search_anim(){
|
||||||
$("#search_area").on('click', search_fadeIn);
|
$("#search_area").on('click', search_fadeIn);
|
||||||
|
|
20
app/assets/javascripts/toggle_chart.js
Normal file
20
app/assets/javascripts/toggle_chart.js
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
var TPS = TPS || {};
|
||||||
|
|
||||||
|
TPS.toggleChart = function(event, chartClass) {
|
||||||
|
var nextSelectorItem = $(event.target),
|
||||||
|
nextChart = $(chartClass),
|
||||||
|
nextChartId = nextChart.children().first().attr("id"),
|
||||||
|
currentSelectorItem = nextSelectorItem.parent().find(".segmented-control-item-active"),
|
||||||
|
currentChart = nextSelectorItem.parent().parent().find(".chart:not(.hidden)");
|
||||||
|
|
||||||
|
// Change the current selector and the next selector states
|
||||||
|
currentSelectorItem.toggleClass("segmented-control-item-active");
|
||||||
|
nextSelectorItem.toggleClass("segmented-control-item-active");
|
||||||
|
|
||||||
|
// Hide the currently shown chart and show the new one
|
||||||
|
currentChart.toggleClass("hidden");
|
||||||
|
nextChart.toggleClass("hidden");
|
||||||
|
|
||||||
|
// Reflow needed, see https://github.com/highcharts/highcharts/issues/1979
|
||||||
|
Chartkick.charts[nextChartId].getChartObject().reflow();
|
||||||
|
}
|
|
@ -1,5 +1,4 @@
|
||||||
$(document).on('page:load', activeSelect2);
|
$(document).on('turbolinks:load', activeSelect2);
|
||||||
$(document).ready(activeSelect2);
|
|
||||||
|
|
||||||
function activeSelect2() {
|
function activeSelect2() {
|
||||||
$('select.select2').select2({ theme: "bootstrap", width: '100%' });
|
$('select.select2').select2({ theme: "bootstrap", width: '100%' });
|
||||||
|
|
5
app/assets/stylesheets/_turbolinks.scss
Normal file
5
app/assets/stylesheets/_turbolinks.scss
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
@import "variables";
|
||||||
|
|
||||||
|
.turbolinks-progress-bar {
|
||||||
|
background-color: $light-blue;
|
||||||
|
}
|
|
@ -1 +1,5 @@
|
||||||
|
// colors
|
||||||
|
$light-blue: #F2F6FA;
|
||||||
|
|
||||||
|
// Bootstrap variables
|
||||||
$font-size-base: 16px;
|
$font-size-base: 16px;
|
|
@ -20,4 +20,3 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
@import "card";
|
|
||||||
|
|
||||||
.stats {
|
|
||||||
.stat-card {
|
|
||||||
@extend .card;
|
|
||||||
margin: 15px auto;
|
|
||||||
max-width: 1200px;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -27,7 +27,7 @@
|
||||||
@import "bootstrap";
|
@import "bootstrap";
|
||||||
|
|
||||||
body {
|
body {
|
||||||
background-color: #F2F6FA;
|
background-color: $light-blue;
|
||||||
}
|
}
|
||||||
|
|
||||||
html, body {
|
html, body {
|
||||||
|
@ -63,7 +63,7 @@ form {
|
||||||
}
|
}
|
||||||
|
|
||||||
#footer {
|
#footer {
|
||||||
background-color: #F2F6FA;
|
background-color: $light-blue;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
a, p {
|
a, p {
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
@import "variables";
|
||||||
|
|
||||||
.default_data_block {
|
.default_data_block {
|
||||||
font-family: Arial;
|
font-family: Arial;
|
||||||
|
|
||||||
|
@ -53,7 +55,7 @@
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
}
|
}
|
||||||
.action:hover {
|
.action:hover {
|
||||||
color: #F2F6FA;
|
color: $light-blue;
|
||||||
}
|
}
|
||||||
.count {
|
.count {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
@import "variables";
|
||||||
|
|
||||||
#header {
|
#header {
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
@ -185,7 +187,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.button-navbar-action:hover {
|
.button-navbar-action:hover {
|
||||||
color: #F2F6FA;
|
color: $light-blue;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button_navbar:hover, .button-navbar-action:hover {
|
.button_navbar:hover, .button-navbar-action:hover {
|
||||||
|
|
124
app/assets/stylesheets/stats.scss
Normal file
124
app/assets/stylesheets/stats.scss
Normal file
|
@ -0,0 +1,124 @@
|
||||||
|
@import "card";
|
||||||
|
|
||||||
|
$dark-grey: #333333;
|
||||||
|
$light-grey: #999999;
|
||||||
|
$blue: rgba(61, 149, 236, 1);
|
||||||
|
$blue-hover: rgba(61, 149, 236, 0.8);
|
||||||
|
|
||||||
|
$default-space: 15px;
|
||||||
|
|
||||||
|
$new-h1-margin-bottom: 4 * $default-space;
|
||||||
|
.new-h1 {
|
||||||
|
color: $dark-grey;
|
||||||
|
text-align: center;
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: $new-h1-margin-bottom;
|
||||||
|
}
|
||||||
|
|
||||||
|
$statistiques-padding-top: $default-space * 2;
|
||||||
|
.statistiques {
|
||||||
|
width: 1040px;
|
||||||
|
margin: 0 auto;
|
||||||
|
padding-top: $statistiques-padding-top;
|
||||||
|
}
|
||||||
|
|
||||||
|
.stat-cards {
|
||||||
|
.stat-card:nth-of-type(even) {
|
||||||
|
margin-right: 0px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$stat-card-margin-bottom: 3 * $default-space;
|
||||||
|
.stat-card {
|
||||||
|
@extend .card;
|
||||||
|
margin-bottom: $stat-card-margin-bottom;
|
||||||
|
border-radius: 5px;
|
||||||
|
box-shadow: none;
|
||||||
|
border: 1px solid rgba(0, 0, 0, 0.15);
|
||||||
|
}
|
||||||
|
|
||||||
|
$stat-card-half-horizontal-spacing: 4 * $default-space;
|
||||||
|
.stat-card-half {
|
||||||
|
width: calc((100% - #{$stat-card-half-horizontal-spacing}) / 2);
|
||||||
|
margin-right: 3 * $default-space;
|
||||||
|
}
|
||||||
|
|
||||||
|
.stat-card-title {
|
||||||
|
color: $dark-grey;
|
||||||
|
font-size: 26px;
|
||||||
|
font-weight: 500;
|
||||||
|
width: 200px;
|
||||||
|
}
|
||||||
|
|
||||||
|
$segmented-control-margin-top: $default-space;
|
||||||
|
.segmented-control {
|
||||||
|
border-radius: 36px;
|
||||||
|
height: 36px;
|
||||||
|
line-height: 36px;
|
||||||
|
font-size: 0;
|
||||||
|
padding: 0;
|
||||||
|
display: inline-block;
|
||||||
|
margin-top: $segmented-control-margin-top;
|
||||||
|
}
|
||||||
|
|
||||||
|
$segmented-control-item-horizontal-padding: $default-space;
|
||||||
|
$segmented-control-item-border-radius: 2 * $default-space;
|
||||||
|
.segmented-control-item {
|
||||||
|
color: $blue;
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 15px;
|
||||||
|
border: 2px solid $blue;
|
||||||
|
margin-right: -2px;
|
||||||
|
padding-left: $segmented-control-item-horizontal-padding;
|
||||||
|
padding-right: $segmented-control-item-horizontal-padding;
|
||||||
|
color: $blue;
|
||||||
|
|
||||||
|
&:first-of-type {
|
||||||
|
border-radius: $segmented-control-item-border-radius 0px 0px $segmented-control-item-border-radius;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:last-of-type {
|
||||||
|
border-radius: 0px $segmented-control-item-border-radius $segmented-control-item-border-radius 0px;
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: $blue-hover;
|
||||||
|
color: white;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.segmented-control-item-active {
|
||||||
|
background-color: $blue;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.chart-container {
|
||||||
|
margin-top: 36px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.chart {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
$big-number-card-padding: 2 * $segmented-control-item-border-radius;
|
||||||
|
.big-number-card {
|
||||||
|
padding: $big-number-card-padding;
|
||||||
|
}
|
||||||
|
|
||||||
|
.big-number-card-title {
|
||||||
|
display: block;
|
||||||
|
text-align: center;
|
||||||
|
margin: 0 auto;
|
||||||
|
color: $light-grey;
|
||||||
|
}
|
||||||
|
|
||||||
|
.big-number-card-number {
|
||||||
|
display: block;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 90px;
|
||||||
|
line-height: 90px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: $blue;
|
||||||
|
}
|
|
@ -1,3 +1,5 @@
|
||||||
|
@import "variables";
|
||||||
|
|
||||||
#users_index, #admins_index{
|
#users_index, #admins_index{
|
||||||
margin-left: 2rem;
|
margin-left: 2rem;
|
||||||
margin-right: 2rem;
|
margin-right: 2rem;
|
||||||
|
@ -48,7 +50,7 @@
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
.action:hover {
|
.action:hover {
|
||||||
color: #F2F6FA;
|
color: $light-blue;
|
||||||
}
|
}
|
||||||
.padding-left-30 {
|
.padding-left-30 {
|
||||||
padding-left: 30px;
|
padding-left: 30px;
|
||||||
|
|
|
@ -1,24 +0,0 @@
|
||||||
module Administrations
|
|
||||||
class StatsController < ApplicationController
|
|
||||||
before_action :authenticate_administration!
|
|
||||||
|
|
||||||
def index
|
|
||||||
procedures = Procedure.where(created_at: Time.current.all_quarter).group("date_trunc('day', created_at)").count
|
|
||||||
dossiers = Dossier.where(created_at: Time.current.all_quarter).group("date_trunc('day', created_at)").count
|
|
||||||
@procedures = clean_hash(procedures)
|
|
||||||
@dossiers = clean_hash(dossiers)
|
|
||||||
end
|
|
||||||
|
|
||||||
private
|
|
||||||
|
|
||||||
def clean_hash h
|
|
||||||
h.keys.each{ |key| h[key.to_date] = h[key]; h.delete(key) }
|
|
||||||
min_date = h.keys.min
|
|
||||||
max_date = h.keys.max
|
|
||||||
(min_date..max_date).each do |date|
|
|
||||||
h[date] = 0 if h[date].nil?
|
|
||||||
end
|
|
||||||
h
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -39,16 +39,13 @@ class Backoffice::DossiersController < Backoffice::DossiersListController
|
||||||
end
|
end
|
||||||
|
|
||||||
def download_dossiers_tps
|
def download_dossiers_tps
|
||||||
if procedure = Procedure.find_by(id: params[:procedure_id])
|
procedure = Procedure.find_by(id: params[:procedure_id])
|
||||||
dossiers = dossiers_list_facade(param_liste).dossiers_to_display
|
export = procedure.generate_export
|
||||||
respond_with Dossier.export_full_generation(dossiers, request.format) unless dossiers.empty?
|
|
||||||
else
|
|
||||||
dossiers = dossiers_list_facade(param_liste).dossiers_to_display
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.xlsx { render xlsx: dossiers }
|
format.csv { send_data(SpreadsheetArchitect.to_csv(data: export[:data], headers: export[:headers]), filename: 'dossiers.csv') }
|
||||||
format.ods { render ods: dossiers }
|
format.xlsx { send_data(SpreadsheetArchitect.to_xlsx(data: export[:data], headers: export[:headers]), filename: 'dossiers.xlsx') }
|
||||||
format.csv { render csv: dossiers }
|
format.ods { send_data(SpreadsheetArchitect.to_ods(data: export[:data], headers: export[:headers]), filename: 'dossiers.ods') }
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ class Backoffice::PrivateFormulairesController < ApplicationController
|
||||||
dossier = current_gestionnaire.dossiers.find(params[:dossier_id])
|
dossier = current_gestionnaire.dossiers.find(params[:dossier_id])
|
||||||
|
|
||||||
unless params[:champs].nil?
|
unless params[:champs].nil?
|
||||||
champs_service_errors = ChampsService.save_formulaire dossier.champs_private, params
|
champs_service_errors = ChampsService.save_champs dossier.champs_private, params
|
||||||
|
|
||||||
if champs_service_errors.empty?
|
if champs_service_errors.empty?
|
||||||
flash[:notice] = "Formulaire enregistré"
|
flash[:notice] = "Formulaire enregistré"
|
||||||
|
|
56
app/controllers/stats_controller.rb
Normal file
56
app/controllers/stats_controller.rb
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
class StatsController < ApplicationController
|
||||||
|
|
||||||
|
def index
|
||||||
|
procedures = Procedure.where(:published => true)
|
||||||
|
dossiers = Dossier.where.not(:state => :draft)
|
||||||
|
|
||||||
|
@procedures_30_days_flow = thirty_days_flow_hash(procedures)
|
||||||
|
@dossiers_30_days_flow = thirty_days_flow_hash(dossiers)
|
||||||
|
|
||||||
|
@procedures_cumulative = cumulative_hash(procedures)
|
||||||
|
@dossiers_cumulative = cumulative_hash(dossiers)
|
||||||
|
|
||||||
|
@procedures_count = procedures.count
|
||||||
|
@dossiers_count = dossiers.count
|
||||||
|
end
|
||||||
|
|
||||||
|
private
|
||||||
|
|
||||||
|
def thirty_days_flow_hash(association)
|
||||||
|
min_date = 30.days.ago.to_date
|
||||||
|
max_date = Time.now.to_date
|
||||||
|
|
||||||
|
thirty_days_flow_hash = association
|
||||||
|
.where(:created_at => min_date..max_date)
|
||||||
|
.group("date_trunc('day', created_at)")
|
||||||
|
.count
|
||||||
|
|
||||||
|
clean_hash(thirty_days_flow_hash, min_date, max_date)
|
||||||
|
end
|
||||||
|
|
||||||
|
def clean_hash(h, min_date, max_date)
|
||||||
|
# Convert keys to date
|
||||||
|
h = Hash[h.map { |(k, v)| [k.to_date, v] }]
|
||||||
|
|
||||||
|
# Add missing vales where count is 0
|
||||||
|
(min_date..max_date).each do |date|
|
||||||
|
if h[date].nil?
|
||||||
|
h[date] = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
h
|
||||||
|
end
|
||||||
|
|
||||||
|
def cumulative_hash(association)
|
||||||
|
sum = 0
|
||||||
|
association
|
||||||
|
.group("DATE_TRUNC('month', created_at)")
|
||||||
|
.count
|
||||||
|
.to_a
|
||||||
|
.sort{ |x, y| x[0] <=> y[0] }
|
||||||
|
.map { |x, y| { x => (sum += y)} }
|
||||||
|
.reduce({}, :merge)
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
|
@ -12,10 +12,7 @@ class Users::DescriptionController < UsersController
|
||||||
@procedure = @dossier.procedure
|
@procedure = @dossier.procedure
|
||||||
@champs = @dossier.ordered_champs
|
@champs = @dossier.ordered_champs
|
||||||
|
|
||||||
@headers = @champs.inject([]) do |acc, champ|
|
@headers = @champs.select { |c| c.type_champ == 'header_section' }
|
||||||
acc.push(champ) if champ.type_champ == 'header_section'
|
|
||||||
acc
|
|
||||||
end
|
|
||||||
|
|
||||||
unless @dossier.can_be_initiated?
|
unless @dossier.can_be_initiated?
|
||||||
flash[:alert] = t('errors.messages.procedure_archived')
|
flash[:alert] = t('errors.messages.procedure_archived')
|
||||||
|
@ -34,18 +31,12 @@ class Users::DescriptionController < UsersController
|
||||||
|
|
||||||
@champs = @dossier.ordered_champs
|
@champs = @dossier.ordered_champs
|
||||||
|
|
||||||
mandatory = true
|
check_mandatory_fields = !draft_submission?
|
||||||
mandatory = !(params[:submit].keys.first == 'brouillon') unless params[:submit].nil?
|
|
||||||
|
|
||||||
unless @dossier.update_attributes(create_params)
|
if params[:champs]
|
||||||
@dossier = @dossier.decorate
|
champs_service_errors = ChampsService.save_champs @dossier.champs,
|
||||||
|
params,
|
||||||
flash.alert = @dossier.errors.full_messages.join('<br />').html_safe
|
check_mandatory_fields
|
||||||
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?
|
unless champs_service_errors.empty?
|
||||||
flash.alert = (champs_service_errors.inject('') { |acc, error| acc+= error[:message]+'<br>' }).html_safe
|
flash.alert = (champs_service_errors.inject('') { |acc, error| acc+= error[:message]+'<br>' }).html_safe
|
||||||
|
@ -53,33 +44,30 @@ class Users::DescriptionController < UsersController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if @procedure.cerfa_flag?
|
if @procedure.cerfa_flag? && params[:cerfa_pdf]
|
||||||
unless params[:cerfa_pdf].nil?
|
|
||||||
cerfa = Cerfa.new(content: params[:cerfa_pdf], dossier: @dossier, user: current_user)
|
cerfa = Cerfa.new(content: params[:cerfa_pdf], dossier: @dossier, user: current_user)
|
||||||
unless cerfa.save
|
unless cerfa.save
|
||||||
flash.alert = cerfa.errors.full_messages.join('<br />').html_safe
|
flash.alert = cerfa.errors.full_messages.join('<br />').html_safe
|
||||||
return redirect_to users_dossier_description_path(dossier_id: @dossier.id)
|
return redirect_to users_dossier_description_path(dossier_id: @dossier.id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
unless (errors_upload = PiecesJustificativesService.upload!(@dossier, current_user, params)).empty?
|
errors_upload = PiecesJustificativesService.upload!(@dossier, current_user, params)
|
||||||
|
unless errors_upload.empty?
|
||||||
flash.alert = errors_upload.html_safe
|
flash.alert = errors_upload.html_safe
|
||||||
return redirect_to users_dossier_description_path(dossier_id: @dossier.id)
|
return redirect_to users_dossier_description_path(dossier_id: @dossier.id)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if draft_submission?
|
||||||
if mandatory
|
flash.notice = 'Votre brouillon a bien été sauvegardé.'
|
||||||
|
redirect_to url_for(controller: :dossiers, action: :index, liste: :brouillon)
|
||||||
|
else
|
||||||
if @dossier.draft?
|
if @dossier.draft?
|
||||||
@dossier.initiated!
|
@dossier.initiated!
|
||||||
NotificationMailer.send_notification(@dossier, @dossier.procedure.initiated_mail).deliver_now!
|
NotificationMailer.send_notification(@dossier, @dossier.procedure.initiated_mail).deliver_now!
|
||||||
end
|
end
|
||||||
|
|
||||||
flash.notice = 'Félicitations, votre demande a bien été enregistrée.'
|
flash.notice = 'Félicitations, votre demande a bien été enregistrée.'
|
||||||
redirect_to url_for(controller: :recapitulatif, action: :show, dossier_id: @dossier.id)
|
redirect_to url_for(controller: :recapitulatif, action: :show, dossier_id: @dossier.id)
|
||||||
else
|
|
||||||
flash.notice = 'Votre brouillon a bien été sauvegardé.'
|
|
||||||
redirect_to url_for(controller: :dossiers, action: :index, liste: :brouillon)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -123,6 +111,10 @@ class Users::DescriptionController < UsersController
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
|
def draft_submission?
|
||||||
|
params[:submit] && params[:submit].keys.first == 'brouillon'
|
||||||
|
end
|
||||||
|
|
||||||
def check_autorisation_donnees
|
def check_autorisation_donnees
|
||||||
@dossier = current_user_dossier
|
@dossier = current_user_dossier
|
||||||
|
|
||||||
|
@ -137,9 +129,4 @@ class Users::DescriptionController < UsersController
|
||||||
redirect_to url_for(users_dossier_path(@dossier.id))
|
redirect_to url_for(users_dossier_path(@dossier.id))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def create_params
|
|
||||||
params.permit()
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -122,7 +122,7 @@ class Users::DossiersController < UsersController
|
||||||
@facade = facade params[:dossier][:id]
|
@facade = facade params[:dossier][:id]
|
||||||
|
|
||||||
if checked_autorisation_donnees?
|
if checked_autorisation_donnees?
|
||||||
unless Dossier.find(@facade.dossier.id).update_attributes update_params
|
unless Dossier.find(@facade.dossier.id).update_attributes update_params_with_formatted_birthdate
|
||||||
flash.alert = @facade.dossier.errors.full_messages.join('<br />').html_safe
|
flash.alert = @facade.dossier.errors.full_messages.join('<br />').html_safe
|
||||||
|
|
||||||
return redirect_to users_dossier_path(id: @facade.dossier.id)
|
return redirect_to users_dossier_path(id: @facade.dossier.id)
|
||||||
|
@ -154,6 +154,13 @@ class Users::DossiersController < UsersController
|
||||||
redirect_to url_for users_dossiers_path
|
redirect_to url_for users_dossiers_path
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def procedure_libelle
|
||||||
|
dossier = Dossier.find(params[:dossier_id])
|
||||||
|
render json: { procedureLibelle: dossier.procedure.libelle }
|
||||||
|
rescue ActiveRecord::RecordNotFound
|
||||||
|
render json: {}, status: 404
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def check_siret
|
def check_siret
|
||||||
|
@ -171,6 +178,25 @@ class Users::DossiersController < UsersController
|
||||||
params.require(:dossier).permit(:id, :autorisation_donnees, individual_attributes: [:gender, :nom, :prenom, :birthdate])
|
params.require(:dossier).permit(:id, :autorisation_donnees, individual_attributes: [:gender, :nom, :prenom, :birthdate])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def update_params_with_formatted_birthdate
|
||||||
|
editable_params = update_params
|
||||||
|
|
||||||
|
# If the user was shown a date input field (if its browser supports it),
|
||||||
|
# the returned param will follow the YYYY-MM-DD pattern, which we need
|
||||||
|
# do convert to the DD/MM/YYYY pattern we use
|
||||||
|
if editable_params &&
|
||||||
|
editable_params[:individual_attributes] &&
|
||||||
|
editable_params[:individual_attributes][:birthdate] &&
|
||||||
|
editable_params[:individual_attributes][:birthdate] =~ /^[0-9]{4}-[0-9]{2}-[0-9]{2}$/
|
||||||
|
|
||||||
|
original_birthdate = editable_params[:individual_attributes][:birthdate]
|
||||||
|
formatted_birthdate = I18n.l(original_birthdate.to_date, format: '%d/%m/%Y')
|
||||||
|
editable_params[:individual_attributes][:birthdate] = formatted_birthdate
|
||||||
|
end
|
||||||
|
|
||||||
|
editable_params
|
||||||
|
end
|
||||||
|
|
||||||
def checked_autorisation_donnees?
|
def checked_autorisation_donnees?
|
||||||
update_params[:autorisation_donnees] == '1'
|
update_params[:autorisation_donnees] == '1'
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
class TypeDePieceJustificativeDecorator < Draper::Decorator
|
class TypeDePieceJustificativeDecorator < Draper::Decorator
|
||||||
delegate_all
|
delegate_all
|
||||||
def button_up params
|
def button_up params
|
||||||
|
|
|
@ -28,6 +28,10 @@ class Champ < ActiveRecord::Base
|
||||||
same_date? num, '%M'
|
same_date? num, '%M'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def mandatory_and_blank?
|
||||||
|
mandatory? && value.blank?
|
||||||
|
end
|
||||||
|
|
||||||
def same_date? num, compare
|
def same_date? num, compare
|
||||||
if type_champ == 'datetime' && !value.nil?
|
if type_champ == 'datetime' && !value.nil?
|
||||||
if value.to_datetime.strftime(compare) == num
|
if value.to_datetime.strftime(compare) == num
|
||||||
|
|
|
@ -201,6 +201,8 @@ class Dossier < ActiveRecord::Base
|
||||||
|
|
||||||
scope :archived, -> { where(archived: true) }
|
scope :archived, -> { where(archived: true) }
|
||||||
|
|
||||||
|
scope :downloadable, -> { all_state }
|
||||||
|
|
||||||
def cerfa_available?
|
def cerfa_available?
|
||||||
procedure.cerfa_flag? && cerfa.size != 0
|
procedure.cerfa_flag? && cerfa.size != 0
|
||||||
end
|
end
|
||||||
|
@ -208,19 +210,16 @@ class Dossier < ActiveRecord::Base
|
||||||
def convert_specific_hash_values_to_string(hash_to_convert)
|
def convert_specific_hash_values_to_string(hash_to_convert)
|
||||||
hash = {}
|
hash = {}
|
||||||
hash_to_convert.each do |key, value|
|
hash_to_convert.each do |key, value|
|
||||||
value = value.to_s if !value.kind_of?(Time) && !value.nil?
|
value = serialize_value_for_export(value)
|
||||||
hash.store(key, value)
|
hash.store(key, value)
|
||||||
end
|
end
|
||||||
return hash
|
return hash
|
||||||
end
|
end
|
||||||
|
|
||||||
def convert_specific_array_values_to_string(array_to_convert)
|
def full_data_strings_array
|
||||||
array = []
|
data_with_champs.map do |value|
|
||||||
array_to_convert.each do |value|
|
serialize_value_for_export(value)
|
||||||
value = value.to_s if !value.kind_of?(Time) && !value.nil?
|
|
||||||
array << value
|
|
||||||
end
|
end
|
||||||
return array
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def export_entreprise_data
|
def export_entreprise_data
|
||||||
|
@ -261,23 +260,6 @@ class Dossier < ActiveRecord::Base
|
||||||
return headers
|
return headers
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.export_full_generation(dossiers, format)
|
|
||||||
if dossiers && !dossiers.empty?
|
|
||||||
data = []
|
|
||||||
headers = dossiers.first.export_headers
|
|
||||||
dossiers.each do |dossier|
|
|
||||||
data << dossier.convert_specific_array_values_to_string(dossier.data_with_champs)
|
|
||||||
end
|
|
||||||
if ["csv"].include?(format)
|
|
||||||
return SpreadsheetArchitect.to_csv(data: data, headers: headers)
|
|
||||||
elsif ["xlsx"].include?(format)
|
|
||||||
return SpreadsheetArchitect.to_xlsx(data: data, headers: headers)
|
|
||||||
elsif ["ods"].include?(format)
|
|
||||||
return SpreadsheetArchitect.to_ods(data: data, headers: headers)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def followers_gestionnaires_emails
|
def followers_gestionnaires_emails
|
||||||
follows.includes(:gestionnaire).map { |f| f.gestionnaire }.pluck(:email).join(' ')
|
follows.includes(:gestionnaire).map { |f| f.gestionnaire }.pluck(:email).join(' ')
|
||||||
end
|
end
|
||||||
|
@ -321,4 +303,8 @@ class Dossier < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def serialize_value_for_export(value)
|
||||||
|
value.nil? || value.kind_of?(Time) ? value : value.to_s
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
class Notification < ActiveRecord::Base
|
class Notification < ActiveRecord::Base
|
||||||
belongs_to :dossier
|
belongs_to :dossier
|
||||||
serialize :liste if Rails.env.test?
|
|
||||||
|
|
||||||
# after_save :broadcast_notification
|
# after_save :broadcast_notification
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
class Procedure < ActiveRecord::Base
|
class Procedure < ActiveRecord::Base
|
||||||
has_many :types_de_piece_justificative, dependent: :destroy
|
has_many :types_de_piece_justificative, -> { order "order_place ASC" }, dependent: :destroy
|
||||||
has_many :types_de_champ, class_name: 'TypeDeChampPublic', dependent: :destroy
|
has_many :types_de_champ, class_name: 'TypeDeChampPublic', dependent: :destroy
|
||||||
has_many :types_de_champ_private, dependent: :destroy
|
has_many :types_de_champ_private, dependent: :destroy
|
||||||
has_many :dossiers
|
has_many :dossiers
|
||||||
|
@ -64,10 +64,6 @@ class Procedure < ActiveRecord::Base
|
||||||
types_de_champ_private.order(:order_place)
|
types_de_champ_private.order(:order_place)
|
||||||
end
|
end
|
||||||
|
|
||||||
def types_de_piece_justificative_ordered
|
|
||||||
types_de_piece_justificative.order(:order_place)
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.active id
|
def self.active id
|
||||||
Procedure.where(archived: false, published: true).find(id)
|
Procedure.where(archived: false, published: true).find(id)
|
||||||
end
|
end
|
||||||
|
@ -81,7 +77,7 @@ class Procedure < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def switch_types_de_piece_justificative index_of_first_element
|
def switch_types_de_piece_justificative index_of_first_element
|
||||||
switch_list_order(types_de_piece_justificative_ordered, index_of_first_element)
|
switch_list_order(types_de_piece_justificative, index_of_first_element)
|
||||||
end
|
end
|
||||||
|
|
||||||
def switch_list_order(list, index_of_first_element)
|
def switch_list_order(list, index_of_first_element)
|
||||||
|
@ -130,4 +126,16 @@ class Procedure < ActiveRecord::Base
|
||||||
self.dossiers.where.not(state: :draft).size
|
self.dossiers.where.not(state: :draft).size
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def generate_export
|
||||||
|
exportable_dossiers = dossiers.downloadable
|
||||||
|
|
||||||
|
headers = exportable_dossiers.any? ? exportable_dossiers.first.export_headers : []
|
||||||
|
data = exportable_dossiers.any? ? exportable_dossiers.map { |d| d.full_data_strings_array } : [[]]
|
||||||
|
|
||||||
|
{
|
||||||
|
headers: headers,
|
||||||
|
data: data
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -18,7 +18,8 @@ class TypeDeChamp < ActiveRecord::Base
|
||||||
departements: 'departements',
|
departements: 'departements',
|
||||||
engagement: 'engagement',
|
engagement: 'engagement',
|
||||||
header_section: 'header_section',
|
header_section: 'header_section',
|
||||||
explication: 'explication'
|
explication: 'explication',
|
||||||
|
dossier_link: 'dossier_link'
|
||||||
}
|
}
|
||||||
|
|
||||||
belongs_to :procedure
|
belongs_to :procedure
|
||||||
|
|
|
@ -1,27 +1,41 @@
|
||||||
class ChampsService
|
class ChampsService
|
||||||
def self.save_formulaire champs, params, check_mandatory=true
|
class << self
|
||||||
errors = Array.new
|
def save_champs(champs, params, check_mandatory = true)
|
||||||
|
fill_champs(champs, params)
|
||||||
|
|
||||||
champs.each do |champ|
|
champs.select(&:changed?).each(&:save)
|
||||||
champ.value = params[:champs]["'#{champ.id}'"]
|
|
||||||
|
|
||||||
if champ.type_champ == 'datetime'
|
check_mandatory ? build_error_messages(champs) : []
|
||||||
champ.value = params[:champs]["'#{champ.id}'"]+
|
|
||||||
' ' +
|
|
||||||
params[:time_hour]["'#{champ.id}'"] +
|
|
||||||
':' +
|
|
||||||
params[:time_minute]["'#{champ.id}'"]
|
|
||||||
end
|
end
|
||||||
|
|
||||||
if check_mandatory
|
private
|
||||||
if champ.mandatory? && (champ.value.nil? || champ.value.blank?)
|
|
||||||
errors.push({message: "Le champ #{champ.libelle} doit être rempli."})
|
def fill_champs(champs, h)
|
||||||
end
|
datetimes, not_datetimes = champs.partition { |c| c.type_champ == 'datetime' }
|
||||||
|
|
||||||
|
not_datetimes.each { |c| c.value = h[:champs]["'#{c.id}'"] }
|
||||||
|
datetimes.each { |c| c.value = parse_datetime(c.id, h) }
|
||||||
end
|
end
|
||||||
|
|
||||||
champ.save if champ.changed?
|
def parse_datetime(champ_id, h)
|
||||||
|
"#{h[:champs]["'#{champ_id}'"]} #{extract_hour(champ_id, h)}:#{extract_minute(champ_id, h)}"
|
||||||
end
|
end
|
||||||
|
|
||||||
errors
|
def extract_hour(champ_id, h)
|
||||||
|
h[:time_hour]["'#{champ_id}'"]
|
||||||
|
end
|
||||||
|
|
||||||
|
def extract_minute(champ_id, h)
|
||||||
|
h[:time_minute]["'#{champ_id}'"]
|
||||||
|
end
|
||||||
|
|
||||||
|
def build_error_messages(champs)
|
||||||
|
champs.select(&:mandatory_and_blank?)
|
||||||
|
.map { |c| build_champ_error_message(c) }
|
||||||
|
end
|
||||||
|
|
||||||
|
def build_champ_error_message(champ)
|
||||||
|
{ message: "Le champ #{champ.libelle} doit être rempli." }
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
.row{style:'height: 34px'}
|
.row{ style: 'height: 34px;' }
|
||||||
|
|
||||||
- unless smart_listing.empty?
|
- unless smart_listing.empty?
|
||||||
%table.table#liste_gestionnaire
|
%table.table#liste_gestionnaire
|
||||||
%thead
|
%thead
|
||||||
%th Enlever
|
%th Enlever
|
||||||
%th#email{style:'text-align: right'} Email
|
%th#email{ style: 'text-align: right;' } Email
|
||||||
|
|
||||||
- @accompagnateurs_assign.each do |accompagnateur|
|
- @accompagnateurs_assign.each do |accompagnateur|
|
||||||
%tr
|
%tr
|
||||||
%td.col-md-1.col-lg-1.col-sm-1.col-xs-1.col-sm-1.col-xs-1.center
|
%td.col-md-1.col-lg-1.col-sm-1.col-xs-1.col-sm-1.col-xs-1.center
|
||||||
%a.btn.btn-primary{ href: "#{admin_procedure_accompagnateurs_path(procedure_id: @procedure.id, accompagnateur_id: accompagnateur.id, to: AccompagnateurService::NOT_ASSIGN)}", 'data-method' => 'put' }
|
%a.btn.btn-primary{ href: "#{admin_procedure_accompagnateurs_path(procedure_id: @procedure.id, accompagnateur_id: accompagnateur.id, to: AccompagnateurService::NOT_ASSIGN)}", 'data-method' => 'put' }
|
||||||
.fa.fa-arrow-left
|
.fa.fa-arrow-left
|
||||||
%td{style:'padding-top: 11px; font-size:15px; text-align:right'}= accompagnateur.email
|
%td{ style: 'padding-top: 11px; font-size: 15px; text-align: right;' }= accompagnateur.email
|
||||||
|
|
||||||
= smart_listing.paginate
|
= smart_listing.paginate
|
||||||
= smart_listing.pagination_per_page_links
|
= smart_listing.pagination_per_page_links
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
- @accompagnateurs_not_assign.each do |accompagnateur|
|
- @accompagnateurs_not_assign.each do |accompagnateur|
|
||||||
%tr
|
%tr
|
||||||
%td.col-xs-11{style:'padding-top: 11px; font-size:15px'}= accompagnateur.email
|
%td.col-xs-11{ style: 'padding-top: 11px; font-size: 15px;' }= accompagnateur.email
|
||||||
%td.center
|
%td.center
|
||||||
%a.btn.btn-success.gestionnaire-affectation{ href: "#{admin_procedure_accompagnateurs_path(procedure_id: @procedure.id, accompagnateur_id: accompagnateur.id, to: AccompagnateurService::ASSIGN)}", 'data-method' => 'put' }
|
%a.btn.btn-success.gestionnaire-affectation{ href: "#{admin_procedure_accompagnateurs_path(procedure_id: @procedure.id, accompagnateur_id: accompagnateur.id, to: AccompagnateurService::ASSIGN)}", 'data-method' => 'put' }
|
||||||
.fa.fa-arrow-right
|
.fa.fa-arrow-right
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
.col-xs-2
|
.col-xs-2
|
||||||
%br
|
%br
|
||||||
%br
|
%br
|
||||||
= f.submit 'Valider', class: 'btn btn-info', style: 'float:left', id: 'add-gestionnaire-email'
|
= f.submit 'Valider', class: 'btn btn-info', style: 'float: left;', id: 'add-gestionnaire-email'
|
||||||
.col-xs-6
|
.col-xs-6
|
||||||
%h3.text-success Affectés
|
%h3.text-success Affectés
|
||||||
= smart_listing_render :accompagnateurs_assign
|
= smart_listing_render :accompagnateurs_assign
|
||||||
|
|
|
@ -2,17 +2,17 @@
|
||||||
%table.table#liste_gestionnaire
|
%table.table#liste_gestionnaire
|
||||||
%thead
|
%thead
|
||||||
%th#libelle= smart_listing.sortable 'Email', 'email'
|
%th#libelle= smart_listing.sortable 'Email', 'email'
|
||||||
%th= ''
|
%th
|
||||||
|
|
||||||
- @gestionnaires.each do |gestionnaire|
|
- @gestionnaires.each do |gestionnaire|
|
||||||
%tr
|
%tr
|
||||||
%td{style:'padding-top: 11px; font-size:15px'}= gestionnaire.email
|
%td{ style: 'padding-top: 11px; font-size: 15px;' }= gestionnaire.email
|
||||||
%td{ style: 'text-align:right' }
|
%td{ style: 'text-align: right;' }
|
||||||
.delete.btn.btn-sm.fa.fa-trash
|
.delete.btn.btn-sm.fa.fa-trash
|
||||||
|
|
||||||
.confirm
|
.confirm
|
||||||
= link_to 'Valider', admin_gestionnaire_path(id: gestionnaire.id), { method: :delete, class: 'btn btn-sm btn-success' }
|
= link_to 'Valider', admin_gestionnaire_path(id: gestionnaire.id), { method: :delete, class: 'btn btn-sm btn-success' }
|
||||||
.cancel.btn.btn-sm.btn-danger.fa.fa-minus{style: 'top: 0'}
|
.cancel.btn.btn-sm.btn-danger.fa.fa-minus{ style: 'top: 0;' }
|
||||||
|
|
||||||
= smart_listing.paginate
|
= smart_listing.paginate
|
||||||
= smart_listing.pagination_per_page_links
|
= smart_listing.pagination_per_page_links
|
||||||
|
|
|
@ -16,4 +16,4 @@
|
||||||
.col-xs-2
|
.col-xs-2
|
||||||
%br
|
%br
|
||||||
%br
|
%br
|
||||||
= f.submit 'Valider', class: 'btn btn-info', style: 'float:left'
|
= f.submit 'Valider', class: 'btn btn-info', style: 'float: left;'
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
= form_for [:admin, @procedure], url: admin_procedure_pieces_justificatives_path(@procedure), remote: true do |f|
|
= form_for [:admin, @procedure], url: admin_procedure_pieces_justificatives_path(@procedure), remote: true do |f|
|
||||||
#liste_piece_justificative
|
#liste_piece_justificative
|
||||||
= render partial: 'fields', locals:{ types_de_piece_justificative: @procedure.types_de_piece_justificative_ordered.decorate, f: f }
|
= render partial: 'fields', locals: { types_de_piece_justificative: @procedure.types_de_piece_justificative.decorate, f: f }
|
||||||
= f.submit "Enregistrer", class: 'btn btn-success', id: :save
|
= f.submit "Enregistrer", class: 'btn btn-success', id: :save
|
||||||
%hr
|
%hr
|
||||||
#new_type_de_piece_justificative
|
#new_type_de_piece_justificative
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
- if @procedure.locked?
|
- if @procedure.locked?
|
||||||
.alert.alert-info
|
.alert.alert-info
|
||||||
Cette procédure est publiée, certains éléments de la description ne sont plus modifiables
|
Cette procédure est publiée, certains éléments de la description ne sont plus modifiables
|
||||||
|
@ -17,10 +16,10 @@
|
||||||
.col-md-6
|
.col-md-6
|
||||||
%h4 Logo de la procédure
|
%h4 Logo de la procédure
|
||||||
- unless @procedure.logo.blank?
|
- unless @procedure.logo.blank?
|
||||||
= image_tag @procedure.decorate.logo_img, {style: 'height: 40px; display: inline; margin-right: 6px', id: 'preview_procedure_logo'}
|
= image_tag @procedure.decorate.logo_img, { style: 'height: 40px; display: inline; margin-right: 6px;', id: 'preview_procedure_logo' }
|
||||||
= f.file_field :logo, accept: 'image/png, image/jpg, image/jpeg', style: 'display: inline'
|
= f.file_field :logo, accept: 'image/png, image/jpg, image/jpeg', style: 'display: inline'
|
||||||
|
|
||||||
%div{style:'margin-top:5px'}
|
%div{ style: 'margin-top: 5px;' }
|
||||||
%i
|
%i
|
||||||
Fichier accepté : JPG / JPEG / PNG
|
Fichier accepté : JPG / JPEG / PNG
|
||||||
.col-md-6
|
.col-md-6
|
||||||
|
@ -85,11 +84,8 @@
|
||||||
%h4 Options avancées
|
%h4 Options avancées
|
||||||
|
|
||||||
%label{ for: :auto_archive_on } Archivage automatique le
|
%label{ for: :auto_archive_on } Archivage automatique le
|
||||||
= f.text_field :auto_archive_on, id: 'auto_archive_on', value: @procedure.auto_archive_on.try{ |d| d.strftime("%d-%m-%Y") }, data: { provide: 'datepicker', 'date-format' => 'dd/mm/yyyy' }
|
= f.text_field :auto_archive_on, id: 'auto_archive_on', value: @procedure.auto_archive_on.try{ |d| d.strftime("%d-%m-%Y") }, data: { provide: 'datepicker', 'date-language' => 'fr', 'date-format' => 'dd/mm/yyyy' }
|
||||||
(à 00h00)
|
(à 00h00)
|
||||||
%p.help-block
|
%p.help-block
|
||||||
%i.fa.fa-info-circle
|
%i.fa.fa-info-circle
|
||||||
L'archivage automatique de la procédure entrainera le passage en instruction de tous les dossiers en construction.
|
L'archivage automatique de la procédure entrainera le passage en instruction de tous les dossiers en construction.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,9 +4,9 @@
|
||||||
%th#ID= smart_listing.sortable 'ID', 'id'
|
%th#ID= smart_listing.sortable 'ID', 'id'
|
||||||
%th#libelle= smart_listing.sortable 'Libellé', 'libelle'
|
%th#libelle= smart_listing.sortable 'Libellé', 'libelle'
|
||||||
- if @active_class
|
- if @active_class
|
||||||
%th#lien Lien
|
%th Lien
|
||||||
%th#created_at= smart_listing.sortable 'Date création', 'created_at'
|
%th#created_at= smart_listing.sortable 'Date création', 'created_at'
|
||||||
%th#lien Actions
|
%th Actions
|
||||||
|
|
||||||
- @procedures.each do |procedure|
|
- @procedures.each do |procedure|
|
||||||
- procedure = procedure.decorate
|
- procedure = procedure.decorate
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
placeholder: 'Chemin vers la procédure',
|
placeholder: 'Chemin vers la procédure',
|
||||||
class: 'form-control',
|
class: 'form-control',
|
||||||
maxlength: 30,
|
maxlength: 30,
|
||||||
style: 'width: 300px; display: inline')
|
style: 'width: 300px; display: inline;')
|
||||||
#path_messages
|
#path_messages
|
||||||
#path_is_mine.text-warning.center.message
|
#path_is_mine.text-warning.center.message
|
||||||
Ce lien est déjà utilisé par une de vos procédure.
|
Ce lien est déjà utilisé par une de vos procédure.
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
type: 'email',
|
type: 'email',
|
||||||
placeholder: 'Email administrateur cible',
|
placeholder: 'Email administrateur cible',
|
||||||
style: 'width: 300px; margin-left:auto; margin-right:auto' }
|
style: 'width: 300px; margin-left:auto; margin-right:auto' }
|
||||||
%div#not_found_admin.center.text-danger{style:'display:none; margin-top: 10px'}
|
%div#not_found_admin.center.text-danger{ style:'display: none; margin-top: 10px;' }
|
||||||
Cet administrateur n'existe pas.
|
Cet administrateur n'existe pas.
|
||||||
.modal-footer
|
.modal-footer
|
||||||
= submit_tag "Envoyer", class: 'btn btn-success'
|
= submit_tag "Envoyer", class: 'btn btn-success'
|
||||||
|
|
|
@ -3,15 +3,15 @@
|
||||||
%li{ class: @draft_class }
|
%li{ class: @draft_class }
|
||||||
%a{ :href => "#{url_for :admin_procedures_draft}" }
|
%a{ :href => "#{url_for :admin_procedures_draft}" }
|
||||||
%h5.text-primary
|
%h5.text-primary
|
||||||
="Brouillons"
|
Brouillons
|
||||||
|
|
||||||
%li{ class: @active_class }
|
%li{ class: @active_class }
|
||||||
%a{ :href => "#{url_for :admin_procedures}" }
|
%a{ :href => "#{url_for :admin_procedures}" }
|
||||||
%h5.text-success
|
%h5.text-success
|
||||||
= "Actives"
|
Actives
|
||||||
|
|
||||||
%li{ class: @archived_class }
|
%li{ class: @archived_class }
|
||||||
%a{ :href => "#{url_for :admin_procedures_archived}" }
|
%a{ :href => "#{url_for :admin_procedures_archived}" }
|
||||||
%h5{style: 'color: black'}
|
%h5{ style: 'color: black;' }
|
||||||
="Archivées"
|
Archivées
|
||||||
%br
|
%br
|
|
@ -1,14 +1,14 @@
|
||||||
#admins_index
|
#admins_index
|
||||||
.default_data_block.default_visible
|
.default_data_block.default_visible
|
||||||
%div.row.show-block#new_dossiers
|
.row.show-block#new_dossiers
|
||||||
%div.header
|
.header
|
||||||
%div.col-lg-10.col-md-10.col-sm-10.col-xs-10.title
|
.col-lg-10.col-md-10.col-sm-10.col-xs-10.title
|
||||||
%div.carret-right
|
.carret-right
|
||||||
%div.carret-down
|
.carret-down
|
||||||
Procédures
|
Procédures
|
||||||
%a{ href: '/admin/procedures/new' }
|
%a{ href: '/admin/procedures/new' }
|
||||||
%div#new-procedure.col-lg-2.col-md-2.col-sm-2.col-xs-2.action
|
%div#new-procedure.col-lg-2.col-md-2.col-sm-2.col-xs-2.action
|
||||||
Nouvelle
|
Nouvelle
|
||||||
|
|
||||||
%div.body
|
.body
|
||||||
= smart_listing_render :procedures
|
= smart_listing_render :procedures
|
||||||
|
|
|
@ -5,4 +5,4 @@
|
||||||
#procedure_new.section.section-label
|
#procedure_new.section.section-label
|
||||||
= form_for @procedure, url: { controller: 'admin/procedures', action: :create }, multipart: true do |f|
|
= form_for @procedure, url: { controller: 'admin/procedures', action: :create }, multipart: true do |f|
|
||||||
= render partial: 'informations', locals: { f: f }
|
= render partial: 'informations', locals: { f: f }
|
||||||
= f.submit 'Valider', class: 'btn btn-info', id: 'save-procedure', style: 'float:right'
|
= f.submit 'Valider', class: 'btn btn-info', id: 'save-procedure', style: 'float: right;'
|
||||||
|
|
|
@ -2,34 +2,34 @@
|
||||||
#procedure_show
|
#procedure_show
|
||||||
- unless @facade.procedure.published?
|
- unless @facade.procedure.published?
|
||||||
- if @facade.procedure.gestionnaires.size == 0
|
- if @facade.procedure.gestionnaires.size == 0
|
||||||
%a.action_button.btn.btn-success{style:'float: right; margin-top: 10px', disabled: 'disabled', 'data-toggle' => :tooltip, title: 'Vous ne pouvez pas publier une procédure sans qu\'aucun accompagnateur ne soit affecté à celle-ci.', id: 'publish-procedure'}
|
%a.action_button.btn.btn-success{ style: 'float: right; margin-top: 10px;', disabled: 'disabled', 'data-toggle' => :tooltip, title: 'Vous ne pouvez pas publier une procédure sans qu\'aucun accompagnateur ne soit affecté à celle-ci.', id: 'publish-procedure' }
|
||||||
%i.fa.fa-eraser
|
%i.fa.fa-eraser
|
||||||
Publier
|
Publier
|
||||||
- else
|
- else
|
||||||
%a.btn.btn-success{"data-target" => "#publishModal", "data-toggle" => "modal", :type => "button", style:'float: right; margin-top: 10px', id: 'publish-procedure'}
|
%a.btn.btn-success{ "data-target" => "#publishModal", "data-toggle" => "modal", :type => "button", style: 'float: right; margin-top: 10px;', id: 'publish-procedure' }
|
||||||
%i.fa.fa-eraser
|
%i.fa.fa-eraser
|
||||||
Publier
|
Publier
|
||||||
|
|
||||||
= render partial: '/admin/procedures/modal_publish'
|
= render partial: '/admin/procedures/modal_publish'
|
||||||
|
|
||||||
%a#transfer.btn.btn-small.btn-default{"data-target" => "#transferModal", "data-toggle" => "modal", :type => "button", style:'float: right; margin-top: 10px; margin-right: 10px'}
|
%a#transfer.btn.btn-small.btn-default{ "data-target" => "#transferModal", "data-toggle" => "modal", :type => "button", style: 'float: right; margin-top: 10px; margin-right: 10px;' }
|
||||||
%i.fa.fa-exchange
|
%i.fa.fa-exchange
|
||||||
Transférer
|
Transférer
|
||||||
|
|
||||||
= render partial: '/admin/procedures/modal_transfer'
|
= render partial: '/admin/procedures/modal_transfer'
|
||||||
|
|
||||||
- if @facade.procedure.archived?
|
- if @facade.procedure.archived?
|
||||||
%a#reenable.btn.btn-small.btn-default.text-info{"data-target" => "#publishModal", "data-toggle" => "modal", :type => "button", style:'float: right; margin-top: 10px'}
|
%a#reenable.btn.btn-small.btn-default.text-info{ "data-target" => "#publishModal", "data-toggle" => "modal", :type => "button", style: 'float: right; margin-top: 10px;' }
|
||||||
%i.fa.fa-eraser
|
%i.fa.fa-eraser
|
||||||
Réactiver
|
Réactiver
|
||||||
|
|
||||||
= render partial: '/admin/procedures/modal_publish'
|
= render partial: '/admin/procedures/modal_publish'
|
||||||
|
|
||||||
- elsif @facade.procedure.published?
|
- elsif @facade.procedure.published?
|
||||||
= form_tag admin_procedure_archive_path(procedure_id: @facade.procedure.id, archive: !@facade.procedure.archived?), method: :put, style:'float: right; margin-top: 10px' do
|
= form_tag admin_procedure_archive_path(procedure_id: @facade.procedure.id, archive: !@facade.procedure.archived?), method: :put, style: 'float: right; margin-top: 10px;' do
|
||||||
%button#archive.btn.btn-small.btn-default.text-info{ type: :button }
|
%button#archive.btn.btn-small.btn-default.text-info{ type: :button }
|
||||||
%i.fa.fa-eraser
|
%i.fa.fa-eraser
|
||||||
= 'Archiver'
|
Archiver
|
||||||
#confirm
|
#confirm
|
||||||
%button#valid.btn.btn-small.btn-success{ type: :submit }
|
%button#valid.btn.btn-small.btn-success{ type: :submit }
|
||||||
%i.fa.fa-check
|
%i.fa.fa-check
|
||||||
|
@ -45,7 +45,7 @@
|
||||||
|
|
||||||
%div
|
%div
|
||||||
%h3 Lien procédure
|
%h3 Lien procédure
|
||||||
%div{style:'margin-left:3%'}
|
%div{ style: 'margin-left: 3%;' }
|
||||||
- if @facade.procedure.published?
|
- if @facade.procedure.published?
|
||||||
= link_to @facade.procedure.lien, @facade.procedure.lien, target: '_blank'
|
= link_to @facade.procedure.lien, @facade.procedure.lien, target: '_blank'
|
||||||
- else
|
- else
|
||||||
|
@ -93,7 +93,7 @@
|
||||||
= t('dynamics.admin.procedure.stats.title')
|
= t('dynamics.admin.procedure.stats.title')
|
||||||
|
|
||||||
.row
|
.row
|
||||||
.col-xs-6{style:'margin-left:3%'}
|
.col-xs-6{ style: 'margin-left: 3%;' }
|
||||||
%h4 Total
|
%h4 Total
|
||||||
%div
|
%div
|
||||||
= @facade.dossiers_total
|
= @facade.dossiers_total
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
%h4 Description
|
%h4 Description
|
||||||
= ff.text_area :description, class: 'form-control description', placeholder: 'Description', rows: 3
|
= ff.text_area :description, class: 'form-control description', placeholder: 'Description', rows: 3
|
||||||
|
|
||||||
.form-group.drop_down_list{ class: (%w(drop_down_list multiple_drop_down_list).include?(type_champ) ? 'show_inline' : nil), style: 'margin-right: 5px' }
|
.form-group.drop_down_list{ class: (%w(drop_down_list multiple_drop_down_list).include?(type_champ) ? 'show_inline' : nil), style: 'margin-right: 5px;' }
|
||||||
%h4 Liste déroulante
|
%h4 Liste déroulante
|
||||||
= ff.fields_for :drop_down_list_attributes, ff.object.object.drop_down_list do |fff|
|
= ff.fields_for :drop_down_list_attributes, ff.object.object.drop_down_list do |fff|
|
||||||
~ fff.text_area :value, class: 'form-control drop_down_list', placeholder: "Ecrire une valeur par ligne et --valeur-- pour un séparateur.", rows: 3, cols: 30
|
~ fff.text_area :value, class: 'form-control drop_down_list', placeholder: "Ecrire une valeur par ligne et --valeur-- pour un séparateur.", rows: 3, cols: 30
|
||||||
|
@ -46,5 +46,3 @@
|
||||||
= link_to("", @types_de_champ_facade.delete_url(ff), method: :delete, remote: true, id: "delete_type_de_champ_#{ff.object.id}", class: %w(form-control btn btn-danger fa fa-trash-o) )
|
= link_to("", @types_de_champ_facade.delete_url(ff), method: :delete, remote: true, id: "delete_type_de_champ_#{ff.object.id}", class: %w(form-control btn btn-danger fa fa-trash-o) )
|
||||||
|
|
||||||
%div{ style: 'background-color: rgb(204, 204, 204); height: 1px; margin: 30px auto;' }
|
%div{ style: 'background-color: rgb(204, 204, 204); height: 1px; margin: 30px auto;' }
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -7,9 +7,6 @@
|
||||||
|
|
||||||
= f.submit 'Créer un administrateur', class: 'btn btn-success', id: 'submit_new_administrateur'
|
= f.submit 'Créer un administrateur', class: 'btn btn-success', id: 'submit_new_administrateur'
|
||||||
|
|
||||||
.text-center
|
|
||||||
=link_to 'Stats', administrations_stats_path, style: 'margin-bottom: 50px; display: block', 'data-no-turbolink': true
|
|
||||||
|
|
||||||
= smart_listing_render :admins
|
= smart_listing_render :admins
|
||||||
|
|
||||||
%br
|
%br
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
= javascript_include_tag 'https://code.highcharts.com/highcharts.js', 'chartkick'
|
|
||||||
|
|
||||||
.container
|
|
||||||
.stats
|
|
||||||
.stat-card
|
|
||||||
%h1 Procédures créées
|
|
||||||
= line_chart @procedures
|
|
||||||
|
|
||||||
.stat-card
|
|
||||||
%h1 Dossiers créés
|
|
||||||
= line_chart @dossiers
|
|
|
@ -1,10 +1,10 @@
|
||||||
%div.filter_framed.panel.panel-primary{id: "#{filter_framed_id}", style:'width: 300px; height: 100px; position: absolute; top: 0; left: 0; display: none'}
|
.filter_framed.panel.panel-primary{ id: "#{filter_framed_id}", style: 'width: 300px; height: 100px; position: absolute; top: 0; left: 0; display: none;' }
|
||||||
.panel-heading
|
.panel-heading
|
||||||
= preference.libelle
|
= preference.libelle
|
||||||
|
|
||||||
= form_tag @facade_data_view.filter_url, { class: 'panel-body form-inline', method: :post } do
|
= form_tag @facade_data_view.filter_url, { class: 'panel-body form-inline', method: :post } do
|
||||||
%input.form-control.filter_input{name: "filter_input[#{preference.table_attr}]", style:'width: 69%', value: "#{preference.filter}"}
|
%input.form-control.filter_input{ name: "filter_input[#{preference.table_attr}]", style: 'width: 69%;', value: "#{preference.filter}" }
|
||||||
%button.btn.btn-sm.btn-success
|
%button.btn.btn-sm.btn-success
|
||||||
%i.fa.fa-check
|
%i.fa.fa-check
|
||||||
%div.btn.btn-sm.btn-danger.erase-filter
|
.btn.btn-sm.btn-danger.erase-filter
|
||||||
%i.fa.fa-remove
|
%i.fa.fa-remove
|
||||||
|
|
|
@ -11,5 +11,3 @@
|
||||||
= follower.email
|
= follower.email
|
||||||
- else
|
- else
|
||||||
Aucune personne ne suit ce dossier
|
Aucune personne ne suit ce dossier
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
%h3
|
%h3
|
||||||
= t('dynamics.backoffice.pref_list.title')
|
= t('dynamics.backoffice.pref_list.title')
|
||||||
|
|
||||||
%p{style:'margin-top: 15px; margin-bottom: 20px'}
|
%p{ style: 'margin-top: 15px; margin-bottom: 20px;' }
|
||||||
= t('dynamics.backoffice.pref_list.description')
|
= t('dynamics.backoffice.pref_list.description')
|
||||||
|
|
||||||
%h4.text-primary
|
%h4.text-primary
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
%button.btn.btn-default.btn-xs{ type: :submit, id: "delete_pref_list_#{preference[:table]}_#{preference[:attr]}" }
|
%button.btn.btn-default.btn-xs{ type: :submit, id: "delete_pref_list_#{preference[:table]}_#{preference[:attr]}" }
|
||||||
%i.fa.fa-minus
|
%i.fa.fa-minus
|
||||||
|
|
||||||
%h4.text-success{style:'margin-top: 15px'}
|
%h4.text-success{ style: 'margin-top: 15px;' }
|
||||||
Disponibles
|
Disponibles
|
||||||
|
|
||||||
%table
|
%table
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
- if index%2 == 0 || tables.first.to_s.include?('champs')
|
- if index%2 == 0 || tables.first.to_s.include?('champs')
|
||||||
%tr
|
%tr
|
||||||
|
|
||||||
%td.col-xs-5{style: 'vertical-align: top', colspan: (tables.first == :champs ? 2 : 1)}
|
%td.col-xs-5{ style: 'vertical-align: top;', colspan: (tables.first == :champs ? 2 : 1) }
|
||||||
%h5= tables.first.to_s.gsub('_', ' ').capitalize
|
%h5= tables.first.to_s.gsub('_', ' ').capitalize
|
||||||
%ul
|
%ul
|
||||||
- if tables.second
|
- if tables.second
|
||||||
|
@ -44,4 +44,3 @@
|
||||||
= columns.second[:libelle]
|
= columns.second[:libelle]
|
||||||
%button.btn.btn-default.btn-xs{ type: :submit, id: "add_pref_list_#{columns.second[:table]}_#{columns.second[:attr]}" }
|
%button.btn.btn-default.btn-xs{ type: :submit, id: "add_pref_list_#{columns.second[:table]}_#{columns.second[:attr]}" }
|
||||||
%i.fa.fa-plus
|
%i.fa.fa-plus
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
#state_description.row{style:'width: 50%; margin-left: auto; margin-right: auto'}
|
#state_description.row{ style: 'width: 50%; margin-left: auto; margin-right: auto;' }
|
||||||
.panel.panel-info
|
.panel.panel-info
|
||||||
.panel-body.center
|
.panel-body.center
|
||||||
.row
|
.row
|
||||||
.col-md-1.col-lg-1.col-sm-1.col-xs-1.col-sm-1.col-xs-1
|
.col-md-1.col-lg-1.col-sm-1.col-xs-1.col-sm-1.col-xs-1
|
||||||
.fa.fa-info-circle.text-info{style:'font-size: 2em; margin-top: 20%'}
|
.fa.fa-info-circle.text-info{ style: 'font-size: 2em; margin-top: 20%;' }
|
||||||
.col-xs-11
|
.col-xs-11
|
||||||
- if dossiers_list_facade.liste == 'nouveaux'
|
- if dossiers_list_facade.liste == 'nouveaux'
|
||||||
Tous les dossiers présents dans cette liste sont ceux qui
|
Tous les dossiers présents dans cette liste sont ceux qui
|
||||||
|
|
|
@ -3,15 +3,14 @@
|
||||||
= render partial: 'backoffice/dossiers/pref_list'
|
= render partial: 'backoffice/dossiers/pref_list'
|
||||||
|
|
||||||
.default_data_block.default_visible
|
.default_data_block.default_visible
|
||||||
%div.row.show-block#new_dossiers
|
.row.show-block#new_dossiers
|
||||||
%div.header
|
.header
|
||||||
%div.col-lg-10.col-md-10.col-sm-10.col-xs-10.title
|
.col-lg-10.col-md-10.col-sm-10.col-xs-10.title
|
||||||
%div.carret-right
|
.carret-right
|
||||||
%div.carret-down
|
.carret-down
|
||||||
Résultat de la recherche
|
Résultat de la recherche
|
||||||
%div.col-lg-2.col-md-2.col-sm-2.col-xs-2.count
|
.col-lg-2.col-md-2.col-sm-2.col-xs-2.count
|
||||||
= @dossiers.count
|
= @dossiers.count
|
||||||
dossiers
|
dossiers
|
||||||
%div.body
|
.body
|
||||||
= smart_listing_render :search
|
= smart_listing_render :search
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
%div{ style: 'text-align: center; max-width: 500px; margin-left: auto; margin-right: auto; padding: 20px;' }
|
%div{ style: 'text-align: center; max-width: 500px; margin-left: auto; margin-right: auto; padding: 20px;' }
|
||||||
= render partial: 'users/sessions/resume_procedure'
|
= render partial: 'users/sessions/resume_procedure'
|
||||||
|
|
||||||
.center{style:'margin-top: -20px'}
|
.center{ style: 'margin-top: -20px;' }
|
||||||
%h3
|
%h3
|
||||||
La campagne de création de nouveau dossier
|
La campagne de création de nouveau dossier
|
||||||
%br
|
%br
|
||||||
|
|
|
@ -16,8 +16,7 @@
|
||||||
%tr
|
%tr
|
||||||
%td= file.user.nil? ? 'Accompagnateur' : file.user.email
|
%td= file.user.nil? ? 'Accompagnateur' : file.user.email
|
||||||
%td= file.created_at.localtime
|
%td= file.created_at.localtime
|
||||||
%td= link_to file.original_filename, file.content_url, style:'color: green', target: '_blank'
|
%td= link_to file.original_filename, file.content_url, style: 'color: green;', target: '_blank'
|
||||||
- else
|
- else
|
||||||
%h4.text-primary
|
%h4.text-primary
|
||||||
Pas de fichier dans le flux de commentaires.
|
Pas de fichier dans le flux de commentaires.
|
||||||
|
|
||||||
|
|
|
@ -2,48 +2,48 @@
|
||||||
|
|
||||||
- if @facade.procedure.individual_with_siret
|
- if @facade.procedure.individual_with_siret
|
||||||
.default_data_block
|
.default_data_block
|
||||||
%div.row.show-block.infos
|
.row.show-block.infos
|
||||||
%div.header
|
.header
|
||||||
%div.col-xs-8.title-no-expanse
|
.col-xs-8.title-no-expanse
|
||||||
%div.carret-right
|
.carret-right
|
||||||
INFORMATIONS DU DEMANDEUR
|
INFORMATIONS DU DEMANDEUR
|
||||||
- if !@current_gestionnaire && ["draft", "updated", "replied", "initiated"].include?(@facade.dossier.state)
|
- if !@current_gestionnaire && ["draft", "updated", "replied", "initiated"].include?(@facade.dossier.state)
|
||||||
%a#add_siret.action{ href: users_dossier_add_siret_path(dossier_id: @facade.dossier.id) }
|
%a#add_siret.action{ href: users_dossier_add_siret_path(dossier_id: @facade.dossier.id) }
|
||||||
%div.col-lg-4.col-md-4.col-sm-4.col-xs-4.action
|
.col-lg-4.col-md-4.col-sm-4.col-xs-4.action
|
||||||
= "Renseigner un SIRET"
|
Renseigner un SIRET
|
||||||
|
|
||||||
- unless @facade.entreprise.nil?
|
- unless @facade.entreprise.nil?
|
||||||
.default_data_block
|
.default_data_block
|
||||||
%div.row.show-block.infos#infos_entreprise
|
.row.show-block.infos#infos_entreprise
|
||||||
%div.header
|
.header
|
||||||
%div.col-xs-12.title
|
.col-xs-12.title
|
||||||
%div.carret-right
|
.carret-right
|
||||||
%div.carret-down
|
.carret-down
|
||||||
INFORMATIONS DU DEMANDEUR
|
INFORMATIONS DU DEMANDEUR
|
||||||
%div.body.display-block-on-print
|
.body.display-block-on-print
|
||||||
= render partial: '/dossiers/infos_entreprise'
|
= render partial: '/dossiers/infos_entreprise'
|
||||||
|
|
||||||
.default_data_block.default_visible
|
.default_data_block.default_visible
|
||||||
%div.row.show-block.infos#infos_dossier
|
.row.show-block.infos#infos_dossier
|
||||||
%div.header
|
.header
|
||||||
%div.col-xs-10.title
|
.col-xs-10.title
|
||||||
%div.carret-right
|
.carret-right
|
||||||
%div.carret-down
|
.carret-down
|
||||||
CONSTRUCTION DU DOSSIER
|
CONSTRUCTION DU DOSSIER
|
||||||
= render partial: '/dossiers/edit_dossier'
|
= render partial: '/dossiers/edit_dossier'
|
||||||
%div.body.display-block-on-print
|
.body.display-block-on-print
|
||||||
= render partial: '/dossiers/infos_dossier'
|
= render partial: '/dossiers/infos_dossier'
|
||||||
|
|
||||||
- if @facade.dossier.procedure.module_api_carto.use_api_carto
|
- if @facade.dossier.procedure.module_api_carto.use_api_carto
|
||||||
.default_data_block.default_visible.no-page-break-inside
|
.default_data_block.default_visible.no-page-break-inside
|
||||||
%div.row.show-block#carto
|
.row.show-block#carto
|
||||||
%div.header
|
.header
|
||||||
%div.col-xs-10.title
|
.col-xs-10.title
|
||||||
%div.carret-right
|
.carret-right
|
||||||
%div.carret-down
|
.carret-down
|
||||||
CARTOGRAPHIE
|
CARTOGRAPHIE
|
||||||
= render partial: '/dossiers/edit_carto'
|
= render partial: '/dossiers/edit_carto'
|
||||||
%div.body.display-block-on-print
|
.body.display-block-on-print
|
||||||
%input{ id: 'json_latlngs', type: 'hidden', value: "#{@facade.dossier.json_latlngs}", name: 'json_latlngs' }
|
%input{ id: 'json_latlngs', type: 'hidden', value: "#{@facade.dossier.json_latlngs}", name: 'json_latlngs' }
|
||||||
%input{ id: 'quartier_prioritaires', type: 'hidden', value: "#{@facade.dossier.quartier_prioritaires.to_json}" }
|
%input{ id: 'quartier_prioritaires', type: 'hidden', value: "#{@facade.dossier.quartier_prioritaires.to_json}" }
|
||||||
%input{ id: 'cadastres', type: 'hidden', value: "#{@facade.dossier.cadastres.to_json}" }
|
%input{ id: 'cadastres', type: 'hidden', value: "#{@facade.dossier.cadastres.to_json}" }
|
||||||
|
@ -54,14 +54,14 @@
|
||||||
|
|
||||||
- if @current_gestionnaire && gestionnaire_signed_in? && @champs_private.count > 0
|
- if @current_gestionnaire && gestionnaire_signed_in? && @champs_private.count > 0
|
||||||
.default_data_block.default_visible
|
.default_data_block.default_visible
|
||||||
%div.row.show-block#private-fields
|
.row.show-block#private-fields
|
||||||
%div.header
|
.header
|
||||||
%div.col-xs-10.title
|
.col-xs-10.title
|
||||||
%div.carret-right
|
.carret-right
|
||||||
%div.carret-down
|
.carret-down
|
||||||
= "formulaire privé".upcase
|
= "formulaire privé".upcase
|
||||||
%div.col-xs-2.count
|
.col-xs-2.count
|
||||||
- private_fields_count = @champs_private.count
|
- private_fields_count = @champs_private.count
|
||||||
= (private_fields_count == 1) ? "1 champ" : "#{private_fields_count} champs"
|
= (private_fields_count == 1) ? "1 champ" : "#{private_fields_count} champs"
|
||||||
%div.body
|
.body
|
||||||
= render partial: '/dossiers/infos_private_fields'
|
= render partial: '/dossiers/infos_private_fields'
|
||||||
|
|
|
@ -1,12 +1,7 @@
|
||||||
%div.dropdown.pull-right#download-menu
|
.dropdown.pull-right#download-menu
|
||||||
- if @facade_data_view.dossiers_to_display.count > 400
|
%a.dropdown-toggle.button_navbar{ type: :button, 'data-toggle' => 'dropdown', 'aria-haspopup' => true, 'aria-expanded' => false }
|
||||||
%button.btn.btn-error.dropdown-toggle#dropdownDownloadMenu{ type: :button, 'data-toggle' => 'dropdown', 'aria-haspopup' => true, 'aria-expanded' => false, class: 'disabled'}
|
|
||||||
%span{'data-toggle' => :tooltip, "data-placement" => :left, title: 'Pour réduire le nombre de dossiers et ne pas dépasser la limite autorisée de 400, merci de bien vouloir appliquer des filtres.'}
|
|
||||||
= t('dynamics.backoffice.limit_excess_download_all_dossiers')
|
|
||||||
- else
|
|
||||||
%a.dropdown-toggle#dropdownDownloadMenu.button_navbar{ type: :button, 'data-toggle' => 'dropdown', 'aria-haspopup' => true, 'aria-expanded' => false }
|
|
||||||
%i.fa.fa-download
|
%i.fa.fa-download
|
||||||
= t('dynamics.backoffice.download_all_dossiers')
|
Télécharger tous les dossiers
|
||||||
%span.caret
|
%span.caret
|
||||||
%ul.dropdown-menu.dropdown-menu-right
|
%ul.dropdown-menu.dropdown-menu-right
|
||||||
%li
|
%li
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
- unless @facade.dossier.read_only?
|
- unless @facade.dossier.read_only?
|
||||||
- if user_signed_in? && (@facade.dossier.owner?(current_user.email) || @facade.dossier.invite_by_user?(current_user.email))
|
- if user_signed_in? && (@facade.dossier.owner?(current_user.email) || @facade.dossier.invite_by_user?(current_user.email))
|
||||||
%a#maj_carte.action{ href: "/users/dossiers/#{@facade.dossier.id}/carte" }
|
%a#maj_carte.action{ href: "/users/dossiers/#{@facade.dossier.id}/carte" }
|
||||||
%div.col-lg-2.col-md-2.col-sm-2.col-xs-2.action
|
.col-lg-2.col-md-2.col-sm-2.col-xs-2.action
|
||||||
= 'éditer'.upcase
|
= 'éditer'.upcase
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
- unless @facade.dossier.read_only?
|
- unless @facade.dossier.read_only?
|
||||||
- if user_signed_in? && (@facade.dossier.owner?(current_user.email) || @facade.dossier.invite_by_user?(current_user.email))
|
- if user_signed_in? && (@facade.dossier.owner?(current_user.email) || @facade.dossier.invite_by_user?(current_user.email))
|
||||||
- if @facade.procedure.cerfa_flag? || @facade.dossier.types_de_piece_justificative.size > 0
|
- if @facade.procedure.cerfa_flag? || @facade.dossier.types_de_piece_justificative.size > 0
|
||||||
%div.col-lg-4.col-md-4.col-sm-4.col-xs-4.action
|
.col-lg-4.col-md-4.col-sm-4.col-xs-4.action
|
||||||
%a#maj_pj.action{ "data-target" => "#UploadPJmodal",
|
%a#maj_pj.action{ "data-target" => "#UploadPJmodal",
|
||||||
"data-toggle" => "modal",
|
"data-toggle" => "modal",
|
||||||
:type => "button",
|
:type => "button",
|
||||||
style: 'margin-bottom: 15px; margin-top: -30px'}
|
style: 'margin-bottom: 15px; margin-top: -30px;' }
|
||||||
Modifier les documents
|
Modifier les documents
|
||||||
%br
|
%br
|
||||||
= render partial: 'users/recapitulatif/modal_upload_pj'
|
= render partial: 'users/recapitulatif/modal_upload_pj'
|
||||||
|
|
|
@ -1,26 +1,26 @@
|
||||||
%div.row
|
.row
|
||||||
.col-xs-12
|
.col-xs-12
|
||||||
- if @facade.procedure.for_individual?
|
- if @facade.procedure.for_individual?
|
||||||
.row.title-row
|
.row.title-row
|
||||||
%div.col-xs-4.split-hr
|
.col-xs-4.split-hr
|
||||||
%div.col-xs-4.dossier-title= t('utils.depositaire').upcase
|
.col-xs-4.dossier-title= t('utils.depositaire').upcase
|
||||||
%div.col-xs-4.split-hr
|
.col-xs-4.split-hr
|
||||||
.row
|
.row
|
||||||
%div.col-xs-6.depositaire-label Civilité
|
.col-xs-6.depositaire-label Civilité
|
||||||
%div.col-xs-1.comments-off= "-"
|
.col-xs-1.comments-off= "-"
|
||||||
%div.col-xs-5.depositaire-info= @facade.individual.gender
|
.col-xs-5.depositaire-info= @facade.individual.gender
|
||||||
.row
|
.row
|
||||||
%div.col-xs-6.depositaire-label Nom
|
.col-xs-6.depositaire-label Nom
|
||||||
%div.col-xs-1.comments-off= "-"
|
.col-xs-1.comments-off= "-"
|
||||||
%div.col-xs-5.depositaire-info= @facade.individual.nom
|
.col-xs-5.depositaire-info= @facade.individual.nom
|
||||||
.row
|
.row
|
||||||
%div.col-xs-6.depositaire-label Prénom
|
.col-xs-6.depositaire-label Prénom
|
||||||
%div.col-xs-1.comments-off= "-"
|
.col-xs-1.comments-off= "-"
|
||||||
%div.col-xs-5.despositaire-info= @facade.individual.prenom
|
.col-xs-5.despositaire-info= @facade.individual.prenom
|
||||||
.row
|
.row
|
||||||
%div.col-xs-6.depositaire-label Date de naissance
|
.col-xs-6.depositaire-label Date de naissance
|
||||||
%div.col-xs-1.comments-off= "-"
|
.col-xs-1.comments-off= "-"
|
||||||
%div.col-xs-5.depositaire-info= @facade.individual.birthdate
|
.col-xs-5.depositaire-info= @facade.individual.birthdate
|
||||||
.row.margin-top-20
|
.row.margin-top-20
|
||||||
|
|
||||||
- unless @facade.champs.nil?
|
- unless @facade.champs.nil?
|
||||||
|
@ -28,32 +28,39 @@
|
||||||
- next if champ.type_champ == 'explication'
|
- next if champ.type_champ == 'explication'
|
||||||
- if champ.type_champ == 'header_section'
|
- if champ.type_champ == 'header_section'
|
||||||
.row.title-row.margin-top-40
|
.row.title-row.margin-top-40
|
||||||
%div.col-xs-3.split-hr
|
.col-xs-3.split-hr
|
||||||
%div.col-xs-6.dossier-title= champ.libelle.upcase
|
.col-xs-6.dossier-title= champ.libelle.upcase
|
||||||
%div.col-xs-3.split-hr
|
.col-xs-3.split-hr
|
||||||
- else
|
- else
|
||||||
.row
|
.row
|
||||||
%div.col-xs-6.depositaire-label= champ.libelle
|
.col-xs-6.depositaire-label= champ.libelle
|
||||||
%div.col-md-1.col-lg-1.col-sm-1.col-xs-1.comments-off
|
.col-xs-1.comments-off
|
||||||
= "-"
|
= "-"
|
||||||
%div.col-xs-5.depositaire-info{ id: "champ-#{champ.id}-value" }
|
.col-xs-5.depositaire-info{ id: "champ-#{champ.id}-value" }
|
||||||
- unless champ.decorate.value.blank?
|
- unless champ.decorate.value.blank?
|
||||||
|
- if champ.type_champ == 'dossier_link'
|
||||||
|
- dossier = Dossier.find_by(id: champ.decorate.value)
|
||||||
|
- if dossier && gestionnaire_signed_in?
|
||||||
|
= link_to(dossier.procedure.libelle, backoffice_dossier_path(champ.decorate.value), target: '_blank')
|
||||||
|
- else
|
||||||
|
= dossier.nil? ? 'pas de dossier associé' : dossier.procedure.libelle
|
||||||
|
- else
|
||||||
= champ.decorate.value.html_safe
|
= champ.decorate.value.html_safe
|
||||||
|
|
||||||
- if @facade.dossier.mandataire_social && gestionnaire_signed_in?
|
- if @facade.dossier.mandataire_social && gestionnaire_signed_in?
|
||||||
.mandataire_social.text-success.center
|
.mandataire_social.text-success.center
|
||||||
%br
|
%br
|
||||||
="Il est probable que le soumissionnaire du dossier soit un des mandataire social de l'entreprise ("
|
Il est probable que le soumissionnaire du dossier soit un des mandataire social de l'entreprise (
|
||||||
%b
|
%b
|
||||||
= "#{@facade.dossier.user.given_name} #{@facade.dossier.user.family_name}"
|
= "#{@facade.dossier.user.given_name} #{@facade.dossier.user.family_name}"
|
||||||
=")"
|
)
|
||||||
%div.row
|
.row
|
||||||
- if @facade.procedure.cerfa_flag? || @facade.dossier.types_de_piece_justificative.count > 0
|
- if @facade.procedure.cerfa_flag? || @facade.dossier.types_de_piece_justificative.count > 0
|
||||||
.col-xs-12
|
.col-xs-12
|
||||||
.row.title-row
|
.row.title-row
|
||||||
%div.col-xs-4.split-hr
|
.col-xs-4.split-hr
|
||||||
%div.col-xs-4.dossier-title= t('utils.pieces').upcase
|
.col-xs-4.dossier-title= t('utils.pieces').upcase
|
||||||
%div.col-xs-4.split-hr
|
.col-xs-4.split-hr
|
||||||
|
|
||||||
.col-xs-12#pieces_justificatives.margin-bot-40
|
.col-xs-12#pieces_justificatives.margin-bot-40
|
||||||
.row
|
.row
|
||||||
|
@ -65,32 +72,32 @@
|
||||||
.col-xs-5.despositaire-info
|
.col-xs-5.despositaire-info
|
||||||
- if @facade.dossier.cerfa_available?
|
- if @facade.dossier.cerfa_available?
|
||||||
%a{ href: "#{@facade.dossier.cerfa.last.content_url}", target: '_blank' } Consulter
|
%a{ href: "#{@facade.dossier.cerfa.last.content_url}", target: '_blank' } Consulter
|
||||||
%span{style:'margin-left:12px'}
|
%span{ style: 'margin-left: 12px;' }
|
||||||
\-
|
\-
|
||||||
= link_to "", class: "historique", "data-toggle" => "modal", "data-target" => "#PJmodal", :type => "button", "data-modal_title" => 'formulaires', "data-modal_index" => 'cerfa' do
|
= link_to "", class: "historique", "data-toggle" => "modal", "data-target" => "#PJmodal", :type => "button", "data-modal_title" => 'formulaires', "data-modal_index" => 'cerfa' do
|
||||||
%span.fa.fa-clock-o
|
%span.fa.fa-clock-o
|
||||||
- else
|
- else
|
||||||
= 'Pièce non fournie'
|
Pièce non fournie
|
||||||
.row
|
.row
|
||||||
.col-xs-12
|
.col-xs-12
|
||||||
- @facade.types_de_pieces_justificatives.each do |type_de_piece_justificative|
|
- @facade.types_de_pieces_justificatives.each do |type_de_piece_justificative|
|
||||||
.row.piece-row
|
.row.piece-row
|
||||||
.col-xs-12{ id: "piece_justificative_#{type_de_piece_justificative.id}" }
|
.col-xs-12{ id: "piece_justificative_#{type_de_piece_justificative.id}" }
|
||||||
.row
|
.row
|
||||||
%div.col-xs-6.depositaire-label= type_de_piece_justificative.libelle
|
.col-xs-6.depositaire-label= type_de_piece_justificative.libelle
|
||||||
%div.col-xs-1.comments-off= "-"
|
.col-xs-1.comments-off= "-"
|
||||||
%div.col-xs-5.despositaire-info
|
.col-xs-5.despositaire-info
|
||||||
- if type_de_piece_justificative.api_entreprise
|
- if type_de_piece_justificative.api_entreprise
|
||||||
%span.text-success Nous l'avons récupéré pour vous.
|
%span.text-success Nous l'avons récupéré pour vous.
|
||||||
- elsif !(@pj = @facade.dossier.retrieve_last_piece_justificative_by_type(type_de_piece_justificative.id)).nil?
|
- elsif !(@pj = @facade.dossier.retrieve_last_piece_justificative_by_type(type_de_piece_justificative.id)).nil?
|
||||||
%a{ href: "#{@pj.content_url}", target: '_blank' } Consulter
|
%a{ href: "#{@pj.content_url}", target: '_blank' } Consulter
|
||||||
%span{style:'margin-left:12px'}
|
%span{ style: 'margin-left: 12px;' }
|
||||||
\-
|
\-
|
||||||
- if @facade.dossier.pieces_justificatives.where(type_de_piece_justificative_id: type_de_piece_justificative.id).count > 1
|
- if @facade.dossier.pieces_justificatives.where(type_de_piece_justificative_id: type_de_piece_justificative.id).count > 1
|
||||||
= link_to "", class: "historique", "data-toggle" => "modal", "data-target" => "#PJmodal", :type => "button", "data-modal_title" => 'formulaires', "data-modal_index" => "type_de_pj_#{type_de_piece_justificative.id}" do
|
= link_to "", class: "historique", "data-toggle" => "modal", "data-target" => "#PJmodal", :type => "button", "data-modal_title" => 'formulaires', "data-modal_index" => "type_de_pj_#{type_de_piece_justificative.id}" do
|
||||||
%span.fa.fa-clock-o
|
%span.fa.fa-clock-o
|
||||||
- else
|
- else
|
||||||
= 'Pièce non fournie'
|
Pièce non fournie
|
||||||
|
|
||||||
- unless @facade.dossier.read_only?
|
- unless @facade.dossier.read_only?
|
||||||
- if user_signed_in? && (@facade.dossier.owner?(current_user.email) || @facade.dossier.invite_by_user?(current_user.email))
|
- if user_signed_in? && (@facade.dossier.owner?(current_user.email) || @facade.dossier.invite_by_user?(current_user.email))
|
||||||
|
|
|
@ -2,51 +2,51 @@
|
||||||
%h4
|
%h4
|
||||||
= @facade.entreprise.raison_sociale_or_name
|
= @facade.entreprise.raison_sociale_or_name
|
||||||
.row.split-row
|
.row.split-row
|
||||||
%div.col-xs-12.split-hr
|
.col-xs-12.split-hr
|
||||||
%div.row
|
.row
|
||||||
.col-xs-12
|
.col-xs-12
|
||||||
|
|
||||||
.row
|
.row
|
||||||
%div.col-xs-4.entreprise-label Siret :
|
.col-xs-4.entreprise-label Siret :
|
||||||
%div.col-xs-8.entreprise-info= @facade.etablissement.siret
|
.col-xs-8.entreprise-info= @facade.etablissement.siret
|
||||||
- if @facade.etablissement.siret != @facade.entreprise.siret_siege_social
|
- if @facade.etablissement.siret != @facade.entreprise.siret_siege_social
|
||||||
.row
|
.row
|
||||||
%div.col-xs-4.entreprise-label SIRET siège social :
|
.col-xs-4.entreprise-label SIRET siège social :
|
||||||
%div.col-xs-8.entreprise-info= @facade.entreprise.siret_siege_social
|
.col-xs-8.entreprise-info= @facade.entreprise.siret_siege_social
|
||||||
.row
|
.row
|
||||||
%div.col-xs-4.entreprise-label Forme juridique :
|
.col-xs-4.entreprise-label Forme juridique :
|
||||||
%div.col-xs-8.entreprise-info= @facade.entreprise.forme_juridique
|
.col-xs-8.entreprise-info= @facade.entreprise.forme_juridique
|
||||||
.row
|
.row
|
||||||
%div.col-xs-4.entreprise-label Libellé naf :
|
.col-xs-4.entreprise-label Libellé naf :
|
||||||
%div.col-xs-8.entreprise-info= @facade.etablissement.libelle_naf
|
.col-xs-8.entreprise-info= @facade.etablissement.libelle_naf
|
||||||
.row
|
.row
|
||||||
%div.col-xs-4.entreprise-label Code naf :
|
.col-xs-4.entreprise-label Code naf :
|
||||||
%div.col-xs-8.entreprise-info= @facade.etablissement.naf
|
.col-xs-8.entreprise-info= @facade.etablissement.naf
|
||||||
.row
|
.row
|
||||||
%div.col-xs-4.entreprise-label Date de création :
|
.col-xs-4.entreprise-label Date de création :
|
||||||
%div.col-xs-8.entreprise-info= Time.at(@facade.entreprise.date_creation).strftime "%d-%m-%Y"
|
.col-xs-8.entreprise-info= Time.at(@facade.entreprise.date_creation).strftime "%d-%m-%Y"
|
||||||
.row
|
.row
|
||||||
%div.col-xs-4.entreprise-label Effectif organisation :
|
.col-xs-4.entreprise-label Effectif organisation :
|
||||||
%div.col-xs-8.entreprise-info= @facade.entreprise.effectif
|
.col-xs-8.entreprise-info= @facade.entreprise.effectif
|
||||||
.row
|
.row
|
||||||
%div.col-xs-4.entreprise-label Code effectif :
|
.col-xs-4.entreprise-label Code effectif :
|
||||||
%div.col-xs-8.entreprise-info= @facade.entreprise.code_effectif_entreprise
|
.col-xs-8.entreprise-info= @facade.entreprise.code_effectif_entreprise
|
||||||
.row
|
.row
|
||||||
%div.col-xs-4.entreprise-label Numéro TVA intracommunautaire :
|
.col-xs-4.entreprise-label Numéro TVA intracommunautaire :
|
||||||
%div.col-xs-8.entreprise-info= @facade.entreprise.numero_tva_intracommunautaire
|
.col-xs-8.entreprise-info= @facade.entreprise.numero_tva_intracommunautaire
|
||||||
|
|
||||||
.row
|
.row
|
||||||
%div.col-xs-4.entreprise-label Adresse :
|
.col-xs-4.entreprise-label Adresse :
|
||||||
%div.col-xs-8.entreprise-info
|
.col-xs-8.entreprise-info
|
||||||
- @facade.etablissement.adresse.split("\n").each do |line|
|
- @facade.etablissement.adresse.split("\n").each do |line|
|
||||||
= line
|
= line
|
||||||
.row
|
.row
|
||||||
%div.col-xs-4.entreprise-label Capital social :
|
.col-xs-4.entreprise-label Capital social :
|
||||||
%div.col-xs-8.entreprise-info= @facade.entreprise.pretty_capital_social
|
.col-xs-8.entreprise-info= @facade.entreprise.pretty_capital_social
|
||||||
|
|
||||||
.row
|
.row
|
||||||
%div.col-xs-4.entreprise-label Exercices :
|
.col-xs-4.entreprise-label Exercices :
|
||||||
%div.col-xs-8.entreprise-info
|
.col-xs-8.entreprise-info
|
||||||
- @facade.etablissement.exercices.each_with_index do |exercice, index|
|
- @facade.etablissement.exercices.each_with_index do |exercice, index|
|
||||||
%strong
|
%strong
|
||||||
= "#{exercice.dateFinExercice.year} : "
|
= "#{exercice.dateFinExercice.year} : "
|
||||||
|
@ -54,7 +54,6 @@
|
||||||
%br
|
%br
|
||||||
|
|
||||||
.row.split-row
|
.row.split-row
|
||||||
%div.col-xs-12.split-hr
|
.col-xs-12.split-hr
|
||||||
- unless @facade.entreprise.rna_information.nil?
|
- unless @facade.entreprise.rna_information.nil?
|
||||||
= render partial: '/dossiers/infos_rna'
|
= render partial: '/dossiers/infos_rna'
|
||||||
|
|
||||||
|
|
|
@ -8,9 +8,9 @@
|
||||||
.col-xs-5
|
.col-xs-5
|
||||||
- if @facade.dossier.cerfa_available?
|
- if @facade.dossier.cerfa_available?
|
||||||
%a{ href: "#{@facade.dossier.cerfa.last.content_url}", target: '_blank' } Consulter
|
%a{ href: "#{@facade.dossier.cerfa.last.content_url}", target: '_blank' } Consulter
|
||||||
%span{style:'margin-left:12px'}
|
%span{ style: 'margin-left: 12px;' }
|
||||||
\-
|
\-
|
||||||
%a.btn.fa.fa-timer{style:'color: black; padding-top: 0',
|
%a.btn.fa.fa-timer{ style: 'color: black; padding-top: 0;',
|
||||||
"data-target" => "#PJmodal",
|
"data-target" => "#PJmodal",
|
||||||
"data-toggle" => "modal",
|
"data-toggle" => "modal",
|
||||||
:type => "button",
|
:type => "button",
|
||||||
|
@ -34,9 +34,9 @@
|
||||||
-# = 'Pièce fournie'
|
-# = 'Pièce fournie'
|
||||||
-# - elsif gestionnaire_signed_in?
|
-# - elsif gestionnaire_signed_in?
|
||||||
%a{ href: "#{@pj.content_url}", target: '_blank' } Consulter
|
%a{ href: "#{@pj.content_url}", target: '_blank' } Consulter
|
||||||
%span{style:'margin-left:12px'}
|
%span{ style: 'margin-left: 12px;' }
|
||||||
\-
|
\-
|
||||||
%a.btn.fa.fa-timer{style:'color: black; padding-top: 0',
|
%a.btn.fa.fa-timer{ style: 'color: black; padding-top: 0;',
|
||||||
"data-target" => "#PJmodal",
|
"data-target" => "#PJmodal",
|
||||||
"data-toggle" => "modal",
|
"data-toggle" => "modal",
|
||||||
:type => "button",
|
:type => "button",
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
.row{style: 'margin-top: -20px'}
|
.row{ style: 'margin-top: -20px;' }
|
||||||
.col-xs-12
|
.col-xs-12
|
||||||
= form_for @facade.dossier, url: { controller: 'backoffice/private_formulaires', action: :update, dossier_id: @facade.dossier.id }, remote: true do
|
= form_for @facade.dossier, url: { controller: 'backoffice/private_formulaires', action: :update, dossier_id: @facade.dossier.id }, remote: true do
|
||||||
= render partial: '/users/description/champs', locals: { private: true }
|
= render partial: '/users/description/champs', locals: { private: true }
|
||||||
|
|
|
@ -20,4 +20,3 @@
|
||||||
|
|
||||||
%dt Capital déclaration :
|
%dt Capital déclaration :
|
||||||
%dd= @facade.entreprise.rna_information.date_declaration
|
%dd= @facade.entreprise.rna_information.date_declaration
|
||||||
|
|
||||||
|
|
|
@ -15,4 +15,3 @@
|
||||||
= form_tag invites_dossier_path(dossier_id: @facade.dossier.id), method: :post, class: 'form-inline' do
|
= form_tag invites_dossier_path(dossier_id: @facade.dossier.id), method: :post, class: 'form-inline' do
|
||||||
= text_field_tag :email, '', class: 'form-control', placeholder: 'Envoyer une invitation'
|
= text_field_tag :email, '', class: 'form-control', placeholder: 'Envoyer une invitation'
|
||||||
= submit_tag 'Ajouter', class: 'btn btn-success', id: 'send-invitation', data: { confirm: "Envoyer l'invitation ?" }
|
= submit_tag 'Ajouter', class: 'btn btn-success', id: 'send-invitation', data: { confirm: "Envoyer l'invitation ?" }
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
.default_data_block{style:'margin-top: 40px'}
|
.default_data_block{ style: 'margin-top: 40px;' }
|
||||||
.row.show-block.clearfix#messages
|
.row.show-block.clearfix#messages
|
||||||
.header
|
.header
|
||||||
.col-xs-10.title
|
.col-xs-10.title
|
||||||
|
|
|
@ -2,21 +2,21 @@
|
||||||
%table.table
|
%table.table
|
||||||
- if @facade.procedure.cerfa_flag?
|
- if @facade.procedure.cerfa_flag?
|
||||||
%tr{ id: "piece_justificative_0" }
|
%tr{ id: "piece_justificative_0" }
|
||||||
%th{class:'col-lg-6'}
|
%th.col-lg-6
|
||||||
='Formulaire'
|
Formulaire
|
||||||
%td.col-lg-6.col-md-6.col-sm-6.col-xs-6
|
%td.col-lg-6.col-md-6.col-sm-6.col-xs-6
|
||||||
- if @facade.dossier.cerfa_available?
|
- if @facade.dossier.cerfa_available?
|
||||||
%a{ href: "#{@facade.dossier.cerfa.last.content_url}", target: '_blank' } Consulter
|
%a{ href: "#{@facade.dossier.cerfa.last.content_url}", target: '_blank' } Consulter
|
||||||
%span{style:'margin-left:12px'}
|
%span{ style: 'margin-left: 12px;' }
|
||||||
\-
|
\-
|
||||||
%a.btn.fa.fa-timer{style:'color: black; padding-top: 0',
|
%a.btn.fa.fa-timer{ style: 'color: black; padding-top: 0;',
|
||||||
"data-target" => "#PJmodal",
|
"data-target" => "#PJmodal",
|
||||||
"data-toggle" => "modal",
|
"data-toggle" => "modal",
|
||||||
:type => "button",
|
:type => "button",
|
||||||
"data-modal_title" => 'formulaires',
|
"data-modal_title" => 'formulaires',
|
||||||
"data-modal_index" => 'cerfa' }
|
"data-modal_index" => 'cerfa' }
|
||||||
- else
|
- else
|
||||||
= 'Pièce non fournie'
|
Pièce non fournie
|
||||||
|
|
||||||
- @facade.dossier.types_de_piece_justificative.order('order_place ASC').each do |type_de_piece_justificative|
|
- @facade.dossier.types_de_piece_justificative.order('order_place ASC').each do |type_de_piece_justificative|
|
||||||
%tr{ id: "piece_justificative_#{type_de_piece_justificative.id}" }
|
%tr{ id: "piece_justificative_#{type_de_piece_justificative.id}" }
|
||||||
|
@ -30,9 +30,9 @@
|
||||||
-# = 'Pièce fournie'
|
-# = 'Pièce fournie'
|
||||||
-# - elsif gestionnaire_signed_in?
|
-# - elsif gestionnaire_signed_in?
|
||||||
%a{ href: "#{@pj.content_url}", target: '_blank' } Consulter
|
%a{ href: "#{@pj.content_url}", target: '_blank' } Consulter
|
||||||
%span{style:'margin-left:12px'}
|
%span{ style: 'margin-left: 12px;' }
|
||||||
\-
|
\-
|
||||||
%a.btn.fa.fa-timer{style:'color: black; padding-top: 0',
|
%a.btn.fa.fa-timer{ style: 'color: black; padding-top: 0;',
|
||||||
"data-target" => "#PJmodal",
|
"data-target" => "#PJmodal",
|
||||||
"data-toggle" => "modal",
|
"data-toggle" => "modal",
|
||||||
:type => "button",
|
:type => "button",
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
%div.commentaire
|
.commentaire
|
||||||
.comment-header
|
.comment-header
|
||||||
= commentaire.header
|
= commentaire.header
|
||||||
.content
|
.content
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
= form_tag(url_for({ controller: 'commentaires', action: :create, dossier_id: dossier_facade.dossier.id, champ_id: dossier_facade.champ_id }), class: 'form-inline', method: 'POST', multipart: true) do
|
= form_tag(url_for({ controller: 'commentaires', action: :create, dossier_id: dossier_facade.dossier.id, champ_id: dossier_facade.champ_id }), class: 'form-inline', method: 'POST', multipart: true) do
|
||||||
|
|
||||||
%textarea.form-control{id: 'texte_commentaire', class: 'wysihtml5', name: 'texte_commentaire', style: 'width: 100%; margin-bottom:2%', rows: '5', placeholder:"Commentaire"}
|
%textarea.form-control.wysihtml5{ id: 'texte_commentaire', name: 'texte_commentaire', style: 'width: 100%; margin-bottom: 2%;', rows: '5', placeholder: "Commentaire" }
|
||||||
|
|
||||||
.row
|
.row
|
||||||
.col-md-6
|
.col-md-6
|
||||||
%h4.text-primary{style: 'margin-top: 0px'} Ajouter un fichier
|
%h4.text-primary{ style: 'margin-top: 0px;' } Ajouter un fichier
|
||||||
= file_field_tag "piece_justificative[content]", accept: PieceJustificative.accept_format, style: 'float: left; margin-left: 20px'
|
= file_field_tag "piece_justificative[content]", accept: PieceJustificative.accept_format, style: 'float: left; margin-left: 20px;'
|
||||||
|
|
||||||
.col-md-6.text-right
|
.col-md-6.text-right
|
||||||
%input#save-message.form-control.btn.btn-danger{ type: 'submit', value: 'ENVOYER' }
|
%input#save-message.form-control.btn.btn-danger{ type: 'submit', value: 'ENVOYER' }
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
Mes informations
|
Mes informations
|
||||||
%br
|
%br
|
||||||
- unless @facade.entreprise.nil?
|
- unless @facade.entreprise.nil?
|
||||||
.center{style:'margin-left: -5%'}
|
.center{ style: 'margin-left: -5%;' }
|
||||||
Vous êtes authentifié avec le SIRET
|
Vous êtes authentifié avec le SIRET
|
||||||
|
|
||||||
%h3.text-success
|
%h3.text-success
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
.etape.etapes_informations.col-xs-9
|
.etape.etapes_informations.col-xs-9
|
||||||
.row
|
.row
|
||||||
- if @facade.entreprise.nil?
|
- if @facade.entreprise.nil?
|
||||||
#new_siret{style:'margin-left: 20%; margin-top: 5%'}
|
#new_siret{ style: 'margin-left: 20%; margin-top: 5%;' }
|
||||||
= form_for @facade.dossier, html: { class: 'form-inline' }, url: users_dossier_siret_informations_path(dossier_id: @facade.dossier.id), method: :post, remote: true do |f|
|
= form_for @facade.dossier, html: { class: 'form-inline' }, url: users_dossier_siret_informations_path(dossier_id: @facade.dossier.id), method: :post, remote: true do |f|
|
||||||
.form-group.form-group-lg
|
.form-group.form-group-lg
|
||||||
= f.text_field :siret, class: "form-control", placeholder: "Entrez votre Siret", value: @siret
|
= f.text_field :siret, class: "form-control", placeholder: "Entrez votre Siret", value: @siret
|
||||||
|
@ -26,15 +26,15 @@
|
||||||
#recap_info_entreprise
|
#recap_info_entreprise
|
||||||
= render partial: '/dossiers/infos_entreprise'
|
= render partial: '/dossiers/infos_entreprise'
|
||||||
|
|
||||||
%p#insee_infogreffe{style:'color:grey; float:right'}
|
%p#insee_infogreffe{ style: 'color: grey; float: right;' }
|
||||||
%i
|
%i
|
||||||
Informations récupérées auprès de l'INSEE et d'INFOGREFFE
|
Informations récupérées auprès de l'INSEE et d'INFOGREFFE
|
||||||
|
|
||||||
%br
|
%br
|
||||||
= form_for @facade.dossier, url: { controller: '/users/dossiers', action: :update } do |f|
|
= form_for @facade.dossier, url: { controller: '/users/dossiers', action: :update } do |f|
|
||||||
= f.hidden_field :id
|
= f.hidden_field :id
|
||||||
%label{ style:'font-weight:normal' }
|
%label{ style: 'font-weight: normal;' }
|
||||||
= f.check_box :autorisation_donnees
|
= f.check_box :autorisation_donnees
|
||||||
J'autorise les décideurs publics à vérifier les informations de mon organisation auprès des administrations concernées. Ces informations resteront strictement confidentielles.
|
J'autorise les décideurs publics à vérifier les informations de mon organisation auprès des administrations concernées. Ces informations resteront strictement confidentielles.
|
||||||
%br
|
%br
|
||||||
= f.submit 'Etape suivante', class: "btn btn btn-info", style: 'float:right', id: 'etape_suivante', disabled: :disabled
|
= f.submit 'Etape suivante', class: "btn btn btn-info", style: 'float: right;', id: 'etape_suivante', disabled: :disabled
|
||||||
|
|
|
@ -21,20 +21,20 @@
|
||||||
%label
|
%label
|
||||||
%h4
|
%h4
|
||||||
Nom *
|
Nom *
|
||||||
= ff.text_field :nom, {class: 'form-control'}
|
= ff.text_field :nom, { class: 'form-control', required: true }
|
||||||
.form-group
|
.form-group
|
||||||
%label
|
%label
|
||||||
%h4
|
%h4
|
||||||
Prénom *
|
Prénom *
|
||||||
= ff.text_field :prenom, {class: 'form-control'}
|
= ff.text_field :prenom, { class: 'form-control', required: true }
|
||||||
.form-group
|
.form-group
|
||||||
%label
|
%label
|
||||||
%h4
|
%h4
|
||||||
Date de naissance *
|
Date de naissance *
|
||||||
= ff.text_field :birthdate, {class: 'form-control', 'data-provide' => 'datepicker', 'data-date-format' => 'dd/mm/yyyy'}
|
= ff.date_field :birthdate, { class: 'form-control', placeholder: 'jj/mm/aaaa', required: true }
|
||||||
|
|
||||||
%p
|
%p
|
||||||
%label{ style:'font-weight:normal' }
|
%label{ style: 'font-weight: normal;' }
|
||||||
= f.check_box :autorisation_donnees
|
= f.check_box :autorisation_donnees
|
||||||
= " ".html_safe
|
= " ".html_safe
|
||||||
Vos informations personnelles ne seront jamais utilisées dans un but lucratif ou commercial. Elles ne pourront être communiquées à de tiers personnes sans votre accord préalable. Elles pourront en revanche être communiquées aux administrations compétentes afin d'instruire votre dossier, conformément à la déclaration CNIL effectué par le service TPS.
|
Vos informations personnelles ne seront jamais utilisées dans un but lucratif ou commercial. Elles ne pourront être communiquées à de tiers personnes sans votre accord préalable. Elles pourront en revanche être communiquées aux administrations compétentes afin d'instruire votre dossier, conformément à la déclaration CNIL effectué par le service TPS.
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
%h2.text-info
|
%h2.text-info
|
||||||
= image_tag('logo_FC_02_small.png', style: 'height: 55px')
|
= image_tag('logo_FC_02_small.png', style: 'height: 55px;')
|
||||||
France Connect - Particulier
|
France Connect - Particulier
|
||||||
|
|
||||||
%h3 Nouvelle connexion
|
%h3 Nouvelle connexion
|
||||||
%h4.text-warning{style:'margin-left: 20px'} Email déjà utilisé
|
%h4.text-warning{ style: 'margin-left: 20px;' } Email déjà utilisé
|
||||||
|
|
||||||
%br
|
%br
|
||||||
%p
|
%p
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
%h2.text-info
|
%h2.text-info
|
||||||
= image_tag('logo_FC_02_small.png', style: 'height: 55px')
|
= image_tag('logo_FC_02_small.png', style: 'height: 55px;')
|
||||||
France Connect - Particulier
|
France Connect - Particulier
|
||||||
|
|
||||||
%h3 Nouvelle connexion
|
%h3 Nouvelle connexion
|
||||||
|
|
|
@ -1,2 +1 @@
|
||||||
<%= link_to "Mot de passe oublié ?", new_password_path(resource_name) %><br />
|
<%= link_to "Mot de passe oublié ?", new_password_path(resource_name) %><br />
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
%div.dropdown-menu#credentials
|
.dropdown-menu#credentials
|
||||||
%div.description= t("utils.deconnexion")
|
.description= t("utils.deconnexion")
|
||||||
= @current_gestionnaire.email if @current_gestionnaire
|
= @current_gestionnaire.email if @current_gestionnaire
|
||||||
= @current_user.email if @current_user
|
= @current_user.email if @current_user
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue