Moved to reworked template processing. Added organization to user model.
This commit is contained in:
parent
e9fec1aa4f
commit
8a76d83a3e
55 changed files with 353 additions and 281 deletions
|
@ -2,8 +2,8 @@ class App.Controller extends Spine.Controller
|
|||
|
||||
# add @title methode to set title
|
||||
title: (name) ->
|
||||
# $('html head title').html( Config.product_name + ' - ' + Ti(name) )
|
||||
document.title = Config.product_name + ' - ' + Ti(name)
|
||||
# $('html head title').html( Config.product_name + ' - ' + App.i18n.translateInline(name) )
|
||||
document.title = Config.product_name + ' - ' + App.i18n.translateInline(name)
|
||||
|
||||
# add @notify methode to create notification
|
||||
notify: (data) ->
|
||||
|
@ -217,32 +217,32 @@ class App.Controller extends Spine.Controller
|
|||
if diff >= 86400
|
||||
unit = Math.round( ( diff / 86400 ) )
|
||||
# if unit > 1
|
||||
# return unit + ' ' + T('days')
|
||||
# return unit + ' ' + App.i18n.translateContent('days')
|
||||
# else
|
||||
# return unit + ' ' + T('day')
|
||||
string = unit + ' ' + T('d')
|
||||
# return unit + ' ' + App.i18n.translateContent('day')
|
||||
string = unit + ' ' + App.i18n.translateInline('d')
|
||||
if diff >= 3600
|
||||
unit = Math.round( ( diff / 3600 ) % 24 )
|
||||
# if unit > 1
|
||||
# return unit + ' ' + T('hours')
|
||||
# return unit + ' ' + App.i18n.translateContent('hours')
|
||||
# else
|
||||
# return unit + ' ' + T('hour')
|
||||
# return unit + ' ' + App.i18n.translateContent('hour')
|
||||
if string isnt ''
|
||||
string = string + ' ' + unit + ' ' + T('h')
|
||||
string = string + ' ' + unit + ' ' + App.i18n.translateInline('h')
|
||||
return string
|
||||
else
|
||||
string = unit + ' ' + T('h')
|
||||
string = unit + ' ' + App.i18n.translateInline('h')
|
||||
if diff <= 86400
|
||||
unit = Math.round( ( diff / 60 ) % 60 )
|
||||
# if unit > 1
|
||||
# return unit + ' ' + T('minutes')
|
||||
# return unit + ' ' + App.i18n.translateContent('minutes')
|
||||
# else
|
||||
# return unit + ' ' + T('minute')
|
||||
# return unit + ' ' + App.i18n.translateContent('minute')
|
||||
if string isnt ''
|
||||
string = string + ' ' + unit + ' ' + T('m')
|
||||
string = string + ' ' + unit + ' ' + App.i18n.translateInline('m')
|
||||
return string
|
||||
else
|
||||
string = unit + ' ' + T('m')
|
||||
string = unit + ' ' + App.i18n.translateInline('m')
|
||||
return string
|
||||
|
||||
userInfo: (data) =>
|
||||
|
@ -254,7 +254,7 @@ class App.Controller extends Spine.Controller
|
|||
|
||||
authenticate: ->
|
||||
console.log 'authenticate', window.Session
|
||||
|
||||
|
||||
# return rtue if session exists
|
||||
return true if window.Session['id']
|
||||
|
||||
|
@ -275,7 +275,7 @@ class App.Controller extends Spine.Controller
|
|||
# console.log('rewrite frontendTimeUpdate', this)
|
||||
timestamp = $(this).data('time')
|
||||
time = ui.humanTime( timestamp )
|
||||
$(this).attr( 'title', Ts(timestamp) )
|
||||
$(this).attr( 'title', App.i18n.translateTimestamp(timestamp) )
|
||||
$(this).text( time )
|
||||
)
|
||||
@interval( update, 30000, 'frontendTimeUpdate' )
|
||||
|
@ -318,19 +318,29 @@ class App.Controller extends Spine.Controller
|
|||
title: ->
|
||||
user_id = $(@).data('id')
|
||||
user = App.Collection.find( 'User', user_id )
|
||||
user.realname
|
||||
user.displayName()
|
||||
content: ->
|
||||
user_id = $(@).data('id')
|
||||
user = App.Collection.find( 'User', user_id )
|
||||
|
||||
# get display data
|
||||
data = []
|
||||
for item in App.User.configure_attributes
|
||||
for item2 in App.User.configure_attributes
|
||||
item = _.clone( item2 )
|
||||
|
||||
# check if value for _id exists
|
||||
itemNameValue = item.name
|
||||
itemNameValueNew = itemNameValue.substr( 0, itemNameValue.length - 3 )
|
||||
if itemNameValueNew of user
|
||||
item.name = itemNameValueNew
|
||||
|
||||
# add to show if value exists
|
||||
if user[item.name]
|
||||
if item.name isnt 'firstname'
|
||||
if item.name isnt 'lastname'
|
||||
if item.info #&& ( @user[item.name] || item.name isnt 'note' )
|
||||
data.push item
|
||||
|
||||
# do not show firstname and lastname / already show via diplayName()
|
||||
if item.name isnt 'firstname' && item.name isnt 'lastname'
|
||||
if item.info #&& ( @user[item.name] || item.name isnt 'note' )
|
||||
data.push item
|
||||
|
||||
# insert data
|
||||
App.view('user_info_small')(
|
||||
|
|
|
@ -472,7 +472,7 @@ class App.ControllerForm extends App.Controller
|
|||
if item.displayName
|
||||
name_new = item.displayName()
|
||||
if attribute.translate
|
||||
name_new = Ti(name_new)
|
||||
name_new = App.i18n.translateInline(name_new)
|
||||
attribute.options.push {
|
||||
name: name_new,
|
||||
value: item.id,
|
||||
|
|
|
@ -42,14 +42,20 @@ class App.ControllerGenericNew extends App.ControllerModal
|
|||
@formDisable(e)
|
||||
|
||||
# save object
|
||||
ui = @
|
||||
object.save(
|
||||
success: =>
|
||||
if @callback
|
||||
@callback(@item)
|
||||
@modalHide()
|
||||
success: ->
|
||||
|
||||
# force to reload object
|
||||
callbackReload = (user) ->
|
||||
if ui.callback
|
||||
ui.callback( user )
|
||||
ui.modalHide()
|
||||
App.Collection.find( ui.pageData.object, @id, callbackReload , true )
|
||||
|
||||
error: =>
|
||||
@log 'errors'
|
||||
@modalHide()
|
||||
ui.log 'errors'
|
||||
ui.modalHide()
|
||||
)
|
||||
|
||||
class App.ControllerGenericEdit extends App.ControllerModal
|
||||
|
@ -98,14 +104,20 @@ class App.ControllerGenericEdit extends App.ControllerModal
|
|||
@formDisable(e)
|
||||
|
||||
# save object
|
||||
ui = @
|
||||
@item.save(
|
||||
success: =>
|
||||
if @callback
|
||||
@callback(@item)
|
||||
@modalHide()
|
||||
success: ->
|
||||
|
||||
# force to reload object
|
||||
callbackReload = (user) ->
|
||||
if ui.callback
|
||||
ui.callback( user )
|
||||
ui.modalHide()
|
||||
App.Collection.find( ui.pageData.object, @id, callbackReload , true )
|
||||
|
||||
error: =>
|
||||
@log 'errors'
|
||||
@modalHide()
|
||||
ui.log 'errors'
|
||||
ui.modalHide()
|
||||
)
|
||||
|
||||
class App.ControllerGenericIndex extends App.Controller
|
||||
|
|
|
@ -67,7 +67,7 @@ class App.ChannelEmailFilter extends App.Controller
|
|||
)
|
||||
|
||||
html.append( table )
|
||||
html.append( '<a data-type="new" class="btn">' + T('New') + '</a>' )
|
||||
html.append( '<a data-type="new" class="btn">' + App.i18n.translateContent('New') + '</a>' )
|
||||
@html html
|
||||
|
||||
new: (e) =>
|
||||
|
@ -160,7 +160,7 @@ class App.ChannelEmailAddress extends App.Controller
|
|||
)
|
||||
|
||||
html.append( table )
|
||||
html.append( '<a data-type="new" class="btn">' + T('New') + '</a>' )
|
||||
html.append( '<a data-type="new" class="btn">' + App.i18n.translateContent('New') + '</a>' )
|
||||
@html html
|
||||
|
||||
new: (e) =>
|
||||
|
@ -251,7 +251,7 @@ class App.ChannelEmailSignature extends App.Controller
|
|||
)
|
||||
|
||||
html.append( table )
|
||||
html.append( '<a data-type="new" class="btn">' + T('New') + '</a>' )
|
||||
html.append( '<a data-type="new" class="btn">' + App.i18n.translateContent('New') + '</a>' )
|
||||
@html html
|
||||
|
||||
new: (e) =>
|
||||
|
@ -351,7 +351,7 @@ class App.ChannelEmailInbound extends App.Controller
|
|||
)
|
||||
|
||||
html.append( table )
|
||||
html.append( '<a data-type="new" class="btn">' + T('New') + '</a>' )
|
||||
html.append( '<a data-type="new" class="btn">' + App.i18n.translateContent('New') + '</a>' )
|
||||
@html html
|
||||
|
||||
new: (e) =>
|
||||
|
|
|
@ -202,8 +202,8 @@ class Index extends App.Controller
|
|||
# notify UI
|
||||
ui.notify
|
||||
type: 'success',
|
||||
msg: T('Ticket %s created!', @.number),
|
||||
link: "#ticket/zoom/#{@.id}"
|
||||
msg: App.i18n.translateContent( 'Ticket %s created!', @number ),
|
||||
link: "#ticket/zoom/#{@id}"
|
||||
timeout: 12000,
|
||||
|
||||
# create new create screen
|
||||
|
@ -263,13 +263,18 @@ class UserNew extends App.ControllerModal
|
|||
ui = @
|
||||
user.save(
|
||||
success: ->
|
||||
realname = @displayName()
|
||||
$('#create_customer_id').val( @id )
|
||||
$('#create_customer_id_autocompletion').val( realname )
|
||||
|
||||
# start customer info controller
|
||||
ui.userInfo( user_id: @id )
|
||||
ui.modalHide()
|
||||
|
||||
# force to reload object
|
||||
callbackReload = (user) ->
|
||||
realname = user.displayName()
|
||||
$('#create_customer_id').val( user.id )
|
||||
$('#create_customer_id_autocompletion').val( realname )
|
||||
|
||||
# start customer info controller
|
||||
ui.userInfo( user_id: user.id )
|
||||
ui.modalHide()
|
||||
App.Collection.find( 'User', @id, callbackReload , true )
|
||||
|
||||
error: ->
|
||||
ui.modalHide()
|
||||
)
|
||||
|
|
|
@ -39,7 +39,7 @@ class App.TicketMerge extends App.ControllerModal
|
|||
# notify UI
|
||||
@notify
|
||||
type: 'success',
|
||||
msg: T( 'Ticket %s merged!', data.slave_ticket['number'] ),
|
||||
msg: App.i18n.translateContent( 'Ticket %s merged!', data.slave_ticket['number'] ),
|
||||
timeout: 6000,
|
||||
|
||||
else
|
||||
|
@ -47,7 +47,7 @@ class App.TicketMerge extends App.ControllerModal
|
|||
# notify UI
|
||||
@notify
|
||||
type: 'error',
|
||||
msg: T( data['message'] ),
|
||||
msg: App.i18n.translateContent( data['message'] ),
|
||||
timeout: 6000,
|
||||
# error: =>
|
||||
)
|
||||
|
|
|
@ -423,7 +423,7 @@ class Article extends App.Controller
|
|||
article_lines.splice( preview + 1, 0, '----SEEMORE----' )
|
||||
@article['html'] = article_lines.join("\n")
|
||||
@article['html'] = window.linkify( @article['html'] )
|
||||
notify = '<a href="#" class="show_toogle">' + T('See more') + '</a>'
|
||||
notify = '<a href="#" class="show_toogle">' + App.i18n.translateContent('See more') + '</a>'
|
||||
|
||||
# preview mode
|
||||
if preview_mode
|
||||
|
|
|
@ -98,7 +98,7 @@ class Index extends App.Controller
|
|||
Spine.trigger 'notify:removeall'
|
||||
Spine.trigger 'notify', {
|
||||
type: 'success',
|
||||
msg: T('Login successfully! Have a nice day!'),
|
||||
msg: App.i18n.translateContent('Login successfully! Have a nice day!'),
|
||||
}
|
||||
|
||||
# redirect to #
|
||||
|
@ -117,7 +117,7 @@ class Index extends App.Controller
|
|||
Spine.trigger 'notify:removeall'
|
||||
Spine.trigger 'notify', {
|
||||
type: 'error',
|
||||
msg: T('Wrong Username and Password combination.'),
|
||||
msg: App.i18n.translateContent('Wrong Username and Password combination.'),
|
||||
}
|
||||
|
||||
# rerender login page
|
||||
|
|
|
@ -13,10 +13,22 @@ class App.UserInfo extends App.Controller
|
|||
|
||||
# get display data
|
||||
data = []
|
||||
for item in App.User.configure_attributes
|
||||
if item.name isnt 'firstname' && item.name isnt 'lastname'
|
||||
if item.info
|
||||
data.push item
|
||||
for item2 in App.User.configure_attributes
|
||||
item = _.clone( item2 )
|
||||
|
||||
# check if value for _id exists
|
||||
itemNameValue = item.name
|
||||
itemNameValueNew = itemNameValue.substr( 0, itemNameValue.length - 3 )
|
||||
if itemNameValueNew of user
|
||||
item.name = itemNameValueNew
|
||||
|
||||
# add to show if value exists
|
||||
if user[item.name]
|
||||
|
||||
# do not show firstname and lastname / already show via diplayName()
|
||||
if item.name isnt 'firstname' && item.name isnt 'lastname'
|
||||
if item.info
|
||||
data.push item
|
||||
|
||||
# insert data
|
||||
@html App.view('user_info')(
|
||||
|
|
|
@ -36,6 +36,34 @@
|
|||
|
||||
class App extends Spine.Controller
|
||||
@view: (name) ->
|
||||
JST["app/views/#{name}"]
|
||||
template = ( params = {} ) =>
|
||||
|
||||
# define print name helper
|
||||
params.P = ( item ) ->
|
||||
if typeof item is 'object'
|
||||
if item.displayNameLong
|
||||
item.displayNameLong()
|
||||
else if item.displayName
|
||||
item.displayName()
|
||||
else
|
||||
item.name
|
||||
else
|
||||
item
|
||||
|
||||
# define translation helper
|
||||
params.T = ( item ) ->
|
||||
App.i18n.translateContent( item )
|
||||
|
||||
# define translation inline helper
|
||||
params.Ti = ( item ) ->
|
||||
App.i18n.translateInline( item )
|
||||
|
||||
# define linkify helper
|
||||
params.L = ( item ) ->
|
||||
window.linkify( item )
|
||||
|
||||
# define template
|
||||
JST["app/views/#{name}"](params)
|
||||
template
|
||||
|
||||
window.App = App
|
|
@ -9,10 +9,10 @@ class App.Collection
|
|||
_instance ?= new _Singleton
|
||||
_instance.load( args )
|
||||
|
||||
@find: ( type, id, callback ) ->
|
||||
@find: ( type, id, callback, force ) ->
|
||||
if _instance == undefined
|
||||
_instance ?= new _Singleton
|
||||
_instance.find( type, id, callback )
|
||||
_instance.find( type, id, callback, force )
|
||||
|
||||
@get: ( args ) ->
|
||||
if _instance == undefined
|
||||
|
@ -99,17 +99,20 @@ class _Singleton
|
|||
if !localStorage
|
||||
App.Store.write( 'collection::' + params.type + '::' + object.id, { type: params.type, localStorage: true, data: [ object ] } )
|
||||
|
||||
find: ( type, id, callback ) ->
|
||||
find: ( type, id, callback, force ) ->
|
||||
|
||||
# console.log( 'find', type, id )
|
||||
# console.log( 'find', type, id, force )
|
||||
# if App[type].exists( id ) && !callback
|
||||
if App[type].exists( id )
|
||||
if !force && App[type].exists( id )
|
||||
# console.log( 'find exists', type, id )
|
||||
data = App[type].find( id )
|
||||
if callback
|
||||
callback( data )
|
||||
else
|
||||
console.log( 'find not loaded!', type, id )
|
||||
if force
|
||||
console.log( 'find forced to load!', type, id )
|
||||
else
|
||||
console.log( 'find not loaded!', type, id )
|
||||
if callback
|
||||
App[type].bind 'refresh', ->
|
||||
console.log 'loaded..' + type + '..', id
|
||||
|
@ -136,15 +139,6 @@ class _Singleton
|
|||
if data && !data['image']
|
||||
data['image'] = 'http://placehold.it/48x48'
|
||||
|
||||
# set realname
|
||||
data['realname'] = ''
|
||||
if data['firstname']
|
||||
data['realname'] = data['firstname']
|
||||
if data['lastname']
|
||||
if data['realname'] isnt ''
|
||||
data['realname'] = data['realname'] + ' '
|
||||
data['realname'] = data['realname'] + data['lastname']
|
||||
|
||||
return data
|
||||
|
||||
# tickets
|
||||
|
|
|
@ -1,18 +1,32 @@
|
|||
$ = jQuery.sub()
|
||||
|
||||
# create dumy function till i18n is loaded
|
||||
window.T = (text) ->
|
||||
return text
|
||||
|
||||
class App.i18n
|
||||
_instance = undefined
|
||||
|
||||
@init: ->
|
||||
_instance ?= new _Singleton
|
||||
|
||||
@translateContent: ( string, args... ) ->
|
||||
if _instance == undefined
|
||||
_instance ?= new _Singleton
|
||||
_instance.translate_content( string, args )
|
||||
|
||||
@translateInline: ( string, args... ) ->
|
||||
if _instance == undefined
|
||||
_instance ?= new _Singleton
|
||||
_instance.translate_inline( string, args )
|
||||
|
||||
@translateTimestamp: ( args ) ->
|
||||
if _instance == undefined
|
||||
_instance ?= new _Singleton
|
||||
_instance.timestamp( args )
|
||||
|
||||
class _Singleton
|
||||
|
||||
constructor: ->
|
||||
@locale = 'de'
|
||||
@timestampFormat = 'yyyy-mm-dd HH:MM'
|
||||
@set( @locale )
|
||||
window.T = @translate_content
|
||||
window.Ti = @translate_inline
|
||||
window.Ts = @timestamp
|
||||
|
||||
# $('.translation [contenteditable]')
|
||||
$('body')
|
||||
|
@ -60,7 +74,7 @@ class App.i18n
|
|||
|
||||
return $this
|
||||
|
||||
set: (locale) ->
|
||||
set: ( locale ) ->
|
||||
@map = {}
|
||||
App.Com.ajax(
|
||||
id: 'i18n-set-' + locale,
|
||||
|
@ -86,11 +100,11 @@ class App.i18n
|
|||
console.log 'error', error, statusText, xhr.statusCode
|
||||
)
|
||||
|
||||
translate_inline: (string, args...) =>
|
||||
@translate(string, args...)
|
||||
translate_inline: ( string, args... ) =>
|
||||
@translate( string, args... )
|
||||
|
||||
translate_content: (string, args...) =>
|
||||
translated = @translate(string, args...)
|
||||
translate_content: ( string, args... ) =>
|
||||
translated = @translate( string, args... )
|
||||
# replace = '<span class="translation" contenteditable="true" data-text="' + @escape(string) + '">' + translated + '<span class="icon-edit"></span>'
|
||||
if window.Config['Translation']
|
||||
replace = '<span class="translation" contenteditable="true" data-text="' + @escape(string) + '">' + translated + ''
|
||||
|
@ -100,7 +114,7 @@ class App.i18n
|
|||
else
|
||||
translated
|
||||
|
||||
translate: (string, args...) =>
|
||||
translate: ( string, args... ) =>
|
||||
|
||||
# return '' on undefined
|
||||
return '' if string is undefined
|
||||
|
@ -112,7 +126,7 @@ class App.i18n
|
|||
else
|
||||
@_translated = false
|
||||
translated = string
|
||||
|
||||
|
||||
# search %s
|
||||
for arg in args
|
||||
translated = translated.replace(/%s/, arg)
|
||||
|
@ -123,15 +137,15 @@ class App.i18n
|
|||
# return translated string
|
||||
return translated
|
||||
|
||||
escape: (string) ->
|
||||
string = ('' + string)
|
||||
escape: ( string ) ->
|
||||
string = ( '' + string )
|
||||
.replace(/&/g, '&')
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>')
|
||||
.replace(/\x22/g, '"')
|
||||
|
||||
timestamp: (time) =>
|
||||
s = (num, digits) ->
|
||||
timestamp: ( time ) =>
|
||||
s = ( num, digits ) ->
|
||||
while num.toString().length < digits
|
||||
num = "0" + num
|
||||
return num
|
||||
|
|
|
@ -12,7 +12,7 @@ class App.Run extends App.Controller
|
|||
App.WebSocket.connect()
|
||||
|
||||
# init of i18n
|
||||
new App.i18n
|
||||
App.i18n.init()
|
||||
|
||||
# start navigation controller
|
||||
new App.Navigation( el: @el.find('#navigation') )
|
||||
|
|
|
@ -21,8 +21,13 @@ class App.Model extends Spine.Model
|
|||
if name
|
||||
name = name + ' '
|
||||
name = name + @lastname
|
||||
if @note
|
||||
name = "#{name} (#{@note})"
|
||||
if @organization
|
||||
if typeof @organization is 'object'
|
||||
name = "#{name} (#{@organization.name})"
|
||||
else
|
||||
name = "#{name} (#{@organization})"
|
||||
else if @department
|
||||
name = "#{name} (#{@department})"
|
||||
return name
|
||||
return '???'
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
class App.User extends App.Model
|
||||
@configure 'User', 'login', 'firstname', 'lastname', 'email', 'web', 'password', 'phone', 'fax', 'mobile', 'street', 'zip', 'city', 'country', 'organization_id', 'note', 'role_ids', 'group_ids', 'active', 'invite'
|
||||
@configure 'User', 'login', 'firstname', 'lastname', 'email', 'web', 'password', 'phone', 'fax', 'mobile', 'street', 'zip', 'city', 'country', 'organization_id', 'department', 'note', 'role_ids', 'group_ids', 'active', 'invite'
|
||||
@extend Spine.Model.Ajax
|
||||
@url: '/api/users'
|
||||
|
||||
|
@ -13,11 +13,12 @@ class App.User extends App.Model
|
|||
{ name: 'phone', display: 'Phone', tag: 'input', type: 'phone', limit: 100, null: true, class: 'span4', signup: false, quick: true, info: true },
|
||||
{ name: 'mobile', display: 'Mobile', tag: 'input', type: 'phone', limit: 100, null: true, class: 'span4', signup: false, quick: true, info: true },
|
||||
{ name: 'fax', display: 'Fax', tag: 'input', type: 'phone', limit: 100, null: true, class: 'span4', signup: false, quick: true, info: true },
|
||||
{ name: 'organization_id', display: 'Organization', tag: 'select', multiple: false, nulloption: true, null: true, relation: 'Organization', class: 'span4', signup: false, quick: true, info: true },
|
||||
{ name: 'department', display: 'Department', tag: 'input', type: 'text', limit: 200, null: true, class: 'span4', signup: false, quick: true, info: true },
|
||||
{ name: 'street', display: 'Street', tag: 'input', type: 'text', limit: 100, null: true, class: 'span4', signup: false, quick: true, info: true },
|
||||
{ name: 'zip', display: 'Zip', tag: 'input', type: 'text', limit: 100, null: true, class: 'span4', signup: false, quick: true, info: true },
|
||||
{ name: 'city', display: 'City', tag: 'input', type: 'text', limit: 100, null: true, class: 'span4', signup: false, quick: true, info: true },
|
||||
{ name: 'password', display: 'Password', tag: 'input', type: 'password', limit: 50, null: true, autocomplete: 'off', class: 'span4', signup: true, quick: false, },
|
||||
{ name: 'organization_id', display: 'Organization', tag: 'select', multiple: false, nulloption: true, null: true, relation: 'Organization', class: 'span4' },
|
||||
{ name: 'note', display: 'Note', tag: 'textarea', note: 'Notes are visible to agents only, never to customers.', limit: 250, null: true, class: 'span4', quick: true, info: true },
|
||||
{ name: 'role_ids', display: 'Roles', tag: 'checkbox', multiple: true, null: false, relation: 'Role', class: 'span4' },
|
||||
{ name: 'group_ids', display: 'Groups', tag: 'checkbox', multiple: true, null: true, relation: 'Group', class: 'span4', invite_agent: true },
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="page-header">
|
||||
<h1><%- T('New Ticket') %> <small></small></h1>
|
||||
<h1><%- @T( 'New Ticket' ) %> <small></small></h1>
|
||||
</div>
|
||||
<form class="form-horizontal">
|
||||
<div class="row">
|
||||
|
@ -14,6 +14,6 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<button type="reset" class="btn cancel"><%- T('Cancel') %></button> <button type="submit" class="btn btn-primary submit"><%- T('Create') %></button>
|
||||
<button type="reset" class="btn cancel"><%- @T( 'Cancel' ) %></button> <button type="submit" class="btn btn-primary submit"><%- @T( 'Create' ) %></button>
|
||||
</div>
|
||||
</form>
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<form class="form-horizontal">
|
||||
<div class="modal-header">
|
||||
<a href="#" class="close">×</a>
|
||||
<h3><%- T('Change Customer') %></h3>
|
||||
<h3><%- @T( 'Change Customer' ) %></h3>
|
||||
</div>
|
||||
<div class="modal-body" id="form-customer"></div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" class="btn btn-primary"><%- T('Submit') %></button>
|
||||
<button type="submit" class="btn btn-primary"><%- @T( 'Submit' ) %></button>
|
||||
</div>
|
||||
</form>
|
|
@ -1,6 +1,6 @@
|
|||
<div class="modal-header">
|
||||
<a href="#" class="close">×</a>
|
||||
<h3><%- T('History') %></h3>
|
||||
<h3><%- @T( 'History' ) %></h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
|
@ -18,15 +18,15 @@
|
|||
<% open = true %>
|
||||
<% last_user = object['created_by_id'] %>
|
||||
<% lasttime = object['created_at'] %>
|
||||
<span class="user-data" data-id="<%= object['created_by']['id'] %>"><%= object['created_by']['realname'] %></span> -
|
||||
<span class="humanTimeFromNow" data-time="<%- object['created_at'] %>">?</span>
|
||||
<span class="user-data" data-id="<%= object.created_by.id %>"><%= object.created_by.displayName() %></span> -
|
||||
<span class="humanTimeFromNow" data-time="<%- object.created_at %>">?</span>
|
||||
<ul>
|
||||
<% end %>
|
||||
<li>
|
||||
<% if ( object['history_type'] is 'notification' || object['history_type'] is 'email' ): %>
|
||||
<%= object['history_type'] %>
|
||||
<% if object['value_from']: %>
|
||||
"<%= object['value_from'] %>" <%- T('sent to') %>
|
||||
"<%= object['value_from'] %>" <%- @T( 'sent to' ) %>
|
||||
<% end %>
|
||||
<% if object['value_to']: %>
|
||||
"<%= object['value_to'] %>"
|
||||
|
@ -34,10 +34,10 @@
|
|||
<% else: %>
|
||||
<%= object['history_type'] %> <%= object['history_object_display'] %> <% if object['history_attribute']: %>"<%= object['history_attribute'] %>"<% end %>
|
||||
<% if object['value_from']: %>
|
||||
<%- T('from') %> "<%= object['value_from'] %>"
|
||||
<%- @T( 'from' ) %> "<%= object['value_from'] %>"
|
||||
<% end %>
|
||||
<% if object['value_to']: %>
|
||||
<%- T('to') %> "<%= object['value_to'] %>"
|
||||
<%- @T( 'to' ) %> "<%= object['value_to'] %>"
|
||||
<% end %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<form class="form-horizontal">
|
||||
<div class="modal-header">
|
||||
<a href="#" class="close">×</a>
|
||||
<h3><%- T('Merge') %></h3>
|
||||
<h3><%- @T( 'Merge' ) %></h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="table_history"></div>
|
||||
<%- T('Merge to Ticket#') %>:
|
||||
<%- @T( 'Merge to Ticket#' ) %>:
|
||||
<input type="text" name="master_ticket_number" value=""/>
|
||||
<!--
|
||||
<ul>
|
||||
|
@ -16,6 +16,6 @@
|
|||
-->
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" class="btn btn-primary"><%- T('Submit') %></button>
|
||||
<button type="submit" class="btn btn-primary"><%- @T( 'Submit' ) %></button>
|
||||
</div>
|
||||
</form>
|
|
@ -1,7 +1,7 @@
|
|||
<div class="page-header">
|
||||
<div class="row">
|
||||
<div class="span9">
|
||||
<h1><%- T(@overview.meta.name) %> <% if @edit: %><small><a href="#" data-type="settings" class="icon-edit"></a></small><% end %></h1>
|
||||
<h1><%- @T( @overview.meta.name ) %> <% if @edit: %><small><a href="#" data-type="settings" class="icon-edit"></a></small><% end %></h1>
|
||||
</div>
|
||||
<div class="span3">
|
||||
<div class="pagination keepright">
|
||||
|
|
|
@ -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.realname %>
|
||||
<b>Owner:</b> <%= ticket.owner.displayName() %>
|
||||
</div>
|
||||
</div>
|
||||
<hr/>
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
<span class="count"><%= Config['LastOverviewPosition'] %>/<%= Config['LastOverviewTotal'] %></span>
|
||||
<% base_url ="#ticket_view/#{Config['LastOverview']}/#{Config['LastOverviewPosition']}/" %>
|
||||
<ul>
|
||||
<li class="<% if Config['LastOverviewPosition'] <= 1: %>disabled<% end %>"><a href="<%- base_url %>previous" title="<%- T('previous Ticket in Overview') %>">«</a></li>
|
||||
<li class="<% if Config['LastOverviewPosition'] is Config['LastOverviewTotal']: %>disabled<% end %>"><a href="<%- base_url %>next" title="<%- T('next Ticket in Overview') %>">»</a></li>
|
||||
<li class="<% if Config['LastOverviewPosition'] <= 1: %>disabled<% end %>"><a href="<%- base_url %>previous" title="<%- @Ti( 'previous Ticket in Overview' ) %>">«</a></li>
|
||||
<li class="<% if Config['LastOverviewPosition'] is Config['LastOverviewTotal']: %>disabled<% end %>"><a href="<%- base_url %>next" title="<%- @Ti( 'next Ticket in Overview' ) %>">»</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
|
@ -19,8 +19,8 @@
|
|||
<div class="row">
|
||||
<div class="span12">
|
||||
<%= @ticket.group.name %> -
|
||||
<%- T(@ticket.ticket_state.name) %> -
|
||||
<%- T(@ticket.ticket_priority.name) %> -
|
||||
<%- @T( @ticket.ticket_state.name ) %> -
|
||||
<%- @T( @ticket.ticket_priority.name ) %> -
|
||||
<span class="humanTimeFromNow" data-time="<%- @ticket.created_at %>">?</span>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -34,31 +34,31 @@
|
|||
<div class="avatar span1 thumbnails">
|
||||
<img class="thumbnail user-data" data-id="<%= article.created_by_id %>" src="<%= article.created_by.image %>" alt="">
|
||||
<ul>
|
||||
<li style="font-size: 10px;"><%- T(article.article_type.name) %></li>
|
||||
<% if article.article_type.name is 'email': %><li style="font-size: 10px;"><a href="/api/ticket_article_plain/<%= article.id %>"><%- T('raw') %></a></li><% end %>
|
||||
<li style="font-size: 10px;"><%- @T(article.article_type.name) %></li>
|
||||
<% if article.article_type.name is 'email': %><li style="font-size: 10px;"><a href="/api/ticket_article_plain/<%= article.id %>"><%- @T( 'raw' ) %></a></li><% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="span8 well-muted article-message <% if article.internal is true: %> internal<% end %>">
|
||||
<% if article.from: %>
|
||||
<div>
|
||||
<strong title="<%- Ti('From') %>: <%= article.from %>"><%= article.from %></strong>
|
||||
<strong title="<%- @Ti( 'From' ) %>: <%= article.from %>"><%= article.from %></strong>
|
||||
<% if article.actions: %>
|
||||
<% for action in article.actions: %>
|
||||
-
|
||||
<a href="<%= action.href %>" data-type="<%= action.type %>" class="<% if action.class: %><%= action.class %><% end %>"><%= T(action.name) %></a>
|
||||
<a href="<%= action.href %>" data-type="<%= action.type %>" class="<% if action.class: %><%= action.class %><% end %>"><%- @T( action.name ) %></a>
|
||||
<% end %>
|
||||
<% end %>
|
||||
- <span class="humanTimeFromNow" data-time="<%- article.created_at %>">?</span>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if article.to: %>
|
||||
<div title="<%- Ti('To') %>: <%= article.to %>"><%= article.to %></div>
|
||||
<div title="<%- @Ti( 'To' ) %>: <%= article.to %>"><%= article.to %></div>
|
||||
<% end %>
|
||||
<% if article.cc: %>
|
||||
<div title="<%- Ti('Cc') %>: <%= article.cc %>"><%= article.cc %></div>
|
||||
<div title="<%- @Ti( 'Cc' ) %>: <%= article.cc %>"><%= article.cc %></div>
|
||||
<% end %>
|
||||
<% if article.subject: %>
|
||||
<div title="<%- Ti('Subject') %>: <%= article.subject %>"><%= article.subject %></div>
|
||||
<div title="<%- @Ti( 'Subject' ) %>: <%= article.subject %>"><%= article.subject %></div>
|
||||
<% end %>
|
||||
<% if article.attachments: %>
|
||||
<div>
|
||||
|
@ -83,7 +83,7 @@
|
|||
<div id="form-article-update"></div>
|
||||
<div class="keepleft" id="file-uploader"></div>
|
||||
|
||||
<button type="submit" class="btn btn-primary submit"><%- T('Submit') %></button>
|
||||
<button type="submit" class="btn btn-primary submit"><%- @T( 'Submit' ) %></button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<form class="form-horizontal">
|
||||
<div class="modal-header">
|
||||
<a href="#" class="close">×</a>
|
||||
<h3><%- T(@head) %></h3>
|
||||
<h3><%- @T( @head ) %></h3>
|
||||
</div>
|
||||
<div class="modal-body" id="form-user"></div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-primary submit"><%- T('Submit') %></button>
|
||||
<button class="btn secondary cancel"><%- T('Cancel') %></button>
|
||||
<button class="btn btn-primary submit"><%- @T( 'Submit' ) %></button>
|
||||
<button class="btn secondary cancel"><%- @T( 'Cancel' ) %></button>
|
||||
</div>
|
||||
</form>
|
|
@ -1,5 +1,5 @@
|
|||
<form class="form-horizontal" id="mail_adapter">
|
||||
<div id="form-email-adapter"></div>
|
||||
<div id="form-email-adapter-settings"></div>
|
||||
<button data-type="" type="submit" class="btn"><%- T('Submit') %></botton>
|
||||
<button data-type="" type="submit" class="btn"><%- @T( 'Submit' ) %></botton>
|
||||
</form>
|
|
@ -1,5 +1,5 @@
|
|||
<div class="page-header">
|
||||
<h1><%- T(@head) %> <small><a href="#" data-type="settings" class="icon-edit"></a></small></h1>
|
||||
<h1><%- @T( @head ) %> <small><a href="#" data-type="settings" class="icon-edit"></a></small></h1>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<div class="row">
|
||||
<div class="span3">
|
||||
<h2><%- T(@head) %></h2>
|
||||
<h2><%- @T( @head ) %></h2>
|
||||
<dl>
|
||||
<% for item in @items: %>
|
||||
<dt><span class="user-data" data-id="<%= item.created_by_id %>">"<%= item.created_by.realname %>"</span></dt>
|
||||
<dd><%- T(item.history_type) %> <span data-id="<%= item.o_id %>" data-subid="<%= item.sub_o_id %>"><a data-type="edit" href="#"><%= item.history_object %><% if item.data.title: %> (<%= item.data.title %>)<% end %></a></span>.</dd>
|
||||
<dt><span class="user-data" data-id="<%= item.created_by_id %>">"<%= item.created_by.displayName() %>"</span></dt>
|
||||
<dd><%- @T( item.history_type ) %> <span data-id="<%= item.o_id %>" data-subid="<%= item.sub_o_id %>"><a data-type="edit" href="#"><%= item.history_object %><% if item.data.title: %> (<%= item.data.title %>)<% end %></a></span>.</dd>
|
||||
<% end %>
|
||||
</dl>
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<div class="row">
|
||||
<div class="span3">
|
||||
<h2><%- T(@head) %></h2>
|
||||
<h2><%- @T( @head ) %></h2>
|
||||
<ul>
|
||||
<% for item in @items: %>
|
||||
<li><span data-id="<%= item.o_id %>"><a data-type="edit" href="#"><%= item.history_object.name %> (<%= item.ticket.title %>)</a></span></li>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<div class="row">
|
||||
<div class="span3">
|
||||
<h2><%- T(@head) %></h2>
|
||||
<h2><%- @T( @head ) %></h2>
|
||||
<ul>
|
||||
<% for item in @items: %>
|
||||
<li><a href="<%= item.link %>" title="<%= item.summary %>" target="_blank"><%= item.title %>"</a></li>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<div class="span9">
|
||||
<div class="row">
|
||||
<div class="span6">
|
||||
<h2><%- T(@overview.meta.name) %> <small><a href="#" data-type="settings" class="icon-edit"></a></small></h2>
|
||||
<h2><%- @T( @overview.meta.name ) %> <small><a href="#" data-type="settings" class="icon-edit"></a></small></h2>
|
||||
</div>
|
||||
<div class="span3">
|
||||
<div class="pagination">
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<form class="form-horizontal">
|
||||
<div class="modal-header">
|
||||
<a href="#" class="close">×</a>
|
||||
<h3><%- T('Edit') %>: <%- T(@overview.meta.name) %></h3>
|
||||
<h3><%- @T( 'Edit' ) %>: <%- @T( @overview.meta.name ) %></h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div id="form-setting"></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-primary submit"><%- T('Submit') %></button>
|
||||
<button class="btn cancel"><%- T('Cancel') %></button>
|
||||
<button class="btn btn-primary submit"><%- @T( 'Submit' ) %></button>
|
||||
<button class="btn cancel"><%- @T( 'Cancel' ) %></button>
|
||||
</div>
|
||||
</form>
|
|
@ -2,7 +2,7 @@
|
|||
<!--
|
||||
<a href="#" class="close">×</a>
|
||||
-->
|
||||
<h3><%- T('Error') %></h3>
|
||||
<h3><%- @T( 'Error' ) %></h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form class="form-horizontal">
|
||||
|
@ -11,7 +11,7 @@
|
|||
</div>
|
||||
<div class="modal-footer">
|
||||
<!--
|
||||
<button class="btn btn-primary submit"><%- T('Submit') %></button>
|
||||
<button class="btn cancel"><%- T('Cancel') %></button>
|
||||
<button class="btn btn-primary submit"><%- @T( 'Submit' ) %></button>
|
||||
<button class="btn cancel"><%- @T( 'Cancel' ) %></button>
|
||||
-->
|
||||
</div>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<form class="form-horizontal">
|
||||
<div class="modal-header">
|
||||
<a href="#" class="close">×</a>
|
||||
<h3><%- T('Edit') %>: <%- T(@head) %></h3>
|
||||
<h3><%- @T( 'Edit' ) %>: <%- @T( @head ) %></h3>
|
||||
</div>
|
||||
<div class="modal-body" id="object_edit"></div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-primary submit"><%- T('Submit') %></button>
|
||||
<button class="btn cancel"><%- T('Cancel') %></button>
|
||||
<button class="btn btn-primary submit"><%- @T( 'Submit' ) %></button>
|
||||
<button class="btn cancel"><%- @T( 'Cancel' ) %></button>
|
||||
</div>
|
||||
</form>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="page-header">
|
||||
<h1><%- T(@head) %> <small><%- T('Management') %></small></h1>
|
||||
<h1><%- @T( @head ) %> <small><%- @T( 'Management' ) %></small></h1>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
@ -23,15 +23,15 @@
|
|||
</ul>
|
||||
|
||||
<% for note in @notes: %>
|
||||
<p><%- T(note) %></p>
|
||||
<p><%- @T( note ) %></p>
|
||||
<% end %>
|
||||
|
||||
<% if @buttons: %>
|
||||
<% for button in @buttons: %>
|
||||
<p><a data-type="<%= button['data-type'] %>" class="btn <%= button['class'] %>"><%- T(button.name) %></a></p>
|
||||
<p><a data-type="<%= button['data-type'] %>" class="btn <%= button['class'] %>"><%- @T( button.name ) %></a></p>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="span9 table-overview"></div>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<form class="form-horizontal">
|
||||
<div class="modal-header">
|
||||
<a href="#" class="close">×</a>
|
||||
<h3><%- T('Neu') %>: <%- T(@head) %></h3>
|
||||
<h3><%- @T( 'Neu' ) %>: <%- @T( @head ) %></h3>
|
||||
</div>
|
||||
<div class="modal-body" id="object_new"></div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-primary submit"><%- T('Submit') %></button>
|
||||
<button class="btn cancel"><%- T('Cancel') %></button>
|
||||
<button class="btn btn-primary submit"><%- @T( 'Submit' ) %></button>
|
||||
<button class="btn cancel"><%- @T( 'Cancel' ) %></button>
|
||||
</div>
|
||||
</form>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="page-header">
|
||||
<h1><%- T(@page.head) %> <small><%- T(@page.sub_head) %></small></h1>
|
||||
<h1><%- @T( @page.head ) %> <small><%- @T( @page.sub_head ) %></small></h1>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
@ -7,7 +7,7 @@
|
|||
<ul class="nav nav-tabs nav-stacked">
|
||||
<% if @menus: %>
|
||||
<% for menu in @menus: %>
|
||||
<li class="<%= menu['class'] %>"><a href="<%= @page.nav %>/<%= menu.target %>" data-toggle="tabnav" data-target="<%= menu['target'] %>" ><%- T(menu.name) %></a></li>
|
||||
<li class="<%= menu['class'] %>"><a href="<%= @page.nav %>/<%= menu.target %>" data-toggle="tabnav" data-target="<%= menu['target'] %>" ><%- @T( menu.name ) %></a></li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<div class="control-group <%= @attribute.item_class %>">
|
||||
<label class="control-label" for="<%= @attribute.id %>"><%- T(@attribute.display) %><% if !@attribute.null: %> *<% end %>
|
||||
<label class="control-label" for="<%= @attribute.id %>"><%- @T( @attribute.display ) %><% if !@attribute.null: %> *<% end %>
|
||||
</label>
|
||||
<div class="controls">
|
||||
<%- @item %><% if @attribute.note: %><span class="icon-question-sign" title="<%- T(@attribute.note) + ' ' %>"></span><% end %>
|
||||
<%- @item %><% if @attribute.note: %><span class="icon-question-sign" title="<%- @Ti( @attribute.note ) + ' ' %>"></span><% end %>
|
||||
<span class="help-inline"></span>
|
||||
<span class="help-block"><% if @attribute.help: %><%- T(@attribute.help) + ' ' %><% end %><%- @attribute.link %></span>
|
||||
<span class="help-block"><% if @attribute.help: %><%- @T( @attribute.help ) + ' ' %><% end %><%- @attribute.link %></span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="hero-unit">
|
||||
<h2><%- T(@head) %> <small><%- T(@head_small) %></small></h2>
|
||||
<h2><%- @T( @head ) %> <small><%- @T( @head_small ) %></small></h2>
|
||||
<div class="container">
|
||||
<p>
|
||||
<%- @message %>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<th style="width: 10px"><input type="checkbox" value="" name="bulk_all"/></th>
|
||||
<% end %>
|
||||
<% for row in @header: %>
|
||||
<th <% if row.style: %>style="<%= row.style %>"<% end %>><%- T(row.display) %></th>
|
||||
<th <% if row.style: %>style="<%= row.style %>"<% end %>><%- @T( row.display ) %></th>
|
||||
<% end %>
|
||||
<!--
|
||||
<th>Destory</th>
|
||||
|
@ -19,24 +19,16 @@
|
|||
<tr class="item <% if object.active is false: %>not-active<% end %>" data-id="<%= object.id %>" data-position="<%= position %>" >
|
||||
<% if @checkbox: %>
|
||||
<td>
|
||||
<input type="checkbox" value="<%= object.id %>" name="bulk"/>
|
||||
<input type="checkbox" value="<%= object.id %>" name="bulk"/>
|
||||
</td>
|
||||
<% end %>
|
||||
<% for row in @overview: %>
|
||||
<% if typeof object[row.name] is 'object': %>
|
||||
<% displayName = object[row.name].displayNameLong() %>
|
||||
<% else: %>
|
||||
<% displayName = object[row.name] %>
|
||||
<% end %>
|
||||
<% if row.translate: %><% displayName = T(displayName) %><% end %>
|
||||
<% displayName = @P( object[row.name] ) %>
|
||||
<% if row.translate: %><% displayName = @T( displayName ) %><% end %>
|
||||
<% if row.title: %>
|
||||
<% displayNameTitle = displayName %>
|
||||
<% if object[row.title]: %>
|
||||
<% if typeof object[row.title] is 'object': %>
|
||||
<% displayNameTitle = object[row.title].displayNameLong() %>
|
||||
<% else: %>
|
||||
<% displayNameTitle = object[row.title] %>
|
||||
<% end %>
|
||||
<% displayNameTitle = @P( object[row.title] ) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<td <% if row.title: %>title="<%= displayNameTitle %>"<% end %>>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<ul class="nav nav-tabs">
|
||||
<% for tab in @tabs: %>
|
||||
<li><a href="#<%= tab.target %>" data-toggle="tab"><%- T(tab.name) %></a></li>
|
||||
<li><a href="#<%= tab.target %>" data-toggle="tab"><%- @T( tab.name ) %></a></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<div class="tab-content"></div>
|
|
@ -1,39 +1,36 @@
|
|||
<div class="hero-unit">
|
||||
|
||||
<h1><%- T('Getting started!') %><small></small></h1>
|
||||
|
||||
<h1><%- @T( 'Getting started!' ) %><small></small></h1>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="span12">
|
||||
<ol>
|
||||
<li><%- T('Create Admin') %></li>
|
||||
<li><%- T('Invite Agents') %></li>
|
||||
<li><%- T('Configure Channels') %></li>
|
||||
<li><%- @T( 'Create Admin' ) %></li>
|
||||
<li><%- @T( 'Invite Agents' ) %></li>
|
||||
<li><%- @T( 'Configure Channels' ) %></li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<% if @master_user: %>
|
||||
<div class="span6 master_user">
|
||||
<h2><%- T('Master Agent') %></h2>
|
||||
<h2><%- @T( 'Master Agent' ) %></h2>
|
||||
<form class="form-stacked" id="form-master">
|
||||
<button class="btn btn-primary submit"><%- T('Next...') %></button>
|
||||
<button class="btn btn-primary submit"><%- @T( 'Next...' ) %></button>
|
||||
</form>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="span6 agent_user hide">
|
||||
<h2><%- T('Invite Agents') %></h2>
|
||||
<h2><%- @T( 'Invite Agents' ) %></h2>
|
||||
<form class="form-stacked" id="form-agent">
|
||||
<button class="btn btn-primary submit"><%- T('Send Invitation') %></button>
|
||||
<button class="btn btn-primary submit"><%- @T( 'Send Invitation' ) %></button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="span6">
|
||||
<h2><%- T('Tour') %></h2>
|
||||
<h2><%- @T( 'Tour' ) %></h2>
|
||||
<p>
|
||||
<%- T('Learn all about ...') %>
|
||||
<%- @T( 'Learn all about ...' ) %>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
|
@ -1,20 +1,20 @@
|
|||
<form class="form-horizontal">
|
||||
<div class="modal-header">
|
||||
<a href="#" class="close">×</a>
|
||||
<h3><%- T('Link') %></h3>
|
||||
<h3><%- @T( 'Link' ) %></h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<%- T('Link') %>
|
||||
<%- T(@link_object) %>
|
||||
<%- @T( 'Link' ) %>
|
||||
<%- @T( @link_object ) %>
|
||||
<input type="text" name="ticket_number" value="" class="span2" required/>
|
||||
<%- T('as') %>
|
||||
<%- @T( 'as' ) %>
|
||||
<select name="link_type" class="span2" required>
|
||||
<option value="">-</option>
|
||||
<option value="normal"><%- T('normal') %></option>
|
||||
<option value="child"><%- T('child') %></option>
|
||||
<option value="parent"><%- T('parent') %></option>
|
||||
<option value="normal"><%- @T( 'normal' ) %></option>
|
||||
<option value="child"><%- @T( 'child' ) %></option>
|
||||
<option value="parent"><%- @T( 'parent' ) %></option>
|
||||
</select>
|
||||
<%- T('of') %>
|
||||
<%- @T( 'of' ) %>
|
||||
Ticket#
|
||||
<%= @object.number %>.
|
||||
<!--
|
||||
|
@ -26,6 +26,6 @@
|
|||
-->
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" class="btn btn-primary"><%- T('Submit') %></button>
|
||||
<button type="submit" class="btn btn-primary"><%- @T( 'Submit' ) %></button>
|
||||
</div>
|
||||
</form>
|
|
@ -1,14 +1,14 @@
|
|||
<div class="well">
|
||||
<h3><%- T('Links') %> <a href="" data-type="edit" class="icon-edit" title="<%- T('edit') %>"></a></h3>
|
||||
<h3><%- @T( 'Links' ) %> <a href="" data-type="edit" class="icon-edit" title="<%- @Ti( 'edit' ) %>"></a></h3>
|
||||
<% for type of @links: %>
|
||||
<strong><%- T( type ) %></strong>
|
||||
<strong><%- @T( type ) %></strong>
|
||||
<ul>
|
||||
<% for item in @links[type]: %>
|
||||
<li><a href="#ticket/zoom/<%= item.id %>" data-type="" title="<%= item.title %>" class="<%= item.css %>">T:<%= item.number %> <%= item.title %></a> <a href="" data-object="Ticket" data-object-id="<%= item.id %>" data-link-type="<%= type %>" data-type="remove" class="icon-remove hide" title="<%- T('remove') %>"></a></li>
|
||||
<li><a href="#ticket/zoom/<%= item.id %>" data-type="" title="<%= item.title %>" class="<%= item.css %>">T:<%= item.number %> <%= item.title %></a> <a href="" data-object="Ticket" data-object-id="<%= item.id %>" data-link-type="<%= type %>" data-type="remove" class="icon-remove hide" title="<%- @Ti('remove') %>"></a></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
<div>
|
||||
<a href="" data-type="add" class="icon-plus hide" title="<%- T('add') %>"></a>
|
||||
<a href="" data-type="add" class="icon-plus hide" title="<%- @Ti('add') %>"></a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,39 +1,38 @@
|
|||
<div id="login">
|
||||
|
||||
<div class="hero-unit">
|
||||
<h1>Welcome stranger!</h1>
|
||||
<h1><%- @T( 'Welcome stranger!' ) %></h1>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="span12">
|
||||
<p><%- T('Sign in with') %></p>
|
||||
<p><%- @T( 'Sign in with' ) %></p>
|
||||
<form id="login" class="form-search">
|
||||
<input name="username" type="text" class="input span3" placeholder="<%- Ti('Username or email') %>" value="<%= @item.username %>" autocapitalize="off"/>
|
||||
<input name="password" type="password" class="input span3" placeholder="<%- Ti('Password') %>"/>
|
||||
<button class="btn btn-primary" type="submit"><%- T('Sign in') %></button>
|
||||
<input name="username" type="text" class="input span3" placeholder="<%- @Ti( 'Username or email' ) %>" value="<%= @item.username %>" autocapitalize="off"/>
|
||||
<input name="password" type="password" class="input span3" placeholder="<%- œTi( 'Password' ) %>"/>
|
||||
<button class="btn btn-primary" type="submit"><%- @T( 'Sign in' ) %></button>
|
||||
<div>
|
||||
<span class="small"><input name="remember_me" value="1" type="checkbox"/> <%- T('Remember me') %></span>
|
||||
<span class="small"><input name="remember_me" value="1" type="checkbox"/> <%- @T( 'Remember me' ) %></span>
|
||||
<span class="small">·</span>
|
||||
<a href="#reset_password" class="small"><%- T('Forgot password?') %></a>
|
||||
<a href="#reset_password" class="small"><%- @T( 'Forgot password?' ) %></a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<% if !_.isEmpty(@auth_providers): %>
|
||||
|
||||
<% if !_.isEmpty( @auth_providers ): %>
|
||||
<div class="row">
|
||||
<div class="span12">
|
||||
<p>--- <%- T('or') %> ---</p>
|
||||
<p>--- <%- @T( 'or' ) %> ---</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="span12">
|
||||
<p><%- T('Sign in using') %></p>
|
||||
<p><%- @T( 'Sign in using' ) %></p>
|
||||
<ul>
|
||||
<% for auth_provider in @auth_providers: %>
|
||||
<li><a href="<%= auth_provider.url %>"><%- T(auth_provider.name) %></a></li>
|
||||
<li><a href="<%= auth_provider.url %>"><%- @T( auth_provider.name ) %></a></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -42,19 +41,19 @@
|
|||
|
||||
<div class="row">
|
||||
<div class="span12">
|
||||
<p>--- <%- T('or') %> ---</p>
|
||||
<p>--- <%- @T( 'or' ) %> ---</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="span12">
|
||||
<p><%- T('New to') %> <%= Config.product_name %>, <%- T('join today!') %></p>
|
||||
<p><a href="#signup" class="btn"><%- T('Sign up') %></a>
|
||||
<p><%- @T( 'New to' ) %> <%= Config.product_name %>, <%- @T( 'join today!' ) %></p>
|
||||
<p><a href="#signup" class="btn"><%- @T( 'Sign up' ) %></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
|
|
@ -6,26 +6,26 @@
|
|||
<% for item in @navbar_left: %>
|
||||
<% if item.child: %>
|
||||
<li class="dropdown <% if @open_tab[item.target] : %>open<% end %>">
|
||||
<a href="<%= item.target %>" class="dropdown-toggle" data-toggle="dropdown"><%- T(item.name) %> <b class="caret"></b></a>
|
||||
<a href="<%= item.target %>" class="dropdown-toggle" data-toggle="dropdown"><%- @T( item.name ) %> <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<% for item in item.child: %>
|
||||
<% if item.divider: %>
|
||||
<li class="divider"></li>
|
||||
<% end %>
|
||||
<% if item.navheader: %>
|
||||
<li class="nav-header"><%- T(item.navheader) %></li>
|
||||
<li class="nav-header"><%- @T( item.navheader ) %></li>
|
||||
<% end %>
|
||||
<li class="<% if @active_tab[item.target] : %>active<% end %>"><a href="<%= item.target %>"><%- T(item.name) %><% if item['count'] isnt undefined: %> <span class="count">(<%= item['count'] %>)</span><% end %></a></li>
|
||||
<li class="<% if @active_tab[item.target] : %>active<% end %>"><a href="<%= item.target %>"><%- @T( item.name ) %><% if item['count'] isnt undefined: %> <span class="count">(<%= item['count'] %>)</span><% end %></a></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</li>
|
||||
<% else: %>
|
||||
<li class="<% if @active_tab[item.target] : %>active<% end %>"><a href="<%= item.target %>"><%- T(item.name) %></a></li>
|
||||
<li class="<% if @active_tab[item.target] : %>active<% end %>"><a href="<%= item.target %>"><%- @T( item.name ) %></a></li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</ul>
|
||||
<form class="navbar-search pull-left">
|
||||
<input class="search-query" type="search" value="" placeholder="<%- Ti('Search') %>"/>
|
||||
<input class="search-query" type="search" value="" placeholder="<%- @Ti( 'Search' ) %>"/>
|
||||
</form>
|
||||
<div class="spinner"/>
|
||||
<% if @user: %>
|
||||
|
@ -33,27 +33,27 @@
|
|||
<% for item in @navbar_right: %>
|
||||
<% if item.child: %>
|
||||
<li class="dropdown <% if @open_tab[item.target] : %>open<% end %>">
|
||||
<a href="<%= item.target %>" class="dropdown-toggle" data-toggle="dropdown"><%- T(item.name) %> <b class="caret"></b></a>
|
||||
<a href="<%= item.target %>" class="dropdown-toggle" data-toggle="dropdown"><%- @T( item.name ) %> <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<% for item in item.child: %>
|
||||
<% if item.divider: %>
|
||||
<li class="divider"></li>
|
||||
<% end %>
|
||||
<% if item.navheader: %>
|
||||
<li class="nav-header"><%- T(item.navheader) %></li>
|
||||
<li class="nav-header"><%- @T( item.navheader ) %></li>
|
||||
<% end %>
|
||||
<li class="<% if @active_tab[item.target] : %>active<% end %>"><a href="<%= item.target %>"><%- T(item.name) %><% if item['count'] isnt undefined: %> <span class="count">(<%= item['count'] %>)</span><% end %></a></li>
|
||||
<li class="<% if @active_tab[item.target] : %>active<% end %>"><a href="<%= item.target %>"><%- @T( item.name ) %><% if item['count'] isnt undefined: %> <span class="count">(<%= item['count'] %>)</span><% end %></a></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</li>
|
||||
<% else: %>
|
||||
<li class="<% if @active_tab[item.target] : %>active<% end %>"><a href="<%= item.target %>"><%- T(item.name) %></a></li>
|
||||
<li class="<% if @active_tab[item.target] : %>active<% end %>"><a href="<%= item.target %>"><%- @T( item.name ) %></a></li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% else: %>
|
||||
<ul class="nav pull-right">
|
||||
<li><a href="#login"><%- T('Sign in') %></a></li>
|
||||
<li><a href="#login"><%- @T( 'Sign in' ) %></a></li>
|
||||
</ul>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<div class="page-header">
|
||||
<h1><%- T('Profile') %><small></small></h1>
|
||||
<h1><%- @T( 'Profile' ) %><small></small></h1>
|
||||
</div>
|
||||
|
||||
<ul>
|
||||
<li><%- T('Password') %></li>
|
||||
<li><%- T('Link Accounts') %></li>
|
||||
<li><%- T('Notifications') %></li>
|
||||
<li><%- @T( 'Password' ) %></li>
|
||||
<li><%- @T( 'Link Accounts' ) %></li>
|
||||
<li><%- @T( 'Notifications' ) %></li>
|
||||
<li></li>
|
||||
</ul>
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<div class="hero-unit">
|
||||
<h2><%- T('Forgot your password?') %><small></small></h2>
|
||||
<h2><%- @T( 'Forgot your password?' ) %><small></small></h2>
|
||||
<div class="container">
|
||||
<form>
|
||||
<p id="form-password"></p>
|
||||
<a href="#/" class="btn cancel"><%- T('Cancel') %></a>
|
||||
<button class="btn btn-primary submit"><%- T('Submit') %></button>
|
||||
<a href="#/" class="btn cancel"><%- @T( 'Cancel' ) %></a>
|
||||
<button class="btn btn-primary submit"><%- @T( 'Submit' ) %></button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
|
@ -1,9 +1,9 @@
|
|||
<div class="hero-unit">
|
||||
<h2><%- T('Choose your new password.') %><small></small></h2>
|
||||
<h2><%- @T( 'Choose your new password.' ) %><small></small></h2>
|
||||
<div class="container">
|
||||
<form>
|
||||
<p id="form-password-change"></p>
|
||||
<button class="btn btn-primary submit"><%- T('Submit') %></button>
|
||||
<button class="btn btn-primary submit"><%- @T( 'Submit' ) %></button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<form class="">
|
||||
<h2><%- T(@setting.title) %></h2>
|
||||
<p><%- T(@setting.description) %></p>
|
||||
<h2><%- @T( @setting.title ) %></h2>
|
||||
<p><%- @T( @setting.description ) %></p>
|
||||
<div id="form-item"></div>
|
||||
<button type="submit" class="btn"><%- T('Submit') %></button>
|
||||
<button type="submit" class="btn"><%- @T( 'Submit' ) %></button>
|
||||
</form>
|
||||
<hr/>
|
|
@ -1,10 +1,10 @@
|
|||
<div class="hero-unit">
|
||||
<h1><%- T('Join') %> <%= Config.product_name %><small></small></h1>
|
||||
<h1><%- @T( 'Join' ) %> <%= Config.product_name %><small></small></h1>
|
||||
<div class="container">
|
||||
<form class="form-horizontal">
|
||||
<p id="form-signup"></p>
|
||||
<a href="#/" class="btn cancel"><%- T('Cancel') %></a>
|
||||
<button class="btn btn-primary submit"><%- T('Create my account') %></button>
|
||||
<a href="#/" class="btn cancel"><%- @T( 'Cancel' ) %></a>
|
||||
<button class="btn btn-primary submit"><%- @T( 'Create my account' ) %></button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
|
@ -1,11 +1,11 @@
|
|||
<div class="well">
|
||||
<h3><%- T('Templates') %></h3>
|
||||
<h3><%- @T( 'Templates' ) %></h3>
|
||||
<div id="form-template"></div>
|
||||
<!--<button type="submit" class="btn" data-type="template_edit"><%- T('Edit') %></button>-->
|
||||
<button type="submit" class="btn" data-type="template_delete"><%- T('Delete') %></button>
|
||||
<button type="submit" class="btn" data-type="template_select"><%- T('Apply') %></button>
|
||||
<!--<button type="submit" class="btn" data-type="template_edit"><%- @T( 'Edit' ) %></button>-->
|
||||
<button type="submit" class="btn" data-type="template_delete"><%- @T( 'Delete' ) %></button>
|
||||
<button type="submit" class="btn" data-type="template_select"><%- @T( 'Apply' ) %></button>
|
||||
<hr/>
|
||||
<label class="" for="template_name"><%- T('Save as Template') %></label>
|
||||
<label class="" for="template_name"><%- @T( 'Save as Template' ) %></label>
|
||||
<input type="text" name="template_name" id="template_name" class="span2" value="<%= @template.name %>"/>
|
||||
<button type="submit" class="btn" data-type="template_save"><%- T('Save') %></button>
|
||||
<button type="submit" class="btn" data-type="template_save"><%- @T( 'Save' ) %></button>
|
||||
</div>
|
|
@ -1,8 +1,8 @@
|
|||
<div class="well">
|
||||
<h3><%- T('Actions') %></h3>
|
||||
<h3><%- @T( 'Actions' ) %></h3>
|
||||
<ul>
|
||||
<li><a href="#" data-type="history"><%- T('History') %></a></li>
|
||||
<li><a href="#" data-type="merge"><%- T('Merge') %></a></li>
|
||||
<li><a href="#" data-type="customer"><%- T('Change Customer') %></a></li>
|
||||
<li><a href="#" data-type="history"><%- @T( 'History' ) %></a></li>
|
||||
<li><a href="#" data-type="merge"><%- @T( 'Merge' ) %></a></li>
|
||||
<li><a href="#" data-type="customer"><%- @T( 'Change Customer' ) %></a></li>
|
||||
</ul>
|
||||
</div>
|
|
@ -1,19 +1,19 @@
|
|||
<div class="well">
|
||||
<h3><%- T('Customer') %> <a href="#" data-type="edit" class="icon-edit"></a></h3>
|
||||
<h3><%- @T( 'Customer' ) %> <a href="#" data-type="edit" class="icon-edit"></a></h3>
|
||||
<% if @user.image: %>
|
||||
<img class="thumbnail" src="<%- @user.image %>" alt="">
|
||||
<% end %>
|
||||
<div class="row">
|
||||
<div class="customer-info" title="<%- Ti('Name') %>"><%= @user.displayName() %></div>
|
||||
<div class="customer-info" title="<%- @Ti( 'Name') %>"><%= @user.displayName() %></div>
|
||||
</div>
|
||||
<% for row in @data: %>
|
||||
<% if @user[row.name] || row.name is 'note': %>
|
||||
<div class="row">
|
||||
<% if row.tag isnt 'textarea': %>
|
||||
<div class="customer-info" title="<%- Ti(row.display) %>"><%- window.linkify( @user[row.name] ) %></div>
|
||||
<div class="customer-info" title="<%- @Ti( row.display ) %>"><%- @L( @P( @user[row.name] ) ) %></div>
|
||||
<% else: %>
|
||||
<div class="customer-info" title="<%- Ti(row.display) %>">
|
||||
<strong><%- T(row.display) %></strong><br/>
|
||||
<div class="customer-info" title="<%- @Ti( row.display ) %>">
|
||||
<strong><%- @T( row.display ) %></strong><br/>
|
||||
<textarea class="customer-info" rows="3" name="<%= row.name %>" data-type="update"><%= @user[row.name] %></textarea>
|
||||
</div>
|
||||
<% end %>
|
||||
|
@ -23,7 +23,7 @@
|
|||
<% if !_.isEmpty(@user['accounts']): %>
|
||||
<div class="row">
|
||||
<div class="customer-info">
|
||||
<strong><%- T('Linked Accounts') %></strong><br/>
|
||||
<strong><%- @T( 'Linked Accounts' ) %></strong><br/>
|
||||
<% for account of @user['accounts']: %>
|
||||
<a href="<%= @user['accounts'][account]['link'] %>" target="_blank"><%= account %></a>
|
||||
<% end %>
|
||||
|
@ -34,19 +34,19 @@
|
|||
<% for link in @user['links']: %>
|
||||
<div class="row">
|
||||
<div class="customer-info">
|
||||
<strong><%- T(link['title']) %></strong><br/>
|
||||
<strong><%- @T( link['title'] ) %></strong><br/>
|
||||
<% for item in link['items']: %>
|
||||
<% if item['url']: %>
|
||||
<a href="<%= item['url'] %>" title="<%- Ti(item['title']) %>" style="<%= item['style'] %>" data-type="<%= item['data'] %>" class="<%= item['class'] %>" <% if link.new_window: %>target="_blank"<% end %>>
|
||||
<% else: %>
|
||||
<span title="<%- Ti(item['title']) %>" style="<%= item['style'] %>" data-type="<%= item['data'] %>" class="<%= item['class'] %>">
|
||||
<% end %>
|
||||
<%- T(item['name']) %> <% if item['count'] isnt undefined: %><span class="count">(<%= item['count'] %>)</span><% end %>
|
||||
<a href="<%= item['url'] %>" title="<%- @Ti( item['title'] ) %>" style="<%= item['style'] %>" data-type="<%= item['data'] %>" class="<%= item['class'] %>" <% if link.new_window: %>target="_blank"<% end %>>
|
||||
<% else: %>
|
||||
<span title="<%- @Ti( item['title'] ) %>" style="<%= item['style'] %>" data-type="<%= item['data'] %>" class="<%= item['class'] %>">
|
||||
<% end %>
|
||||
<%- @T( item['name'] ) %> <% if item['count'] isnt undefined: %><span class="count">(<%= item['count'] %>)</span><% end %>
|
||||
<% if item['url']: %>
|
||||
</a>
|
||||
<% else: %>
|
||||
</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,37 +1,37 @@
|
|||
<% for row in @data: %>
|
||||
<% if @user[row.name]: %>
|
||||
<div class="row">
|
||||
<div class="customer-info" title="<%- T(row.display) %>"><%- window.linkify( @user[row.name] ) %></div>
|
||||
<div class="customer-info" title="<%- @Ti( row.display ) %>"><%- @L( @P( @user[row.name] ) ) %></div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% 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 %>
|
||||
<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']): %>
|
||||
<% if !_.isEmpty( @user['links'] ): %>
|
||||
<% for link in @user['links']: %>
|
||||
<div class="row">
|
||||
<div class="customer-info">
|
||||
<strong><%- T(link['title']) %></strong><br/>
|
||||
<strong><%- @T( link['title'] ) %></strong><br/>
|
||||
<% for item in link['items']: %>
|
||||
<% if item['url']: %>
|
||||
<a href="<%= item['url'] %>" title="<%- T(item['title']) %>" style="<%= item['style'] %>" data-type="<%= item['data'] %>" class="<%= item['class'] %>" <% if link.new_window: %>target="_blank"<% end %>>
|
||||
<a href="<%= item['url'] %>" title="<%- @Ti( item['title'] ) %>" style="<%= item['style'] %>" data-type="<%= item['data'] %>" class="<%= item['class'] %>" <% if link.new_window: %>target="_blank"<% end %>>
|
||||
<% else: %>
|
||||
<span title="<%- T(item['title']) %>" style="<%= item['style'] %>" data-type="<%= item['data'] %>" class="<%= item['class'] %>">
|
||||
<% end %>
|
||||
<%- T(item['name']) %> <% if item['count'] isnt undefined: %><span class="count">(<%= item['count'] %>)</span><% end %>
|
||||
<span title="<%- @Ti( item['title'] ) %>" style="<%= item['style'] %>" data-type="<%= item['data'] %>" class="<%= item['class'] %>">
|
||||
<% end %>
|
||||
<%- @T( item['name'] ) %> <% if item['count'] isnt undefined: %><span class="count">(<%= item['count'] %>)</span><% end %>
|
||||
<% if item['url']: %>
|
||||
</a>
|
||||
<% else: %>
|
||||
</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -161,7 +161,8 @@ curl http://localhost/api/users.json -v -u #{login}:#{password} -H "Content-Type
|
|||
# logger.debug('IIIIIIIIIIIIIIIIIIIIIIIIIIIIII')
|
||||
# exit '123'
|
||||
end
|
||||
render :json => user, :status => :created
|
||||
user_new = User.user_data_full( user.id )
|
||||
render :json => user_new, :status => :created
|
||||
rescue Exception => e
|
||||
render :json => { :error => e.message }, :status => :unprocessable_entity
|
||||
end
|
||||
|
@ -206,8 +207,8 @@ curl http://localhost/api/users/2.json -v -u #{login}:#{password} -H "Content-Ty
|
|||
if params[:organization_ids]
|
||||
user.organization_ids = params[:organization_ids]
|
||||
end
|
||||
user = User.user_data_full( params[:id] )
|
||||
render :json => user, :status => :ok
|
||||
user_new = User.user_data_full( params[:id] )
|
||||
render :json => user_new, :status => :ok
|
||||
rescue Exception => e
|
||||
render :json => { :error => e.message }, :status => :unprocessable_entity
|
||||
end
|
||||
|
|
|
@ -21,6 +21,7 @@ class CreateBase < ActiveRecord::Migration
|
|||
t.column :phone, :string, :limit => 100, :null => true
|
||||
t.column :fax, :string, :limit => 100, :null => true
|
||||
t.column :mobile, :string, :limit => 100, :null => true
|
||||
t.column :department, :string, :limit => 200, :null => true
|
||||
t.column :street, :string, :limit => 120, :null => true
|
||||
t.column :zip, :string, :limit => 100, :null => true
|
||||
t.column :city, :string, :limit => 100, :null => true
|
||||
|
@ -37,6 +38,7 @@ class CreateBase < ActiveRecord::Migration
|
|||
add_index :users, [:login], :unique => true
|
||||
add_index :users, [:email]
|
||||
# add_index :users, [:email], :unique => true
|
||||
add_index :users, [:department]
|
||||
add_index :users, [:phone]
|
||||
add_index :users, [:fax]
|
||||
add_index :users, [:mobile]
|
||||
|
|
Loading…
Reference in a new issue