aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuc Donnet2014-09-26 12:01:07 +0200
committerLuc Donnet2014-09-26 12:01:07 +0200
commit521043d17fd9617dace3c88b668d7fed78594cc6 (patch)
treee8a3f5d26746822dff25ba55a91f67650cf1f7cd
parent91180ea89c78fd905341804ee40625bfcd9da2af (diff)
parent7bb3845c80ede0184652e35cbbdf30672a8438ec (diff)
downloadchouette-core-521043d17fd9617dace3c88b668d7fed78594cc6.tar.bz2
Merge branch 'sismo' of github.com:afimb/chouette2 into sismo
-rw-r--r--app/helpers/breadcrumb_helper.rb13
-rw-r--r--app/views/devise/registrations/new.html.erb3
-rw-r--r--app/views/users/edit.html.erb1
3 files changed, 12 insertions, 5 deletions
diff --git a/app/helpers/breadcrumb_helper.rb b/app/helpers/breadcrumb_helper.rb
index 5999b6005..580847331 100644
--- a/app/helpers/breadcrumb_helper.rb
+++ b/app/helpers/breadcrumb_helper.rb
@@ -40,13 +40,17 @@ module BreadcrumbHelper
rule_parameter_breadcrumb action
when "User"
user_breadcrumb action
+ when "Referential"
+ referential_breadcrumb action
when "Organisation"
organisation_breadcrumb action
+ when "Api::V1::ApiKey"
+ referential_breadcrumb
else
Rails.logger.info "---------"
Rails.logger.info ">>>>>>> "+resource_class.to_s+" unmapped"
Rails.logger.info "---------"
- referential_breadcrumb action
+ organisation_breadcrumb :index
end
end
@@ -153,17 +157,18 @@ module BreadcrumbHelper
def referential_breadcrumb (action = :edit)
organisation_breadcrumb
- add_breadcrumb breadcrumb_label(@referential), referential_path(@referential),:title => breadcrumb_tooltip(@referential) if action == :edit
+ add_breadcrumb breadcrumb_label(@referential), referential_path(@referential),:title => breadcrumb_tooltip(@referential) if action == :edit || action == :show || action == :update
end
- def organisation_breadcrumb (action = :edit)
+ def organisation_breadcrumb (action = :index)
add_breadcrumb I18n.t("breadcrumbs.referentials"), referentials_path
+ add_breadcrumb breadcrumb_label(@organisation), organisation_path,:title => breadcrumb_tooltip(@organisation) unless action == :index
end
def user_breadcrumb (action)
organisation_breadcrumb
add_breadcrumb I18n.t("breadcrumbs.users"), organisation_path unless action == :index
- add_breadcrumb breadcrumb_label(@user), organisation_user_path(@user),:title => breadcrumb_tooltip(@user) unless action == :index
+ add_breadcrumb breadcrumb_label(@user), organisation_user_path(@user),:title => breadcrumb_tooltip(@user) if action == :edit
end
def breadcrumb_label(obj)
diff --git a/app/views/devise/registrations/new.html.erb b/app/views/devise/registrations/new.html.erb
index f699ae6f9..d18db9402 100644
--- a/app/views/devise/registrations/new.html.erb
+++ b/app/views/devise/registrations/new.html.erb
@@ -2,6 +2,9 @@
<%= semantic_form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |form| %>
<%= form.inputs do %>
+ <% if resource.respond_to?( :name) %>
+ <%= form.input :name %>
+ <% end %>
<%= form.input :email %>
<%= form.input :password, :as => :password %>
<%= form.input :password_confirmation, :as => :password %>
diff --git a/app/views/users/edit.html.erb b/app/views/users/edit.html.erb
index 38a9ff78b..89d01b648 100644
--- a/app/views/users/edit.html.erb
+++ b/app/views/users/edit.html.erb
@@ -1,4 +1,3 @@
<%= title_tag t('.title', :user => @user.email) %>
-<p>iouoiu</p>
<%= render "form" %>