Use object type or friendly_link_name as browser title.
[arvados.git] / apps / workbench / app / views / application / show.html.erb
index e8a15f386c479f43ee94fa48e4e5548853517ab9..f3046990c1ff32c82d6ef4383ca45c78bb6ce52f 100644 (file)
@@ -1,9 +1,9 @@
-<% if @object.respond_to? :properties %>
-
 <% content_for :page_title do %>
-<%= @object.properties[:page_title] || @object.friendly_link_name %>
+<%= (@object.respond_to?(:properties) ? @object.properties[:page_title] : nil) ||
+    @object.friendly_link_name %>
 <% end %>
 
+<% if @object.respond_to? :properties %>
 <% if @object.properties[:page_content] %>
 <% content_for :page_content do %>
 <h1>