aboutsummaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/lines/_lines.html.erb9
-rw-r--r--app/views/lines/index.html.erb12
-rw-r--r--app/views/lines/index.js.erb1
3 files changed, 12 insertions, 10 deletions
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