aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuc Donnet2014-10-15 09:53:44 +0200
committerLuc Donnet2014-10-15 09:53:44 +0200
commit0932dc84aa48aec730b5092f353ecf512e715abc (patch)
tree58194cba215391d8f8caeb79526c488b71521da5
parent3257cd24ea863177d366342e402c820e029355c7 (diff)
downloadchouette-core-0932dc84aa48aec730b5092f353ecf512e715abc.tar.bz2
Fix display lines in group of line show Refs #0029294 #0029312
-rw-r--r--app/assets/javascripts/group_of_line.js.coffee8
-rw-r--r--app/assets/stylesheets/main/group_of_lines.css.scss48
-rw-r--r--app/controllers/group_of_lines_controller.rb2
-rw-r--r--app/views/group_of_lines/_lines_detail.html.erb13
-rw-r--r--app/views/group_of_lines/show.html.erb11
5 files changed, 7 insertions, 75 deletions
diff --git a/app/assets/javascripts/group_of_line.js.coffee b/app/assets/javascripts/group_of_line.js.coffee
index 315fb19e6..737f343ba 100644
--- a/app/assets/javascripts/group_of_line.js.coffee
+++ b/app/assets/javascripts/group_of_line.js.coffee
@@ -1,13 +1,5 @@
jQuery ->
- switch_lines = (event) ->
- event.preventDefault()
- $('.group_of_lines.show .lines_detail').toggle('slow')
- $('a.lines .switcher').toggle()
-
- $('.group_of_lines.show a.lines').click(switch_lines)
-
-
make_ajax_pagination = () ->
$.get(this.href, null, null, 'script')
false
diff --git a/app/assets/stylesheets/main/group_of_lines.css.scss b/app/assets/stylesheets/main/group_of_lines.css.scss
index 007a0381f..7e8b7590d 100644
--- a/app/assets/stylesheets/main/group_of_lines.css.scss
+++ b/app/assets/stylesheets/main/group_of_lines.css.scss
@@ -19,53 +19,5 @@
margin-top: 10px;
}
- .group_of_line_lines {
- clear: both;
- margin: 0px;
- padding: 0px;
- a {
- cursor: pointer;
- }
- }
-
- .line {
- /* to create multi-column index */
- width: 250px;
- float: left;
- padding-right: 10px;
-
- .position {
- width: 25px;
- height: 20px;
- float: left;
- background-color: #61970B;
- font-weight: bold;
- color: white;
- margin-right: 10px;
- padding-left: 4px;
- }
- .color {
- background-color: white;
- width: 64px;
- height: 64px;
- float: left;
- margin-right: 10px;
- border: 1px solid #999;
-
- a {
- text-decoration: none;
- }
- }
-
- .number {
- font-size: 16px;
- text-align: center;
- font-weight: bold;
- padding-top: 21px;
- }
- .name a {
- display: inline;
- }
- }
}
diff --git a/app/controllers/group_of_lines_controller.rb b/app/controllers/group_of_lines_controller.rb
index 59e933637..3b91f8dd6 100644
--- a/app/controllers/group_of_lines_controller.rb
+++ b/app/controllers/group_of_lines_controller.rb
@@ -10,7 +10,7 @@ class GroupOfLinesController < ChouetteController
def show
@map = GroupOfLineMap.new(resource).with_helpers(self)
- @lines = resource.lines.order(:name).paginate(:page => params[:page])
+ @lines = resource.lines.order(:name)
show! do
build_breadcrumb :show
end
diff --git a/app/views/group_of_lines/_lines_detail.html.erb b/app/views/group_of_lines/_lines_detail.html.erb
index 4d4058540..210ecd4b5 100644
--- a/app/views/group_of_lines/_lines_detail.html.erb
+++ b/app/views/group_of_lines/_lines_detail.html.erb
@@ -1,10 +1,3 @@
- <div class="page_info">
- <span class="search"> <%= t("will_paginate.page_entries_info.list") %></span> <%= page_entries_info @lines %>
- </div>
- <div class="lines paginated_content">
- <%= render :partial => "lines/line", :collection => @lines %>
- </div>
- <div class="pagination">
- <%= will_paginate @lines, :container => false %>
- </div>
-
+<div class="lines paginated_content">
+ <%= paginated_content @lines, "lines/line" %>
+</div>
diff --git a/app/views/group_of_lines/show.html.erb b/app/views/group_of_lines/show.html.erb
index 7ce5ddc46..07527f209 100644
--- a/app/views/group_of_lines/show.html.erb
+++ b/app/views/group_of_lines/show.html.erb
@@ -10,14 +10,9 @@
</div>
<p class="after_map" />
- <h3 class="group_of_line_lines">
- <a class="lines"><%= t('.lines') %>
- <%= image_tag("icons/plus.png" , :class => "switcher") %>
- <%= image_tag("icons/minus.png" , :class => "switcher" , :style => "display: none;") %>
- </a>
- </h3>
- <div class="lines_detail" style="display: none;">
- <%= render :partial => "lines_detail" %>
+ <h3 class="group_of_line_lines"><%= t('.lines') %></h3>
+ <div class="lines_detail">
+ <%= render :partial => "lines_detail" %>
</div>
</div>