diff options
| author | Michel Etienne | 2014-08-22 16:13:59 +0200 | 
|---|---|---|
| committer | Michel Etienne | 2014-08-22 16:13:59 +0200 | 
| commit | 56ebf64df06d1929fa6a11f4c8a542d0a1a4a4f5 (patch) | |
| tree | 6f586756fb9acd8f5cebf5fe55497abe28e1c68a | |
| parent | a1dcead1b2194bd643c29b3e9996b9dd522d80c5 (diff) | |
| parent | 71ce5bca071ad06e22feaab08e32c70336e11958 (diff) | |
| download | chouette-core-56ebf64df06d1929fa6a11f4c8a542d0a1a4a4f5.tar.bz2 | |
Merge branch 'sismo' of github.com:afimb/chouette2 into sismo
| -rw-r--r-- | app/controllers/lines_controller.rb | 1 | ||||
| -rw-r--r-- | app/views/lines/_lines.html.erb | 9 | ||||
| -rw-r--r-- | app/views/lines/index.html.erb | 12 | ||||
| -rw-r--r-- | app/views/lines/index.js.erb | 1 | 
4 files changed, 13 insertions, 10 deletions
| diff --git a/app/controllers/lines_controller.rb b/app/controllers/lines_controller.rb index 6f717549a..3721a957d 100644 --- a/app/controllers/lines_controller.rb +++ b/app/controllers/lines_controller.rb @@ -4,6 +4,7 @@ class LinesController < ChouetteController    respond_to :xml    respond_to :json    respond_to :kml, :only => :show +  respond_to :js, :only => :index    belongs_to :referential diff --git a/app/views/lines/_lines.html.erb b/app/views/lines/_lines.html.erb new file mode 100644 index 000000000..3bb3cd37f --- /dev/null +++ b/app/views/lines/_lines.html.erb @@ -0,0 +1,9 @@ +<div class="page_info"> +  <span class="search"> <%= t("will_paginate.page_entries_info.search") %></span> <%= page_entries_info @lines %> +</div> +<div class="lines paginated_content"> +    <%= paginated_content(@lines) %> +</div> +<div class="pagination"> +  <%= will_paginate @lines, :container => false, renderer: BootstrapPagination::Rails %> +</div> diff --git a/app/views/lines/index.html.erb b/app/views/lines/index.html.erb index 4eb9c29f8..34f5f1ccc 100644 --- a/app/views/lines/index.html.erb +++ b/app/views/lines/index.html.erb @@ -1,6 +1,6 @@  <%= title_tag t('lines.index.title') %> -<%= search_form_for @q, :url => referential_lines_path(@referential), :html => {:method => :get, class: "form-inline", :id => "search", role: "form"} do |f| %> +<%= search_form_for @q, :url => referential_lines_path(@referential), remote: true, :html => {:method => :get, class: "form-inline", :id => "search", role: "form"} do |f| %>  <div class="panel panel-default">    <div class="panel-heading">      <div class="input-group col-md-9"> @@ -24,15 +24,7 @@  </div>  <% end %> -<div class="page_info"> -  <span class="search"> <%= t("will_paginate.page_entries_info.search") %></span> <%= page_entries_info @lines %> -</div> -<div class="lines paginated_content"> -    <%= paginated_content(@lines) %> -</div> -<div class="pagination"> -  <%= will_paginate @lines, :container => false, renderer: BootstrapPagination::Rails %> -</div> +<div id="lines"><%= render 'lines' %></div>  <% content_for :sidebar do %>  <ul class="actions"> diff --git a/app/views/lines/index.js.erb b/app/views/lines/index.js.erb new file mode 100644 index 000000000..97595d5e9 --- /dev/null +++ b/app/views/lines/index.js.erb @@ -0,0 +1 @@ +$('#lines').html('<%= escape_javascript(render("lines")) %>');
\ No newline at end of file | 
