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 'actioncable', '5.0.0.1'
|
||||
gem 'redis'
|
||||
|
||||
# Use SCSS for stylesheets
|
||||
gem 'sass-rails', '~> 5.0'
|
||||
# Use Uglifier as compressor for JavaScript assets
|
||||
|
|
|
@ -499,7 +499,6 @@ GEM
|
|||
nokogiri (~> 1.5)
|
||||
trollop (~> 2.1)
|
||||
rdoc (4.3.0)
|
||||
redis (3.3.3)
|
||||
ref (2.0.0)
|
||||
request_store (1.3.1)
|
||||
responders (2.3.0)
|
||||
|
@ -672,7 +671,6 @@ PLATFORMS
|
|||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
actioncable (= 5.0.0.1)
|
||||
active_model_serializers
|
||||
apipie-rails
|
||||
bootstrap-datepicker-rails
|
||||
|
@ -728,7 +726,6 @@ DEPENDENCIES
|
|||
rack-mini-profiler
|
||||
rails (= 5.0.0.1)
|
||||
rails-controller-testing
|
||||
redis
|
||||
rest-client
|
||||
rgeo-geojson
|
||||
rspec-rails (~> 3.0)
|
||||
|
|
|
@ -6,7 +6,7 @@ function initCarto() {
|
|||
scrollWheelZoom: false
|
||||
}).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'
|
||||
}).addTo(map);
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ var LON = '2.428462';
|
|||
var LAT = '46.538192';
|
||||
|
||||
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>'
|
||||
});
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
// FIXME: Rename when the header is generalized
|
||||
.new-header {
|
||||
height: 72px;
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
|
@ -17,7 +16,7 @@
|
|||
@extend .container;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
height: 100%;
|
||||
min-height: 72px;
|
||||
}
|
||||
|
||||
.header-logo {
|
||||
|
|
|
@ -49,6 +49,10 @@
|
|||
width: 90px;
|
||||
position: relative;
|
||||
|
||||
&:hover {
|
||||
background-color: rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
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
|
||||
|
||||
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)
|
||||
end
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ class ChampsService
|
|||
|
||||
def build_error_messages(champs)
|
||||
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
|
||||
|
||||
private
|
||||
|
|
|
@ -38,7 +38,7 @@ class PiecesJustificativesService
|
|||
type_de_piece_justificative: tpj,
|
||||
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
|
||||
|
||||
def self.missing_pj_error_messages(dossier)
|
||||
|
@ -46,6 +46,6 @@ class PiecesJustificativesService
|
|||
present_pjs = dossier.pieces_justificatives.map(&:type_de_piece_justificative)
|
||||
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
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
= javascript_include_tag 'application', 'data-turbolinks-track' => true
|
||||
|
||||
= csrf_meta_tags
|
||||
= action_cable_meta_tag
|
||||
%body
|
||||
= render partial: 'layouts/support_navigator_banner'
|
||||
#beta{ class: (Rails.env == 'production' ? '' : 'beta-staging') }
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
%meta{ name: "turbolinks-cache-control", content: "no-cache" }
|
||||
%meta{ name: "viewport", content: "width=device-width, initial-scale=1" }
|
||||
= csrf_meta_tags
|
||||
= action_cable_meta_tag
|
||||
|
||||
%title
|
||||
= t("dynamics.page_title")
|
||||
|
|
|
@ -17,37 +17,47 @@
|
|||
|
||||
%ul.procedure-stats.flex
|
||||
%li
|
||||
- a_suivre_count = @dossiers_a_suivre_count_per_procedure[p.id] || 0
|
||||
.stats-number
|
||||
= a_suivre_count
|
||||
.stats-legend
|
||||
à suivre
|
||||
%object
|
||||
= link_to(procedure_path(p, statut: 'a-suivre')) do
|
||||
- a_suivre_count = @dossiers_a_suivre_count_per_procedure[p.id] || 0
|
||||
.stats-number
|
||||
= a_suivre_count
|
||||
.stats-legend
|
||||
à suivre
|
||||
%li
|
||||
- if @notifications_count_per_procedure[p.id].present?
|
||||
%span.notifications{ 'aria-label': "notifications" }
|
||||
- followed_count = @followed_dossiers_count_per_procedure[p.id] || 0
|
||||
.stats-number
|
||||
= followed_count
|
||||
.stats-legend
|
||||
= t('pluralize.followed', count: followed_count)
|
||||
%object
|
||||
= link_to(procedure_path(p, statut: 'suivis')) do
|
||||
- if @notifications_count_per_procedure[p.id].present?
|
||||
%span.notifications{ 'aria-label': "notifications" }
|
||||
- followed_count = @followed_dossiers_count_per_procedure[p.id] || 0
|
||||
.stats-number
|
||||
= followed_count
|
||||
.stats-legend
|
||||
= t('pluralize.followed', count: followed_count)
|
||||
%li
|
||||
- termines_count = @dossiers_termines_count_per_procedure[p.id] || 0
|
||||
.stats-number
|
||||
= termines_count
|
||||
.stats-legend
|
||||
= t('pluralize.processed', count: termines_count)
|
||||
%object
|
||||
= link_to(procedure_path(p, statut: 'traites')) do
|
||||
- termines_count = @dossiers_termines_count_per_procedure[p.id] || 0
|
||||
.stats-number
|
||||
= termines_count
|
||||
.stats-legend
|
||||
= t('pluralize.processed', count: termines_count)
|
||||
%li
|
||||
- dossier_count = @dossiers_count_per_procedure[p.id] || 0
|
||||
.stats-number
|
||||
= dossier_count
|
||||
.stats-legend
|
||||
= t('pluralize.case', count: dossier_count)
|
||||
%object
|
||||
= link_to(procedure_path(p, statut: 'tous')) do
|
||||
- dossier_count = @dossiers_count_per_procedure[p.id] || 0
|
||||
.stats-number
|
||||
= dossier_count
|
||||
.stats-legend
|
||||
= t('pluralize.case', count: dossier_count)
|
||||
%li
|
||||
- archived_count = @dossiers_archived_count_per_procedure[p.id] || 0
|
||||
.stats-number
|
||||
= archived_count
|
||||
.stats-legend
|
||||
= t('pluralize.archived', count: archived_count)
|
||||
%object
|
||||
= link_to(procedure_path(p, statut: 'archives')) do
|
||||
- archived_count = @dossiers_archived_count_per_procedure[p.id] || 0
|
||||
.stats-number
|
||||
= archived_count
|
||||
.stats-legend
|
||||
= t('pluralize.archived', count: archived_count)
|
||||
|
||||
- if p.archivee?
|
||||
.procedure-status
|
||||
|
|
|
@ -2,7 +2,4 @@
|
|||
|
||||
require ::File.expand_path('../config/environment', __FILE__)
|
||||
|
||||
# Action Cable requires that all classes are loaded in advance
|
||||
Rails.application.eager_load!
|
||||
|
||||
run Rails.application
|
||||
|
|
|
@ -57,6 +57,4 @@ Rails.application.configure do
|
|||
|
||||
# Raises error for missing translations
|
||||
# config.action_view.raise_on_missing_translations = true
|
||||
|
||||
config.action_cable.url = "ws://localhost:3000/cable"
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue