From e30ce627fcd524eb616000d73f6a8450c08e1cba Mon Sep 17 00:00:00 2001 From: Alban Peignier Date: Wed, 25 May 2016 15:53:52 +0200 Subject: Fixes header and footer to remove Chouette specific stuff. Refs #912 --- app/assets/images/stif.png | Bin 0 -> 6398 bytes app/models/offer_workbench.rb | 2 +- app/models/referential.rb | 2 +- app/models/user.rb | 2 +- app/views/layouts/application.html.erb | 2 +- app/views/offer_workbenches/_referential.erb | 12 +++++----- app/views/offer_workbenches/show.html.erb | 3 ++- app/views/referentials/_referential.erb | 12 +++++----- app/views/shared/_footer.erb | 22 ------------------ app/views/shared/_header.erb | 6 +++-- config/environment.rb | 2 +- config/environments/development.rb | 6 ++--- db/seeds.rb | 33 ++++++++++++++++++++------- 13 files changed, 51 insertions(+), 53 deletions(-) create mode 100644 app/assets/images/stif.png diff --git a/app/assets/images/stif.png b/app/assets/images/stif.png new file mode 100644 index 000000000..577d4bb72 Binary files /dev/null and b/app/assets/images/stif.png differ diff --git a/app/models/offer_workbench.rb b/app/models/offer_workbench.rb index a1c8f3b9c..65feafdd5 100644 --- a/app/models/offer_workbench.rb +++ b/app/models/offer_workbench.rb @@ -1,7 +1,7 @@ class OfferWorkbench < ActiveRecord::Base belongs_to :organisation - validates :name, presence: true, uniqueness: true + validates :name, presence: true validates :organisation, presence: true has_many :referentials diff --git a/app/models/referential.rb b/app/models/referential.rb index af2cc2182..b41a7a434 100644 --- a/app/models/referential.rb +++ b/app/models/referential.rb @@ -165,7 +165,7 @@ class Referential < ActiveRecord::Base before_destroy :destroy_jobs def destroy_jobs - Ievkit.delete_jobs(slug) + #Ievkit.delete_jobs(slug) true end diff --git a/app/models/user.rb b/app/models/user.rb index 475e7629c..e00b6a35a 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -11,7 +11,7 @@ class User < ActiveRecord::Base # FIXME https://github.com/nbudin/devise_cas_authenticatable/issues/53 # Work around :validatable, when database_authenticatable is diabled. - attr_accessor :password + attr_accessor :password unless authentication_type == :database_authenticatable # Setup accessible (or protected) attributes for your model # attr_accessible :email, :password, :current_password, :password_confirmation, :remember_me, :name, :organisation_attributes diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 81f3d1e83..78c4f4a5f 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -1,7 +1,7 @@ - Chouette - <%= title %> + STIF BOIV - <%= title %> <%= favicon_link_tag "logo_chouette_small.ico" %> <%= favicon_link_tag 'logo_chouette_small.png', rel: 'apple-touch-icon', type: 'image/png' %> <%= stylesheet_link_tag :application %> diff --git a/app/views/offer_workbenches/_referential.erb b/app/views/offer_workbenches/_referential.erb index 1f985bc65..ea1a1f899 100644 --- a/app/views/offer_workbenches/_referential.erb +++ b/app/views/offer_workbenches/_referential.erb @@ -1,7 +1,7 @@
- + <%= link_to edit_referential_path(referential), :class => "btn btn-default btn-sm" do %> <% end %> @@ -10,22 +10,22 @@ <% end %>
- <%= link_to([@referential, referential], :class => "preview", :title => "#{Referential.model_name.human.capitalize} #{referential.name}") do %> + <%= link_to([@referential, referential], :class => "preview", :title => "#{Referential.model_name.human.capitalize} #{referential.name}") do %> - <%= truncate(referential.name, :length => 20) %> + <%= truncate(referential.name, :length => 30) %> <% end %>
-
+
-

+

<%= referential.human_attribute_name('lines') %>:

<%= referential.human_attribute_name('networks') %>:

-

+

<%= referential.human_attribute_name('vehicle_journeys') %>:

diff --git a/app/views/offer_workbenches/show.html.erb b/app/views/offer_workbenches/show.html.erb index 9a47977e3..43335a68f 100644 --- a/app/views/offer_workbenches/show.html.erb +++ b/app/views/offer_workbenches/show.html.erb @@ -1,5 +1,6 @@ -<%= title_tag @offer_workbench.name %> +<%= title_tag "#{@offer_workbench.name} - Tableau de bord" %>

+

Liste des jeux de données

<%= paginated_content @offer_workbench.referentials %>
diff --git a/app/views/referentials/_referential.erb b/app/views/referentials/_referential.erb index 1f985bc65..ea1a1f899 100644 --- a/app/views/referentials/_referential.erb +++ b/app/views/referentials/_referential.erb @@ -1,7 +1,7 @@
- + <%= link_to edit_referential_path(referential), :class => "btn btn-default btn-sm" do %> <% end %> @@ -10,22 +10,22 @@ <% end %>
- <%= link_to([@referential, referential], :class => "preview", :title => "#{Referential.model_name.human.capitalize} #{referential.name}") do %> + <%= link_to([@referential, referential], :class => "preview", :title => "#{Referential.model_name.human.capitalize} #{referential.name}") do %> - <%= truncate(referential.name, :length => 20) %> + <%= truncate(referential.name, :length => 30) %> <% end %>
-
+
-

+

<%= referential.human_attribute_name('lines') %>:

<%= referential.human_attribute_name('networks') %>:

-

+

<%= referential.human_attribute_name('vehicle_journeys') %>:

diff --git a/app/views/shared/_footer.erb b/app/views/shared/_footer.erb index e8fe2d5e4..77c19d2fd 100644 --- a/app/views/shared/_footer.erb +++ b/app/views/shared/_footer.erb @@ -3,14 +3,6 @@

-
-
    -
  • <%= t("layouts.footer.product.title") %>

  • -
  • <%= link_to t("layouts.footer.product.licence"), "http://www.cecill.info/licences/Licence_CeCILL-B_V1-fr.html", :target => "_blank" %>
  • -
  • <%= link_to t("layouts.footer.product.source_code"), "https://github.com/afimb/chouette2", :target => "_blank" %>
  • -
  • <%= link_to t("layouts.footer.product.user_group"), "http://www.chouette.mobi/club-utilisateurs/", :target => "_blank" %>
  • -
-
  • <%= t("layouts.footer.support.title") %>

  • @@ -24,19 +16,5 @@
  • <%= link_to t("layouts.footer.support.help"), help_path, :target => "chouette_help" %>
-
-
    -
  • <%= t("layouts.footer.contact.title") %>

  • -
  • - <% if ChouetteIhm::Application.config.company_contact.include?("@") %> - <%= mail_to "#{ChouetteIhm::Application.config.company_contact}", t("layouts.footer.contact.mail") %> - <% else %> - <%= link_to t("layouts.footer.contact.mail"), "#{ChouetteIhm::Application.config.company_contact}", :target => "_blank" %> - <% end %> -
  • -
  • <%= link_to t("layouts.footer.contact.newsletter"),"http://www.chouette.mobi/club-utilisateurs/newsletter/", :target => "_blank" %>
  • -
  • <%= link_to t("layouts.footer.contact.forum"), "http://forum.chouette.mobi/", :target => "_blank" %>
  • -
-
diff --git a/app/views/shared/_header.erb b/app/views/shared/_header.erb index ae712e48d..d06941817 100644 --- a/app/views/shared/_header.erb +++ b/app/views/shared/_header.erb @@ -10,9 +10,9 @@ <%= APP_VERSION %> <%= link_to referentials_path, :class =>"navbar-brand" do %> - <%= image_tag("logo_chouette.png") %> + <%#= image_tag("logo_chouette.png") %> <% end %> - +