Improved search result list information.

This commit is contained in:
Martin Edenhofer 2012-11-14 07:12:23 +01:00
parent 82d4084080
commit 1092d0829c
2 changed files with 6 additions and 2 deletions

View file

@ -93,6 +93,10 @@ class App.Navigation extends App.Controller
for ticket_raw in data.tickets for ticket_raw in data.tickets
ticket = App.Collection.find( 'Ticket', ticket_raw.id ) ticket = App.Collection.find( 'Ticket', ticket_raw.id )
# set human time
ticket.humanTime = @humanTime(ticket.created_at)
@tickets.push ticket @tickets.push ticket
@render(user) @render(user)
) )
@ -131,7 +135,7 @@ class App.Navigation extends App.Controller
@term = @el.find('#global-search').val() @term = @el.find('#global-search').val()
return if !@term return if !@term
return if @term is search return if @term is search
@delay( searchFunction, 200, 'search' ) @delay( searchFunction, 220, 'search' )
) )
getItems: (data) -> getItems: (data) ->

View file

@ -29,7 +29,7 @@
</form> </form>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<% for ticket in @tickets: %> <% for ticket in @tickets: %>
<li><a href="#ticket/zoom/<%= ticket.id %>"><%= ticket.title %> - Ticket#<%= ticket.number %></a></li> <li><a href="#ticket/zoom/<%= ticket.id %>">Ticket <%= ticket.number %> - <%- ticket.humanTime %> - <%= @P( ticket.group) %><br><%= ticket.title %></a></li>
<% end %> <% end %>
</ul> </ul>
</li> </li>