From 8359cf4665d3b7586e52085ee80003a41c89d891 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Mon, 15 Oct 2012 07:54:50 +0200 Subject: [PATCH] Improved shown title. --- .../javascripts/app/views/generic/table.jst.eco | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/app/assets/javascripts/app/views/generic/table.jst.eco b/app/assets/javascripts/app/views/generic/table.jst.eco index dc39eddea..833aef43a 100644 --- a/app/assets/javascripts/app/views/generic/table.jst.eco +++ b/app/assets/javascripts/app/views/generic/table.jst.eco @@ -23,22 +23,23 @@ <% end %> <% for row in @overview: %> - <% displayName = '' %> <% if typeof object[row.name] is 'object': %> <% displayName = object[row.name].displayNameLong() %> <% else: %> <% displayName = object[row.name] %> <% end %> <% if row.translate: %><% displayName = T(displayName) %><% end %> - <% displayNameTitle = displayName %> - <% if row.title && object[row.title]: %> - <% if typeof object[row.title] is 'object': %> - <% displayNameTitle = object[row.title].displayNameLong() %> - <% else: %> - <% displayNameTitle = object[row.title] %> + <% if row.title: %> + <% displayNameTitle = displayName %> + <% if object[row.title]: %> + <% if typeof object[row.title] is 'object': %> + <% displayNameTitle = object[row.title].displayNameLong() %> + <% else: %> + <% displayNameTitle = object[row.title] %> + <% end %> <% end %> <% end %> - title="<%= displayNameTitle %>"<% end %>> + title="<%= displayNameTitle %>"<% end %>> <% if row.link: %><% else: %>class="<%= row.class %>"<% end %> <% if row.data && row.data.id: %>data-id="<%= object[row.name].id %>"<% end %>><% end %> <% if row.translate || row.callback: %><%- displayName %><% else: %><%= displayName %><% end %> <% if row.link: %><% else: %><% end %>