diff options
| author | Xinhui Xu | 2016-09-23 17:16:03 +0200 |
|---|---|---|
| committer | GitHub | 2016-09-23 17:16:03 +0200 |
| commit | dd9e5a5fedf95e8f83bb359473c1a243c0b605c6 (patch) | |
| tree | 3f968a0b27229310a6d63b2e41cac17eaae2325a | |
| parent | a3edd893186a2ceafae002cf4f3f05c4426dbfac (diff) | |
| parent | a6153d91d65203bd48edcf4be33f1422adf9707a (diff) | |
| download | chouette-core-dd9e5a5fedf95e8f83bb359473c1a243c0b605c6.tar.bz2 | |
Merge pull request #2 from AF83/master
Merge master into Staging
| -rw-r--r-- | app/controllers/lines_controller.rb | 2 | ||||
| -rw-r--r-- | app/views/line_referentials/show.html.slim | 2 | ||||
| -rw-r--r-- | app/views/lines/_line.html.slim | 3 | ||||
| -rw-r--r-- | app/views/lines/show.html.slim | 4 | ||||
| -rw-r--r-- | app/views/stop_area_referentials/show.html.slim | 7 | ||||
| -rw-r--r-- | config/locales/lines.en.yml | 1 | ||||
| -rw-r--r-- | config/locales/lines.fr.yml | 3 |
7 files changed, 19 insertions, 3 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/line_referentials/show.html.slim b/app/views/line_referentials/show.html.slim index 68b31c6e1..929eda7dd 100644 --- a/app/views/line_referentials/show.html.slim +++ b/app/views/line_referentials/show.html.slim @@ -18,7 +18,7 @@ = link_to Referential.human_attribute_name("group_of_lines"), line_referential_group_of_lines_path(@line_referential) li.list-group-item - span.badge = @line_referential.operating_lines.size + span.badge = @line_referential.lines.size = link_to Referential.human_attribute_name("lines"), line_referential_lines_path(@line_referential) - unless @line_referential.line_referential_sync.line_sync_operations.empty? 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/app/views/stop_area_referentials/show.html.slim b/app/views/stop_area_referentials/show.html.slim index 658004dcc..32fe950dc 100644 --- a/app/views/stop_area_referentials/show.html.slim +++ b/app/views/stop_area_referentials/show.html.slim @@ -9,5 +9,12 @@ span.badge = @stop_area_referential.stop_areas.size = link_to Referential.human_attribute_name("stop_areas"), stop_area_referential_stop_areas_path(@stop_area_referential) +- unless @stop_area_referential.stop_area_referential_sync.stop_area_sync_operations.empty? + h3 Historique des synchronisations + + ul.list-group width="75%" + - @stop_area_referential.stop_area_referential_sync.stop_area_sync_operations.each do |sync| + li = "#{sync.created_at.to_formatted_s(:short)} - #{sync.message}" + - content_for :sidebar do ul.actions
\ No newline at end of file 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" |
