Moved to use realnames.
This commit is contained in:
parent
773392d6b3
commit
9c5ab1897b
4 changed files with 18 additions and 6 deletions
|
@ -601,8 +601,20 @@ class App.Controller extends Spine.Controller
|
|||
# users
|
||||
if params.type == 'User'
|
||||
for user of params.data
|
||||
|
||||
# set image url
|
||||
if params.data[user] && !params.data[user]['image']
|
||||
params.data[user]['image'] = 'http://placehold.it/48x48'
|
||||
|
||||
# set realname
|
||||
params.data[user]['realname'] = ''
|
||||
if params.data[user]['firstname']
|
||||
params.data[user]['realname'] = params.data[user]['firstname']
|
||||
if params.data[user]['lastname']
|
||||
if params.data[user]['realname'] isnt ''
|
||||
params.data[user]['realname'] = params.data[user]['realname'] + ' '
|
||||
params.data[user]['realname'] = params.data[user]['realname'] + params.data[user]['lastname']
|
||||
|
||||
App.User.refresh( params.data[user], options: { clear: true } )
|
||||
|
||||
# tickets
|
||||
|
@ -671,7 +683,6 @@ class App.Controller extends Spine.Controller
|
|||
for object in params.data
|
||||
App[params.type].refresh( object, options: { clear: true } )
|
||||
|
||||
|
||||
class App.ControllerModal extends App.Controller
|
||||
className: 'modal hide fade',
|
||||
tag: 'div',
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<b>State:</b> <%= ticket.ticket_state.name %>
|
||||
<b>Priority:</b> <%= ticket.ticket_priority.name %>
|
||||
<b>Group:</b> <%= ticket.group.name %>
|
||||
<b>Owner:</b> <%= ticket.owner.firstname + ' ' + ticket.owner.lastname %>
|
||||
<b>Owner:</b> <%= ticket.owner.realname %>
|
||||
</div>
|
||||
</div>
|
||||
<hr/>
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
<div class="row">
|
||||
<div class="span3">
|
||||
<h2><%= @head %></h2>
|
||||
<ul>
|
||||
<dl>
|
||||
<% for item in @items: %>
|
||||
<li><span class="user-data" data-id="<%= item.created_by_id %>">"<%= item.created_by.firstname %> <%= item.created_by.lastname %>"</span> <%= item.history_type.name %> <span data-id="<%= item.o_id %>"><a data-type="edit" href="#"><%= item.history_object.name %> (<%= item.ticket.title %>)</a></span>.</li>
|
||||
<dt><span class="user-data" data-id="<%= item.created_by_id %>">"<%= item.created_by.realname %>"</span></dt>
|
||||
<dd><%= item.history_type.name %> <span data-id="<%= item.o_id %>"><a data-type="edit" href="#"><%= item.history_object.name %> (<%= item.ticket.title %>)</a></span>.</dd>
|
||||
<% end %>
|
||||
</ul>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
|
@ -4,7 +4,7 @@
|
|||
<img class="thumbnail" src="<%- @user.image %>" alt="">
|
||||
<% end %>
|
||||
<div class="row">
|
||||
<div class="customer-info" title="Name"><%= @user['firstname'] %> <%= @user['lastname'] %></div>
|
||||
<div class="customer-info" title="Name"><%= @user['firstname'] %></div>
|
||||
</div>
|
||||
<% for row in @data: %>
|
||||
<% if @user[row.name]: %>
|
||||
|
|
Loading…
Reference in a new issue