diff options
| -rw-r--r-- | app/controllers/referential_lines_controller.rb | 12 | ||||
| -rw-r--r-- | app/views/referential_lines/_lines.html.slim | 13 | ||||
| -rw-r--r-- | app/views/referential_lines/index.html.slim | 33 | ||||
| -rw-r--r-- | config/routes.rb | 2 |
4 files changed, 1 insertions, 59 deletions
diff --git a/app/controllers/referential_lines_controller.rb b/app/controllers/referential_lines_controller.rb index 4b4a822b4..fe81bee12 100644 --- a/app/controllers/referential_lines_controller.rb +++ b/app/controllers/referential_lines_controller.rb @@ -10,18 +10,6 @@ class ReferentialLinesController < ChouetteController belongs_to :referential - def index - @hide_group_of_line = referential.group_of_lines.empty? - index! do |format| - format.html { - if collection.out_of_bounds? - redirect_to params.merge(:page => 1) - end - build_breadcrumb :index - } - end - end - def show @routes = resource.routes diff --git a/app/views/referential_lines/_lines.html.slim b/app/views/referential_lines/_lines.html.slim deleted file mode 100644 index 54f22c978..000000000 --- a/app/views/referential_lines/_lines.html.slim +++ /dev/null @@ -1,13 +0,0 @@ -- if @lines.any? - = table_builder @lines, - { 'Oid' => Proc.new { |n| n.objectid.local_id }, :id => 'id', - :number => 'number', :name => 'name', :network => Proc.new { |n| n.try(:network).try(:name) }, :company => Proc.new { |n| n.try(:company).try(:name) } }, - [:show], - [], - 'table table-bordered' - - .text-center - = will_paginate @lines, container: false, renderer: RemoteBootstrapPaginationLinkRenderer - -- else - = replacement_msg t('referential_lines.search_no_results') diff --git a/app/views/referential_lines/index.html.slim b/app/views/referential_lines/index.html.slim deleted file mode 100644 index 6b4fd5f38..000000000 --- a/app/views/referential_lines/index.html.slim +++ /dev/null @@ -1,33 +0,0 @@ -= title_tag t('lines.index.title') - -= render partial: 'shared/lines_search_form', locals: { referential: @referential } - -#lines - = render 'lines' - -- content_for :sidebar do - ul.actions - - if policy(Chouette::Line).create? && @referential.organisation == current_organisation - li - = link_to t('lines.actions.new'), new_referential_line_path(@referential), class: 'add' - - - if policy(Chouette::Line).destroy? - #multiple_selection_menu - h4 = t(".multi_selection") - - .disabled - a.enable href="#" - = t(".multi_selection_enable") - - .enabled style="display: none;" - a.disable href="#" - = t(".multi_selection_disable") - - ul.actions - = link_to t(".delete_selected"), referential_lines_path(@referential), "data-multiple-method" => "delete", :class => "remove", "confirmation-text" => t("lines.actions.destroy_selection_confirm") - - a.select_all href="#" - = t(".select_all") - = " | " - a.deselect_all href="#" - = t(".deselect_all") diff --git a/config/routes.rb b/config/routes.rb index f75578106..aa6713857 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -99,7 +99,7 @@ ChouetteIhm::Application.routes.draw do resources :networks, controller: "referential_networks" match 'lines' => 'lines#destroy_all', :via => :delete - resources :lines, controller: "referential_lines" do + resources :lines, controller: "referential_lines", except: :index do resource :footnotes, controller: "line_footnotes" delete :index, on: :collection, action: :delete_all collection do |
