aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/helpers/application_helper.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 356c7e69e..479b661c8 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -14,14 +14,17 @@ module ApplicationHelper
def page_header_title(object)
# Unwrap from decorator, we want to know the object model name
object = object.object if object.try(:object)
-
+
if Referential === object
return object.full_name
end
local = "#{object.model_name.name.underscore.pluralize}.#{params[:action]}.title"
+
+ arg = object.organisation.name if Workbench === object
+
if object.try(:name)
- t(local, name: object.name || object.id)
+ t(local, name: arg || object.name || object.id)
else
t(local)
end