Merge branch 'dev'
This commit is contained in:
commit
02f1254c99
17 changed files with 54 additions and 63 deletions
3
Gemfile
3
Gemfile
|
@ -2,9 +2,6 @@ source 'https://rubygems.org'
|
||||||
|
|
||||||
gem 'rails', '5.0.0.1'
|
gem 'rails', '5.0.0.1'
|
||||||
|
|
||||||
gem 'actioncable', '5.0.0.1'
|
|
||||||
gem 'redis'
|
|
||||||
|
|
||||||
# Use SCSS for stylesheets
|
# Use SCSS for stylesheets
|
||||||
gem 'sass-rails', '~> 5.0'
|
gem 'sass-rails', '~> 5.0'
|
||||||
# Use Uglifier as compressor for JavaScript assets
|
# Use Uglifier as compressor for JavaScript assets
|
||||||
|
|
|
@ -499,7 +499,6 @@ GEM
|
||||||
nokogiri (~> 1.5)
|
nokogiri (~> 1.5)
|
||||||
trollop (~> 2.1)
|
trollop (~> 2.1)
|
||||||
rdoc (4.3.0)
|
rdoc (4.3.0)
|
||||||
redis (3.3.3)
|
|
||||||
ref (2.0.0)
|
ref (2.0.0)
|
||||||
request_store (1.3.1)
|
request_store (1.3.1)
|
||||||
responders (2.3.0)
|
responders (2.3.0)
|
||||||
|
@ -672,7 +671,6 @@ PLATFORMS
|
||||||
ruby
|
ruby
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
actioncable (= 5.0.0.1)
|
|
||||||
active_model_serializers
|
active_model_serializers
|
||||||
apipie-rails
|
apipie-rails
|
||||||
bootstrap-datepicker-rails
|
bootstrap-datepicker-rails
|
||||||
|
@ -728,7 +726,6 @@ DEPENDENCIES
|
||||||
rack-mini-profiler
|
rack-mini-profiler
|
||||||
rails (= 5.0.0.1)
|
rails (= 5.0.0.1)
|
||||||
rails-controller-testing
|
rails-controller-testing
|
||||||
redis
|
|
||||||
rest-client
|
rest-client
|
||||||
rgeo-geojson
|
rgeo-geojson
|
||||||
rspec-rails (~> 3.0)
|
rspec-rails (~> 3.0)
|
||||||
|
|
|
@ -6,7 +6,7 @@ function initCarto() {
|
||||||
scrollWheelZoom: false
|
scrollWheelZoom: false
|
||||||
}).setView([position.lat, position.lon], position.zoom);
|
}).setView([position.lat, position.lon], position.zoom);
|
||||||
|
|
||||||
L.tileLayer('http://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png', {
|
L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||||
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
|
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
|
||||||
}).addTo(map);
|
}).addTo(map);
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ var LON = '2.428462';
|
||||||
var LAT = '46.538192';
|
var LAT = '46.538192';
|
||||||
|
|
||||||
function initCarto() {
|
function initCarto() {
|
||||||
OSM = L.tileLayer("http://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png", {
|
OSM = L.tileLayer("http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", {
|
||||||
attribution: '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
|
attribution: '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
|
|
||||||
// FIXME: Rename when the header is generalized
|
// FIXME: Rename when the header is generalized
|
||||||
.new-header {
|
.new-header {
|
||||||
height: 72px;
|
|
||||||
background-color: #FFFFFF;
|
background-color: #FFFFFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,7 +16,7 @@
|
||||||
@extend .container;
|
@extend .container;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
height: 100%;
|
min-height: 72px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header-logo {
|
.header-logo {
|
||||||
|
|
|
@ -49,6 +49,10 @@
|
||||||
width: 90px;
|
width: 90px;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: rgba(0, 0, 0, 0.05);
|
||||||
|
}
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
border-right: 1px solid $border-grey;
|
border-right: 1px solid $border-grey;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
# Be sure to restart your server when you modify this file. Action Cable runs in a loop that does not support auto reloading.
|
|
||||||
module ApplicationCable
|
|
||||||
class Channel < ActionCable::Channel::Base
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -1,5 +0,0 @@
|
||||||
# Be sure to restart your server when you modify this file. Action Cable runs in a loop that does not support auto reloading.
|
|
||||||
module ApplicationCable
|
|
||||||
class Connection < ActionCable::Connection::Base
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -1,5 +0,0 @@
|
||||||
class NotificationsChannel < ApplicationCable::Channel
|
|
||||||
def subscribed
|
|
||||||
stream_from 'notifications'
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -100,7 +100,13 @@ class Users::DescriptionController < UsersController
|
||||||
private
|
private
|
||||||
|
|
||||||
def redirect_to_description_with_errors(dossier, errors)
|
def redirect_to_description_with_errors(dossier, errors)
|
||||||
flash.alert = errors
|
errors_to_display = if errors.count > 3
|
||||||
|
errors.take(3) + ['...']
|
||||||
|
else
|
||||||
|
errors
|
||||||
|
end
|
||||||
|
|
||||||
|
flash.alert = errors_to_display
|
||||||
redirect_to users_dossier_description_path(dossier_id: dossier.id)
|
redirect_to users_dossier_description_path(dossier_id: dossier.id)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ class ChampsService
|
||||||
|
|
||||||
def build_error_messages(champs)
|
def build_error_messages(champs)
|
||||||
champs.select(&:mandatory_and_blank?)
|
champs.select(&:mandatory_and_blank?)
|
||||||
.map { |c| "Le champ #{c.libelle} doit être rempli." }
|
.map { |c| "Le champ #{c.libelle.truncate(200)} doit être rempli." }
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
|
@ -38,7 +38,7 @@ class PiecesJustificativesService
|
||||||
type_de_piece_justificative: tpj,
|
type_de_piece_justificative: tpj,
|
||||||
user: user)
|
user: user)
|
||||||
|
|
||||||
pj.save ? nil : "le fichier #{content.original_filename} (#{pj.libelle}) n'a pas pu être sauvegardé"
|
pj.save ? nil : "le fichier #{content.original_filename} (#{pj.libelle.truncate(200)}) n'a pas pu être sauvegardé"
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.missing_pj_error_messages(dossier)
|
def self.missing_pj_error_messages(dossier)
|
||||||
|
@ -46,6 +46,6 @@ class PiecesJustificativesService
|
||||||
present_pjs = dossier.pieces_justificatives.map(&:type_de_piece_justificative)
|
present_pjs = dossier.pieces_justificatives.map(&:type_de_piece_justificative)
|
||||||
missing_pjs = mandatory_pjs - present_pjs
|
missing_pjs = mandatory_pjs - present_pjs
|
||||||
|
|
||||||
missing_pjs.map { |pj| "La pièce jointe #{pj.libelle} doit être fournie." }
|
missing_pjs.map { |pj| "La pièce jointe #{pj.libelle.truncate(200)} doit être fournie." }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
= javascript_include_tag 'application', 'data-turbolinks-track' => true
|
= javascript_include_tag 'application', 'data-turbolinks-track' => true
|
||||||
|
|
||||||
= csrf_meta_tags
|
= csrf_meta_tags
|
||||||
= action_cable_meta_tag
|
|
||||||
%body
|
%body
|
||||||
= render partial: 'layouts/support_navigator_banner'
|
= render partial: 'layouts/support_navigator_banner'
|
||||||
#beta{ class: (Rails.env == 'production' ? '' : 'beta-staging') }
|
#beta{ class: (Rails.env == 'production' ? '' : 'beta-staging') }
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
%meta{ name: "turbolinks-cache-control", content: "no-cache" }
|
%meta{ name: "turbolinks-cache-control", content: "no-cache" }
|
||||||
%meta{ name: "viewport", content: "width=device-width, initial-scale=1" }
|
%meta{ name: "viewport", content: "width=device-width, initial-scale=1" }
|
||||||
= csrf_meta_tags
|
= csrf_meta_tags
|
||||||
= action_cable_meta_tag
|
|
||||||
|
|
||||||
%title
|
%title
|
||||||
= t("dynamics.page_title")
|
= t("dynamics.page_title")
|
||||||
|
|
|
@ -17,12 +17,16 @@
|
||||||
|
|
||||||
%ul.procedure-stats.flex
|
%ul.procedure-stats.flex
|
||||||
%li
|
%li
|
||||||
|
%object
|
||||||
|
= link_to(procedure_path(p, statut: 'a-suivre')) do
|
||||||
- a_suivre_count = @dossiers_a_suivre_count_per_procedure[p.id] || 0
|
- a_suivre_count = @dossiers_a_suivre_count_per_procedure[p.id] || 0
|
||||||
.stats-number
|
.stats-number
|
||||||
= a_suivre_count
|
= a_suivre_count
|
||||||
.stats-legend
|
.stats-legend
|
||||||
à suivre
|
à suivre
|
||||||
%li
|
%li
|
||||||
|
%object
|
||||||
|
= link_to(procedure_path(p, statut: 'suivis')) do
|
||||||
- if @notifications_count_per_procedure[p.id].present?
|
- if @notifications_count_per_procedure[p.id].present?
|
||||||
%span.notifications{ 'aria-label': "notifications" }
|
%span.notifications{ 'aria-label': "notifications" }
|
||||||
- followed_count = @followed_dossiers_count_per_procedure[p.id] || 0
|
- followed_count = @followed_dossiers_count_per_procedure[p.id] || 0
|
||||||
|
@ -31,18 +35,24 @@
|
||||||
.stats-legend
|
.stats-legend
|
||||||
= t('pluralize.followed', count: followed_count)
|
= t('pluralize.followed', count: followed_count)
|
||||||
%li
|
%li
|
||||||
|
%object
|
||||||
|
= link_to(procedure_path(p, statut: 'traites')) do
|
||||||
- termines_count = @dossiers_termines_count_per_procedure[p.id] || 0
|
- termines_count = @dossiers_termines_count_per_procedure[p.id] || 0
|
||||||
.stats-number
|
.stats-number
|
||||||
= termines_count
|
= termines_count
|
||||||
.stats-legend
|
.stats-legend
|
||||||
= t('pluralize.processed', count: termines_count)
|
= t('pluralize.processed', count: termines_count)
|
||||||
%li
|
%li
|
||||||
|
%object
|
||||||
|
= link_to(procedure_path(p, statut: 'tous')) do
|
||||||
- dossier_count = @dossiers_count_per_procedure[p.id] || 0
|
- dossier_count = @dossiers_count_per_procedure[p.id] || 0
|
||||||
.stats-number
|
.stats-number
|
||||||
= dossier_count
|
= dossier_count
|
||||||
.stats-legend
|
.stats-legend
|
||||||
= t('pluralize.case', count: dossier_count)
|
= t('pluralize.case', count: dossier_count)
|
||||||
%li
|
%li
|
||||||
|
%object
|
||||||
|
= link_to(procedure_path(p, statut: 'archives')) do
|
||||||
- archived_count = @dossiers_archived_count_per_procedure[p.id] || 0
|
- archived_count = @dossiers_archived_count_per_procedure[p.id] || 0
|
||||||
.stats-number
|
.stats-number
|
||||||
= archived_count
|
= archived_count
|
||||||
|
|
|
@ -2,7 +2,4 @@
|
||||||
|
|
||||||
require ::File.expand_path('../config/environment', __FILE__)
|
require ::File.expand_path('../config/environment', __FILE__)
|
||||||
|
|
||||||
# Action Cable requires that all classes are loaded in advance
|
|
||||||
Rails.application.eager_load!
|
|
||||||
|
|
||||||
run Rails.application
|
run Rails.application
|
||||||
|
|
|
@ -57,6 +57,4 @@ Rails.application.configure do
|
||||||
|
|
||||||
# Raises error for missing translations
|
# Raises error for missing translations
|
||||||
# config.action_view.raise_on_missing_translations = true
|
# config.action_view.raise_on_missing_translations = true
|
||||||
|
|
||||||
config.action_cable.url = "ws://localhost:3000/cable"
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue