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

View file

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

View file

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

View file

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

View file

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

View file

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