diff options
| -rw-r--r-- | app/controllers/lines_controller.rb | 2 | ||||
| -rw-r--r-- | app/views/lines/_line.html.slim | 3 | ||||
| -rw-r--r-- | app/views/lines/show.html.slim | 4 | ||||
| -rw-r--r-- | config/locales/lines.en.yml | 1 | ||||
| -rw-r--r-- | config/locales/lines.fr.yml | 3 |
5 files changed, 11 insertions, 2 deletions
diff --git a/app/controllers/lines_controller.rb b/app/controllers/lines_controller.rb index 71e33630d..8c14de06d 100644 --- a/app/controllers/lines_controller.rb +++ b/app/controllers/lines_controller.rb @@ -79,7 +79,7 @@ class LinesController < BreadcrumbController end @q = line_referential.lines.search(params[:q]) - @lines ||= @q.result(:distinct => true).where(deactivated: false).order(:number).paginate(:page => params[:page]).includes([:network, :company]) + @lines ||= @q.result(:distinct => true).order(:number).paginate(:page => params[:page]).includes([:network, :company]) end alias_method :line_referential, :parent diff --git a/app/views/lines/_line.html.slim b/app/views/lines/_line.html.slim index 485937c19..552e9d29b 100644 --- a/app/views/lines/_line.html.slim +++ b/app/views/lines/_line.html.slim @@ -23,6 +23,9 @@ span.fa.fa-trash-o .panel-body + - if line.deactivated + p + = t('lines.index.deactivated') p - if line.network.nil? = line.human_attribute_name('network') diff --git a/app/views/lines/show.html.slim b/app/views/lines/show.html.slim index 80a44a7f5..590f35a27 100644 --- a/app/views/lines/show.html.slim +++ b/app/views/lines/show.html.slim @@ -16,6 +16,10 @@ label.color style="#{number_style(@line)}" = line_sticker(@line) + - if @line.deactivated + p + = t('lines.index.deactivated') + p label = "#{@line.human_attribute_name(:network)} : " diff --git a/config/locales/lines.en.yml b/config/locales/lines.en.yml index d03b5eadc..596c93dac 100644 --- a/config/locales/lines.en.yml +++ b/config/locales/lines.en.yml @@ -20,6 +20,7 @@ en: itineraries: "Line's route list" group_of_lines: "Groups of lines" index: + deactivated: "Disabled line" title: "Lines" name_or_number: "Search by name or number" no_networks: "No networks" diff --git a/config/locales/lines.fr.yml b/config/locales/lines.fr.yml index 4b871d4ad..2b325e220 100644 --- a/config/locales/lines.fr.yml +++ b/config/locales/lines.fr.yml @@ -20,8 +20,9 @@ fr: itineraries: "Liste des séquences d'arrêts de la ligne" group_of_lines: "Groupes de lignes" index: + deactivated: "Ligne désactivée" title: "Lignes" - name_or_number: "Recherche par nom ou indice" + name_or_number: "Recherche par nom ou indice" no_networks: "Aucun réseaux" no_companies: "Aucun transporteurs" no_group_of_lines: "Aucun groupes de ligne" |
