diff options
| author | Luc Donnet | 2012-08-06 13:30:08 +0200 | 
|---|---|---|
| committer | Luc Donnet | 2012-08-06 13:30:08 +0200 | 
| commit | 23db0719ef5508584243047332184984fb89e258 (patch) | |
| tree | 7206d0abaddbbf42866933c28580792a2967ae0a | |
| parent | f9eab62b3a9ae2c88cc22fb0b8ddbeaeff1be673 (diff) | |
| download | chouette-core-23db0719ef5508584243047332184984fb89e258.tar.bz2 | |
Update css for index list
23 files changed, 105 insertions, 120 deletions
| diff --git a/app/assets/images/icons/calculator_edit.png b/app/assets/images/icons/calculator_edit.pngBinary files differ new file mode 100644 index 000000000..45a4ed0a4 --- /dev/null +++ b/app/assets/images/icons/calculator_edit.png diff --git a/app/assets/stylesheets/common.css.scss b/app/assets/stylesheets/common.css.scss index 94da51a76..91050771e 100644 --- a/app/assets/stylesheets/common.css.scss +++ b/app/assets/stylesheets/common.css.scss @@ -42,7 +42,7 @@          }          .actions { -            margin-top: 14px; +            margin-top: 10px;              a {                  color: #666;                  padding-left: 12px; diff --git a/app/assets/stylesheets/journey_patterns.css.scss b/app/assets/stylesheets/journey_patterns.css.scss index 5981c76b0..d023ffffa 100644 --- a/app/assets/stylesheets/journey_patterns.css.scss +++ b/app/assets/stylesheets/journey_patterns.css.scss @@ -3,37 +3,6 @@  // You can use Sass (SCSS) here: http://sass-lang.com/  @import "common"; -#workspace.routes.show -{ -    .jouerney_pattern:after {  -        @include after_div_for_object;   -    } - -    .journey_patterns { -        margin-top: 20px; -    } - -    .journey_patterns:after { -        @include content_to_clear; -    } -     -    .journey_pattern { -        @include div_for_object; - -        /* to create multi-column index */ -        width: 350px; -        padding-right: 10px; -        height: 60px; -        float: left; - -        .name { -            line-height: 16px; -        //    float: left; -        } -         -    } -} -  #workspace.journey_patterns.edit, #workspace.journey_patterns.new  {      #route_color{ width: 100px; diff --git a/app/assets/stylesheets/layout.css.scss b/app/assets/stylesheets/layout.css.scss index 58d85b5a7..3c4af97e5 100644 --- a/app/assets/stylesheets/layout.css.scss +++ b/app/assets/stylesheets/layout.css.scss @@ -92,4 +92,8 @@ $text_color: #222;      a.select_areas {          background: url(image-path('icons/select_parent.png')) no-repeat;      } + +    a.calculator_edit { +        background: url(image-path('icons/calculator_edit.png')) no-repeat; +    }  } diff --git a/app/assets/stylesheets/pagination.css.scss b/app/assets/stylesheets/pagination.css.scss index 222ab861b..7bb3e9cde 100644 --- a/app/assets/stylesheets/pagination.css.scss +++ b/app/assets/stylesheets/pagination.css.scss @@ -1,7 +1,27 @@ +.page_info { +    margin: 30px 0 10px 0; +    height: 30px; +    line-height: 30px; +    color: #777777;  +    border-bottom: solid 1px #cdc9c0; +    border-top: solid 1px #cdc9c0; +     +    .search{ +        margin: 0 20px 0 10px; +        color: #61970b; +        font-weight:bold; +    } +     +    b { +        padding: 0.1em 0.25em;  +    } +} +  .pagination {    background: white;    cursor: default; -  margin-top: 20px; +  margin-top: 10px; +  padding-left: 70px;    /* self-clearing method: */    a, span, em { @@ -25,17 +45,6 @@    a:hover,  a:focus {        color: #000033;        border-color: #000033; } -  .page_info { -      background: #61970b; -      color: white; -      padding: 0.4em 0.6em; -      width: 22em; -      margin-bottom: 0.3em; -      text-align: center; } -  .page_info b { -      color: #000033; -      background: #86b41d; -      padding: 0.1em 0.25em; }  }  .pagination:after { diff --git a/app/assets/stylesheets/routes.css.scss b/app/assets/stylesheets/routes.css.scss index a5c63bf01..77e473dbc 100644 --- a/app/assets/stylesheets/routes.css.scss +++ b/app/assets/stylesheets/routes.css.scss @@ -63,7 +63,7 @@      }      .stop_points { -        margin-top: 20px; +        margin-top: 10px;      }      .stop_points:after { @@ -79,7 +79,7 @@      .stop_point {          @include div_for_object;          /* to create multi-column index */ -        width: 350px; +        width: 250px;          float: left;          padding-right: 10px; @@ -95,5 +95,35 @@          }      } -}         +}    + +#workspace.routes.show +{ +    .jouerney_pattern:after {  +        @include after_div_for_object;   +    } + +    .journey_patterns { +        margin-top: 10px; +    } + +    .journey_patterns:after { +        @include content_to_clear; +    } +     +    .journey_pattern { +        @include div_for_object; + +        /* to create multi-column index */ +        width: 350px; +        padding-right: 10px; +        height: 80px; +        float: left; + +        .name { +            line-height: 16px; +        } +         +    } +}      diff --git a/app/assets/stylesheets/stop_areas.css.scss b/app/assets/stylesheets/stop_areas.css.scss index ad1339494..cd1623a05 100644 --- a/app/assets/stylesheets/stop_areas.css.scss +++ b/app/assets/stylesheets/stop_areas.css.scss @@ -9,10 +9,6 @@          @include after_div_for_object;        } -    .stop_areas { -        margin-top: 20px; -    } -      .stop_areas:after {          @include content_to_clear;      } @@ -20,7 +16,7 @@      .stop_area {          @include div_for_object;          /* to create multi-column index */ -        width: 350px; +        width: 250px;          float: left;          padding-right: 10px; @@ -139,4 +135,16 @@      }  } +#sidebar ul.selection li {     +    a { +        line-height: 27px; +         +        img{ +            height: 25px; +            width: 25px; +            vertical-align: middle; +        } +    } +} + diff --git a/app/controllers/routes_controller.rb b/app/controllers/routes_controller.rb index 99b9899fa..3c0a6952e 100644 --- a/app/controllers/routes_controller.rb +++ b/app/controllers/routes_controller.rb @@ -16,7 +16,7 @@ class RoutesController < ChouetteController    def show      @map = RouteMap.new(route).with_helpers(self) -    @stop_points = route.stop_points.paginate(:page => params[:page], :per_page => 10) +    @stop_points = route.stop_points.paginate(:page => params[:page], :per_page => 12)      show!    end diff --git a/app/controllers/stop_areas_controller.rb b/app/controllers/stop_areas_controller.rb index 4f8aec734..2148aec54 100644 --- a/app/controllers/stop_areas_controller.rb +++ b/app/controllers/stop_areas_controller.rb @@ -35,7 +35,7 @@ class StopAreasController < ChouetteController    end    def index      -    request.format.kml? ? @per_page = nil : @per_page = 10 +    request.format.kml? ? @per_page = nil : @per_page = 12      index!    end diff --git a/app/views/companies/index.html.erb b/app/views/companies/index.html.erb index 257e1a945..8d96b0e65 100644 --- a/app/views/companies/index.html.erb +++ b/app/views/companies/index.html.erb @@ -8,11 +8,8 @@    <%= link_to t("cancel"), referential_companies_path(@referential) %>  <% end %> -<div class="pagination"> -  <div class="page_info"> -    <%= page_entries_info @companies %> -  </div> -  <%= will_paginate @companies, :container => false %> +<div class="page_info"> +  <span class="search"> <%= t("will_paginate.page_entries_info.search") %></span> <%= page_entries_info @companies %>  </div>  <div class="companies paginated_content">    <%= render :partial => "company", :collection => @companies %> diff --git a/app/views/connection_links/_connection_link.erb b/app/views/connection_links/_connection_link.erb index 04ed2e833..7690fb18f 100644 --- a/app/views/connection_links/_connection_link.erb +++ b/app/views/connection_links/_connection_link.erb @@ -6,8 +6,8 @@        <%= link_to_if connection_link.departure, connection_link.departure.name, referential_stop_area_path(@referential, connection_link.departure), :title => "#{connection_link.human_attribute_name('departure')} #{connection_link.departure.name}" %>      <% else %>        <%= connection_link.human_attribute_name("undefined") %> -    <% end %> -     - <%= connection_link.human_attribute_name('arrival') %>  +    <% end %><br> +    <%= connection_link.human_attribute_name('arrival') %>       <% if connection_link.arrival.present? %>         <%= link_to_if( connection_link.arrival, connection_link.arrival.name, referential_stop_area_path(@referential, connection_link.arrival), :title => "#{connection_link.human_attribute_name('arrival')} #{connection_link.arrival.name}" )  %>      <% else %> diff --git a/app/views/connection_links/index.html.erb b/app/views/connection_links/index.html.erb index 8b9fc04fa..8a19559ce 100644 --- a/app/views/connection_links/index.html.erb +++ b/app/views/connection_links/index.html.erb @@ -27,11 +27,8 @@  <% end %>  --> -<div class="pagination"> -  <div class="page_info"> -    <%= page_entries_info @connection_links %> -  </div> -  <%= will_paginate @connection_links, :container => false %> +<div class="page_info"> +  <span class="search"> <%= t("will_paginate.page_entries_info.search") %></span> <%= page_entries_info @connection_links %>  </div>  <div class="connection_links paginated_content">    <%= render :partial => "connection_link", :collection => @connection_links %> diff --git a/app/views/exports/index.html.erb b/app/views/exports/index.html.erb index 82803d725..25db2e1ba 100644 --- a/app/views/exports/index.html.erb +++ b/app/views/exports/index.html.erb @@ -1,10 +1,7 @@  <%= title_tag t('.title') %>  -<div class="pagination"> -  <div class="page_info"> -    <%= page_entries_info @exports %> -  </div> -  <%= will_paginate @exports, :container => false %> +<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">    <%= render :partial => "export", :collection => @exports %> diff --git a/app/views/imports/index.html.erb b/app/views/imports/index.html.erb index 454dcd813..7e0d366a3 100644 --- a/app/views/imports/index.html.erb +++ b/app/views/imports/index.html.erb @@ -1,10 +1,7 @@  <%= title_tag t('.title') %>  -<div class="pagination"> -  <div class="page_info"> -    <%= page_entries_info @imports %> -  </div> -  <%= will_paginate @imports, :container => false %> +<div class="page_info"> +  <span class="search"> <%= t("will_paginate.page_entries_info.search") %></span> <%= page_entries_info @imports %>  </div>  <div class="imports paginated_content">    <%= render :partial => "import", :collection => @imports %> diff --git a/app/views/journey_patterns/_journey_pattern.html.erb b/app/views/journey_patterns/_journey_pattern.html.erb index bf0f84fb1..0734a9a8b 100644 --- a/app/views/journey_patterns/_journey_pattern.html.erb +++ b/app/views/journey_patterns/_journey_pattern.html.erb @@ -2,10 +2,9 @@    <%= link_to journey_name(journey_pattern), [@referential, @line, @route, journey_pattern] %>    <div class="info">      <% unless journey_pattern.stop_points.empty? %> -      <%= t('.from_to', :departure => journey_pattern.stop_points.first.stop_area.name, :arrival => journey_pattern.stop_points.last.stop_area.name) %> - -    <% end %> -    <%= t('.stop_count', :count => journey_pattern.stop_points.count, :route_count => @route.stop_points.count) %> - -    <%= t('.vehicle_journeys_count', :count => journey_pattern.vehicle_journeys.count) %> +      <%= t('.from_to', :departure => journey_pattern.stop_points.first.stop_area.name, :arrival => journey_pattern.stop_points.last.stop_area.name) %> +    <% end %><br> +    <%= t('.stop_count', :count => journey_pattern.stop_points.count, :route_count => @route.stop_points.count) %> | <%= t('.vehicle_journeys_count', :count => journey_pattern.vehicle_journeys.count) %>      <div class="actions">          <%= link_to t("actions.destroy"), referential_line_route_journey_pattern_path(@referential, @line, @route, journey_pattern), :method => :delete, :confirm =>  t('journey_patterns.actions.destroy_confirm'), :class => "remove" %>        <% if journey_pattern.vehicle_journeys.count > 0 %> diff --git a/app/views/lines/index.html.erb b/app/views/lines/index.html.erb index 8c9766866..665411b1b 100644 --- a/app/views/lines/index.html.erb +++ b/app/views/lines/index.html.erb @@ -23,11 +23,8 @@  </p>  <% end %> -<div class="pagination"> -  <div class="page_info"> -    <%= page_entries_info @lines %> -  </div> -  <%= will_paginate @lines, :container => false %> +<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">    <%= render :partial => "line", :collection => @lines %> diff --git a/app/views/networks/index.html.erb b/app/views/networks/index.html.erb index 825bb3dcb..f3502f1e6 100644 --- a/app/views/networks/index.html.erb +++ b/app/views/networks/index.html.erb @@ -8,11 +8,8 @@    <%= link_to t("cancel"), referential_networks_path(@referential) %>  <% end %> -<div class="pagination"> -  <div class="page_info"> -    <%= page_entries_info @networks %> -  </div> -  <%= will_paginate @networks, :container => false %> +<div class="page_info"> +  <span class="search"> <%= t("will_paginate.page_entries_info.search") %></span> <%= page_entries_info @networks %>  </div>  <div class="networks paginated_content">    <%= render :partial => "network", :collection => @networks %> diff --git a/app/views/routes/show.html.erb b/app/views/routes/show.html.erb index 04b00f497..e6fbcce3f 100644 --- a/app/views/routes/show.html.erb +++ b/app/views/routes/show.html.erb @@ -64,21 +64,12 @@  </div> -<h3 class="route_stop_points"><%= t('.stop_points') %><a name="stop_points"/></h3> -<div class="pagination"> -  <div class="page_info"> -    <%= page_entries_info @stop_points %> -  </div> -  <%= will_paginate @stop_points, :container => false %> -</div> +<h3 class="route_stop_points"><%= t('.stop_points') %></h3>  <div class="stop_points paginated_content">    <%= render :partial => "stop_points/stop_point", :collection => @stop_points %>  </div> -<div class="pagination"> -  <%= will_paginate @stop_points, :container => false %> -</div> -<h3 class="route_journey_patterns"><%= t('.journey_patterns') %><a name="journey_patterns"/></h3> +<h3 class="route_journey_patterns"><%= t('.journey_patterns') %></h3>  <div class="journey_patterns">    <%= render :partial => "journey_patterns/journey_pattern", :collection => @route.journey_patterns %>  </div> diff --git a/app/views/stop_areas/index.html.erb b/app/views/stop_areas/index.html.erb index a8a12ee52..982895a29 100644 --- a/app/views/stop_areas/index.html.erb +++ b/app/views/stop_areas/index.html.erb @@ -9,11 +9,8 @@    <%= link_to t("cancel"), referential_stop_areas_path(@referential) %>  <% end %> -<div class="pagination"> -  <div class="page_info"> -    <%= page_entries_info @stop_areas %> -  </div> -  <%= will_paginate @stop_areas, :container => false %> +<div class="page_info"> +  <span class="search"> <%= t("will_paginate.page_entries_info.search") %></span> <%= page_entries_info @stop_areas %>  </div>  <div class="stop_areas paginated_content">    <%= render :partial => "stop_area", :collection => @stop_areas %> @@ -25,7 +22,7 @@  <% content_for :sidebar do %>  <ul class="actions">    <li><%= link_to t('stop_areas.actions.new'), new_referential_stop_area_path(@referential), :class => "add" %></li> -  <li><%= link_to t('stop_areas.actions.default_geometry'), default_geometry_referential_stop_areas_path(@referential), :method => :put %></li> +  <li><%= link_to t('stop_areas.actions.default_geometry'), default_geometry_referential_stop_areas_path(@referential), :method => :put, :class => "calculator_edit" %></li>  </ul>  <h3><%= t(".selection") %></h3> diff --git a/app/views/time_tables/index.html.erb b/app/views/time_tables/index.html.erb index 26e484554..1ae58e393 100644 --- a/app/views/time_tables/index.html.erb +++ b/app/views/time_tables/index.html.erb @@ -8,11 +8,8 @@    <%= link_to t("cancel"), referential_time_tables_path(@referential) %>  <% end %> -<div class="pagination"> -  <div class="page_info"> -    <%= page_entries_info @time_tables %> -  </div> -  <%= will_paginate @time_tables, :container => false %> +<div class="page_info"> +  <span class="search"> <%= t("will_paginate.page_entries_info.search") %></span> <%= page_entries_info @time_tables %>  </div>  <div class="time_tables paginated_content">    <%= render :partial => "time_table", :collection => @time_tables %> diff --git a/app/views/vehicle_journeys/index.html.erb b/app/views/vehicle_journeys/index.html.erb index 456abf5d2..98266e2c8 100644 --- a/app/views/vehicle_journeys/index.html.erb +++ b/app/views/vehicle_journeys/index.html.erb @@ -13,11 +13,8 @@    </div>  </div>  <h3 class="vehicle_journeys"><%= t('.vehicle_journeys') %></h3> -<div class="pagination"> -  <div class="page_info"> -    <%= page_entries_info @vehicle_journeys %> -  </div> -  <%= will_paginate @vehicle_journeys, :container => false %> +<div class="page_info"> +  <span class="search"> <%= t("will_paginate.page_entries_info.search") %></span> <%= page_entries_info @vehicle_journeys %>  </div>  <div class="vehicle_journeys paginated_content">    <table> diff --git a/config/locales/actions.yml b/config/locales/actions.yml index 05150dfd8..98460aafd 100644 --- a/config/locales/actions.yml +++ b/config/locales/actions.yml @@ -5,7 +5,7 @@ en:      search: Search      add: Add new    or: or -  cancel: cancel +  cancel: Cancel  fr:    actions:      edit: Modifier @@ -13,4 +13,4 @@ fr:      search: Chercher      add: Ajouter    or: ou -  cancel: annuler
\ No newline at end of file +  cancel: Annuler
\ No newline at end of file diff --git a/config/locales/will_paginate.yml b/config/locales/will_paginate.yml index bd8dbbc32..a5f2ebf22 100644 --- a/config/locales/will_paginate.yml +++ b/config/locales/will_paginate.yml @@ -1,10 +1,11 @@  en: -  will_paginate: +  will_paginate:        previous_label: "← Previous"      next_label: "Next →"      page_gap: "…"      page_entries_info: +      search: Search           single_page:          zero:  "No item found"          one:   "1 %{model} shown" @@ -24,6 +25,7 @@ fr:      page_gap: "…"      page_entries_info: +      search: Recherche        single_page:          zero:  "Aucun élément trouvé"          one:   "1 %{model} affiché(e)" | 
