Fixed error with overwritten object name.

This commit is contained in:
Martin Edenhofer 2014-04-02 16:02:36 +02:00
parent 8f744e2856
commit b2f2839b97
2 changed files with 6 additions and 5 deletions

View file

@ -47,11 +47,12 @@ class App.DashboardActivityStream extends App.Controller
# convert backend name space to local name space
item.object = item.object.replace("::", '')
# lookup real data
if App[item.object]
object = App[item.object].find( item.o_id )
item.link = object.uiUrl()
item.title = object.displayName()
item.object = object.objectDisplayName()
object = App[item.object].find( item.o_id )
item.link = object.uiUrl()
item.title = object.displayName()
item.object_name = object.objectDisplayName()
item.created_by = App.User.find( item.created_by_id )

View file

@ -3,7 +3,7 @@
<dl>
<% for item in @items: %>
<dt><span class="user-popover" data-id="<%= item.created_by_id %>">"<%= item.created_by.displayName() %>"</span></dt>
<dd><%- @T( item.type ) %> <a href="<%- item.link %>"><%= item.object %><% if item.title: %> (<%= item.title %>)<% end %></a> <span class="humanTimeFromNow" data-time="<%- item.created_at %>">?</span> <%- @T('ago') %>.</dd>
<dd><%- @T( item.type ) %> <a href="<%- item.link %>"><%= item.object_name %><% if item.title: %> (<%= item.title %>)<% end %></a> <span class="humanTimeFromNow" data-time="<%- item.created_at %>">?</span> <%- @T('ago') %>.</dd>
<% end %>
</dl>
</div>