diff options
| author | Michel Etienne | 2014-08-29 11:44:05 +0200 |
|---|---|---|
| committer | Michel Etienne | 2014-08-29 11:44:05 +0200 |
| commit | e1c8a62852616fcfcc6a79b6cc4aefc50e4bd628 (patch) | |
| tree | 7f1aa8ebd5b789ae1ce7a46ff9c4a2b87be7d578 /app/views | |
| parent | 47be58af8bdae063c7177bcab7019c19030c75db (diff) | |
| download | chouette-core-e1c8a62852616fcfcc6a79b6cc4aefc50e4bd628.tar.bz2 | |
active pagination on remote
Diffstat (limited to 'app/views')
19 files changed, 56 insertions, 47 deletions
diff --git a/app/views/companies/_companies.erb b/app/views/companies/_companies.erb index 29871b836..fb36a86af 100644 --- a/app/views/companies/_companies.erb +++ b/app/views/companies/_companies.erb @@ -5,5 +5,5 @@ <%= paginated_content(@companies) %> </div> <div class="pagination"> - <%= will_paginate @companies, :container => false, renderer: BootstrapPagination::Rails %> + <%= will_paginate @companies, :container => false, renderer: RemoteBootstrapPaginationLinkRenderer %> </div> diff --git a/app/views/compliance_check_tasks/_compliance_check_task.erb b/app/views/compliance_check_tasks/_compliance_check_task.html.erb index 081b04b46..081b04b46 100644 --- a/app/views/compliance_check_tasks/_compliance_check_task.erb +++ b/app/views/compliance_check_tasks/_compliance_check_task.html.erb diff --git a/app/views/compliance_check_tasks/_compliance_check_tasks.html.erb b/app/views/compliance_check_tasks/_compliance_check_tasks.html.erb new file mode 100644 index 000000000..9cb805b90 --- /dev/null +++ b/app/views/compliance_check_tasks/_compliance_check_tasks.html.erb @@ -0,0 +1,9 @@ +<div class="page_info"> + <span class="search"> <%= t("will_paginate.page_entries_info.search") %></span> <%= page_entries_info @compliance_check_tasks %> +</div> +<div class="compliance_check_tasks paginated_content"> + <%= paginated_content @compliance_check_tasks %> +</div> +<div class="pagination"> + <%= will_paginate @compliance_check_tasks, :container => false, renderer: RemoteBootstrapPaginationLinkRenderer %> +</div> diff --git a/app/views/compliance_check_tasks/index.html.erb b/app/views/compliance_check_tasks/index.html.erb index 8a659070c..fe05b3cdc 100644 --- a/app/views/compliance_check_tasks/index.html.erb +++ b/app/views/compliance_check_tasks/index.html.erb @@ -1,14 +1,7 @@ <%= title_tag t('.title') %> <div class="warning"><%= t('.warning') %> </div> -<div class="page_info"> - <span class="search"> <%= t("will_paginate.page_entries_info.search") %></span> <%= page_entries_info @compliance_check_tasks %> -</div> -<div class="compliance_check_tasks paginated_content"> - <%= paginated_content @compliance_check_tasks %> -</div> -<div class="pagination"> - <%= will_paginate @compliance_check_tasks, :container => false, renderer: BootstrapPagination::Rails %> -</div> + +<div id="compliance_check_tasks"><%= render 'compliance_check_tasks' %></div> <% content_for :sidebar do %> <ul class="actions"> diff --git a/app/views/compliance_check_tasks/index.js.erb b/app/views/compliance_check_tasks/index.js.erb new file mode 100644 index 000000000..08ddf1dc5 --- /dev/null +++ b/app/views/compliance_check_tasks/index.js.erb @@ -0,0 +1 @@ +$('#compliance_check_tasks').html('<%= escape_javascript(render("compliance_check_tasks")) %>');
\ No newline at end of file diff --git a/app/views/connection_links/_connection_links.erb b/app/views/connection_links/_connection_links.erb index 1f4704596..cfc1d45f4 100644 --- a/app/views/connection_links/_connection_links.erb +++ b/app/views/connection_links/_connection_links.erb @@ -5,5 +5,5 @@ <%= paginated_content(@connection_links) %> </div> <div class="pagination"> - <%= will_paginate @connection_links, :container => false, renderer: BootstrapPagination::Rails %> + <%= will_paginate @connection_links, :container => false, renderer: RemoteBootstrapPaginationLinkRenderer %> </div> diff --git a/app/views/exports/_exports.html.erb b/app/views/exports/_exports.html.erb new file mode 100644 index 000000000..58d4d7e70 --- /dev/null +++ b/app/views/exports/_exports.html.erb @@ -0,0 +1,17 @@ +<div class="page_info"> + <span class="search"> <%= t("will_paginate.page_entries_info.search") %></span> <%= page_entries_info @exports %> +</div> +<div class="exports paginated_content"> + <% @exports.each_slice(3) do |row_exports| %> + <div class="row"> + <% row_exports.each do |export| %> + <div class="col-md-4"> + <%= render :partial => "export", locals: { export: export } %> + </div> + <% end %> + </div> + <% end %> +</div> +<div class="pagination"> + <%= will_paginate @exports, :container => false, renderer: RemoteBootstrapPaginationLinkRenderer %> +</div> diff --git a/app/views/exports/index.html.erb b/app/views/exports/index.html.erb index 2f89b9458..35b19be62 100644 --- a/app/views/exports/index.html.erb +++ b/app/views/exports/index.html.erb @@ -1,22 +1,7 @@ <%= title_tag t('.title') %> <div class="warning"><%= t('.warning') %> </div> -<div class="page_info"> - <span class="search"> <%= t("will_paginate.page_entries_info.search") %></span> <%= page_entries_info @exports %> -</div> -<div class="exports paginated_content"> - <% @exports.each_slice(3) do |row_exports| %> - <div class="row"> - <% row_exports.each do |export| %> - <div class="col-md-4"> - <%= render :partial => "export", locals: { export: export } %> - </div> - <% end %> - </div> - <% end %> -</div> -<div class="pagination"> - <%= will_paginate @exports, :container => false, renderer: BootstrapPagination::Rails %> -</div> +<div id="exports"><%= render 'exports' %></div> + <% content_for :sidebar do %> <ul class="actions"> diff --git a/app/views/exports/index.js.erb b/app/views/exports/index.js.erb new file mode 100644 index 000000000..08ddf1dc5 --- /dev/null +++ b/app/views/exports/index.js.erb @@ -0,0 +1 @@ +$('#compliance_check_tasks').html('<%= escape_javascript(render("compliance_check_tasks")) %>');
\ No newline at end of file diff --git a/app/views/group_of_lines/_group_of_lines.erb b/app/views/group_of_lines/_group_of_lines.erb index 4d2d06159..212507d01 100644 --- a/app/views/group_of_lines/_group_of_lines.erb +++ b/app/views/group_of_lines/_group_of_lines.erb @@ -5,5 +5,5 @@ <%= paginated_content(@group_of_lines) %> </div> <div class="pagination"> - <%= will_paginate @group_of_lines, :container => false, renderer: BootstrapPagination::Rails %> + <%= will_paginate @group_of_lines, :container => false, renderer: RemoteBootstrapPaginationLinkRenderer %> </div> diff --git a/app/views/import_tasks/_import_tasks.html.erb b/app/views/import_tasks/_import_tasks.html.erb new file mode 100644 index 000000000..6e3825817 --- /dev/null +++ b/app/views/import_tasks/_import_tasks.html.erb @@ -0,0 +1,9 @@ +<div class="page_info"> + <span class="search"> <%= t("will_paginate.page_entries_info.search") %></span> <%= page_entries_info @import_tasks %> +</div> +<div class="import_tasks paginated_content"> + <%= paginated_content @import_tasks %> +</div> +<div class="pagination"> + <%= will_paginate @import_tasks, :container => false, renderer: RemoteBootstrapPaginationLinkRenderer %> +</div> diff --git a/app/views/import_tasks/index.html.erb b/app/views/import_tasks/index.html.erb index f19c84929..ce0149f72 100644 --- a/app/views/import_tasks/index.html.erb +++ b/app/views/import_tasks/index.html.erb @@ -1,14 +1,8 @@ <%= title_tag t('.title') %> <div class="warning"><%= t('.warning') %> </div> -<div class="page_info"> - <span class="search"> <%= t("will_paginate.page_entries_info.search") %></span> <%= page_entries_info @import_tasks %> -</div> -<div class="import_tasks paginated_content"> - <%= paginated_content @import_tasks %> -</div> -<div class="pagination"> - <%= will_paginate @import_tasks, :container => false, renderer: BootstrapPagination::Rails %> -</div> + +<div id="import_tasks"><%= render 'import_tasks' %></div> + <% content_for :sidebar do %> <ul class="actions"> diff --git a/app/views/import_tasks/index.js.erb b/app/views/import_tasks/index.js.erb new file mode 100644 index 000000000..79679f8ac --- /dev/null +++ b/app/views/import_tasks/index.js.erb @@ -0,0 +1 @@ +$('#import_tasks').html('<%= escape_javascript(render("import_tasks")) %>');
\ No newline at end of file diff --git a/app/views/lines/_lines.html.erb b/app/views/lines/_lines.html.erb index 3bb3cd37f..a4d9a3f0b 100644 --- a/app/views/lines/_lines.html.erb +++ b/app/views/lines/_lines.html.erb @@ -5,5 +5,5 @@ <%= paginated_content(@lines) %> </div> <div class="pagination"> - <%= will_paginate @lines, :container => false, renderer: BootstrapPagination::Rails %> + <%= will_paginate @lines, :container => false, renderer: RemoteBootstrapPaginationLinkRenderer %> </div> diff --git a/app/views/networks/_networks.erb b/app/views/networks/_networks.erb index e395d4ebb..9d95d63b6 100644 --- a/app/views/networks/_networks.erb +++ b/app/views/networks/_networks.erb @@ -5,5 +5,5 @@ <%= paginated_content(@networks) %> </div> <div class="pagination"> - <%= will_paginate @networks, :container => false, renderer: BootstrapPagination::Rails %> + <%= will_paginate @networks, :container => false, renderer: RemoteBootstrapPaginationLinkRenderer %> </div> diff --git a/app/views/shared/_header.erb b/app/views/shared/_header.erb index dc096f80b..53975556b 100644 --- a/app/views/shared/_header.erb +++ b/app/views/shared/_header.erb @@ -82,7 +82,7 @@ <li><%= link_to_language :en %></li> </ul> </li> - <li><%= link_to t('layouts.help'), help_path, :class =>("current" if help_page?), :target => "_blank" %></li> + <li><%= link_to t('layouts.help'), help_path, :class =>("current" if help_page?), :target => "chouette_help" %></li> <% if user_signed_in? %> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown"><span class="gravatar"><%= user_gravatar_image_tag(current_user, 16) %></span><%= current_user.name %> <b class="caret"></b></a> diff --git a/app/views/stop_area_copies/new.html.erb b/app/views/stop_area_copies/new.html.erb index 28c201d2f..5edc005cc 100644 --- a/app/views/stop_area_copies/new.html.erb +++ b/app/views/stop_area_copies/new.html.erb @@ -3,8 +3,8 @@ <%= semantic_form_for [@referential, @stop_area, @stop_area_copy] do |form| %> <br> <%= form.inputs do %> - <%= form.input :source_id , :as => :hidden%> - <%= form.input :hierarchy , :as => :hidden%> + <%= form.input :source_id, :as => :hidden %> + <%= form.input :hierarchy, :as => :hidden %> <% if @stop_area_copy.hierarchy == "child"%> <% if @stop_area.area_type.underscore == "stop_place"%> <%= form.input :area_type, :as => :select, :collection => ["stop_place","commercial_stop_point"], :include_blank => false, :member_label => Proc.new { |stop_area_type| t("area_types.label.#{stop_area_type}") } %> @@ -12,8 +12,7 @@ <%= form.input :area_type, :as => :select, :collection => ["boarding_position","quay"], :include_blank => false, :member_label => Proc.new { |stop_area_type| t("area_types.label.#{stop_area_type}") } %> <% end %> <% else %> - <%= form.input :area_type, :as => :select, :input_html => { :disabled => true }, :collection => [@stop_area_copy.area_type], :include_blank => false, :member_label => Proc.new { |stop_area_type| t("area_types.label.#{stop_area_type}") } %> - <%= form.input :area_type , :as => :hidden%> + <%= form.input :area_type, :as => :select, :collection => [@stop_area_copy.area_type], :include_blank => false, :member_label => Proc.new { |stop_area_type| t("area_types.label.#{stop_area_type}") } %> <% end %> <% end %> <%= form.actions do %> diff --git a/app/views/stop_areas/_stop_areas.html.erb b/app/views/stop_areas/_stop_areas.html.erb index 38423aedf..9c7a82d6d 100644 --- a/app/views/stop_areas/_stop_areas.html.erb +++ b/app/views/stop_areas/_stop_areas.html.erb @@ -5,5 +5,5 @@ <%= paginated_content(@stop_areas) %> </div> <div class="pagination"> - <%= will_paginate @stop_areas, :container => false, renderer: BootstrapPagination::Rails %> + <%= will_paginate @stop_areas, :container => false, renderer: RemoteBootstrapPaginationLinkRenderer %> </div> diff --git a/app/views/time_tables/_time_tables.html.erb b/app/views/time_tables/_time_tables.html.erb index 72fbd9384..4458f653d 100644 --- a/app/views/time_tables/_time_tables.html.erb +++ b/app/views/time_tables/_time_tables.html.erb @@ -5,5 +5,5 @@ <%= paginated_content(@time_tables) %> </div> <div class="pagination"> - <%= will_paginate @time_tables, :container => false, renderer: BootstrapPagination::Rails %> + <%= will_paginate @time_tables, :container => false, renderer: RemoteBootstrapPaginationLinkRenderer %> </div> |
