Renamed widget view files.

This commit is contained in:
Martin Edenhofer 2013-09-18 10:17:38 +02:00
parent cf872b8b0f
commit 4b6cdfa727
14 changed files with 14 additions and 24 deletions

View file

@ -295,13 +295,13 @@ class App.Controller extends Spine.Controller
title: ->
ticket_id = $(@).data('id')
ticket = App.Ticket.retrieve( ticket_id )
ticket.title
App.i18n.escape( ticket.title )
content: ->
ticket_id = $(@).data('id')
ticket = App.Ticket.retrieve( ticket_id )
ticket.humanTime = ui.humanTime(ticket.created_at)
# insert data
App.view('ticket_info_small')(
App.view('popover/ticket')(
ticket: ticket,
)
)
@ -321,7 +321,7 @@ class App.Controller extends Spine.Controller
title: ->
user_id = $(@).data('id')
user = App.User.find( user_id )
user.displayName()
App.i18n.escape( user.displayName() )
content: ->
user_id = $(@).data('id')
user = App.User.find( user_id )
@ -346,7 +346,7 @@ class App.Controller extends Spine.Controller
data.push item
# insert data
App.view('user_info_small')(
App.view('popover/user')(
user: user,
data: data,
)
@ -367,12 +367,12 @@ class App.Controller extends Spine.Controller
title: ->
organization_id = $(@).data('id')
organization = App.Organization.find( organization_id )
organization.name
App.i18n.escape( organization.name )
content: ->
organization_id = $(@).data('id')
organization = App.Organization.find( organization_id )
# insert data
App.view('organization_info_small')(
App.view('popover/organization')(
organization: organization,
)
)
@ -417,7 +417,7 @@ class App.Controller extends Spine.Controller
ticket.humanTime = controller.humanTime(ticket.created_at)
# insert data
App.view('user_ticket_info_small')(
App.view('popover/user_ticket_list')(
tickets: data,
)
)

View file

@ -173,7 +173,7 @@ class App.ChatWidget extends App.Controller
shown = false
if @isShown
shown = true
@html App.view('chat_widget')(
@html App.view('widget/chat')(
messages: @messageLog
isShown: shown
)

View file

@ -44,7 +44,7 @@ class App.OrganizationWidget extends App.Controller
organizationData.push item
# insert userData
@html App.view('organization_widget')(
@html App.view('widget/organization')(
organization: organization
organizationData: organizationData
)

View file

@ -26,7 +26,7 @@ class App.TagWidget extends App.Controller
render: (tags) =>
# insert data
@html App.view('tag_widget')(
@html App.view('widget/tag')(
tags: tags || [],
tag_id: @attribute_id
)

View file

@ -45,7 +45,7 @@ class App.UserWidget extends App.ControllerDrox
# insert userData
@html @template(
file: 'user_widget'
file: 'widget/user'
header: 'Customer'
edit: true
params:

View file

@ -1,31 +1,24 @@
<% for row in @data: %>
<% if @user[row.name]: %>
<div class="row">
<div class="customer-info" title="<%- @Ti( row.display ) %>"><%- @L( @P( @user[row.name] ) ) %></div>
</div>
<% end %>
<% end %>
<% if @user['organization']: %>
<div class="row">
<div class="customer-info">
<strong><%- @T( 'Organization' ) %></strong><br/>
<%- @P( @user['organization'] ) %>
</div>
</div>
<% end %>
<% if !_.isEmpty(@user['accounts']): %>
<div class="row">
<div class="customer-info">
<strong><%- @T( 'Linked Accounts' ) %></strong><br/>
<% for account of @user['accounts']: %>
<a href="<%= @user['accounts'][account]['link'] %>" target="_blank"><%= account %></a>
<% end %>
</div>
</div>
<% end %>
<% if !_.isEmpty( @user['links'] ): %>
<% for link in @user['links']: %>
<div class="row">
<div class="customer-info">
<strong><%- @T( link['title'] ) %></strong><br/>
<% for item in link['items']: %>
@ -42,6 +35,5 @@
<% end %>
<% end %>
</div>
</div>
<% end %>
<% end %>

View file

@ -0,0 +1,3 @@
<% for ticket in @tickets: %>
<div class="customer-info"><a href="#ticket/zoom/<%= ticket.id %>" title="<%= ticket.title %>">T:<%= ticket.number %></a> <span title="<%= ticket.created_at_short %>"><%= ticket.humanTime %></span><br/><%= ticket.title %></div>
<% end %>

View file

@ -1,5 +0,0 @@
<% for ticket in @tickets: %>
<div class="row">
<div class="customer-info"><a href="#ticket/zoom/<%= ticket.id %>" title="<%= ticket.title %>">T:<%= ticket.number %></a> <span title="<%= ticket.created_at_short %>"><%= ticket.humanTime %></span><br/><%= ticket.title %></div>
</div>
<% end %>