diff --git a/app/assets/javascripts/app/controllers/_application_controller.js.coffee b/app/assets/javascripts/app/controllers/_application_controller.js.coffee index 1adb5cba8..f9a1d77ef 100644 --- a/app/assets/javascripts/app/controllers/_application_controller.js.coffee +++ b/app/assets/javascripts/app/controllers/_application_controller.js.coffee @@ -281,7 +281,7 @@ class App.Controller extends Spine.Controller 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.name isnt 'firstname' && item.name isnt 'lastname' && item.name isnt 'organization' if item.info #&& ( @user[item.name] || item.name isnt 'note' ) data.push item diff --git a/app/assets/javascripts/app/controllers/navigation.js.coffee b/app/assets/javascripts/app/controllers/navigation.js.coffee index 7c605ebb9..bc11dcd77 100644 --- a/app/assets/javascripts/app/controllers/navigation.js.coffee +++ b/app/assets/javascripts/app/controllers/navigation.js.coffee @@ -92,14 +92,24 @@ class App.Navigation extends App.Controller processData: true, success: (data, status, xhr) => - # load user collection - if data.load.organizations - App.Collection.load( type: 'Organization', data: data.load.organizations ) - # load user collection if data.load.users App.Collection.load( type: 'User', data: data.load.users ) + # load user collection + if data.load.organizations + console.log(999999999) + for organization_id, organization of data.load.organizations + console.log(2222, organization) + if organization.user_ids + organization.users = [] + for user_id in organization.user_ids + user = App.Collection.find( 'User', user_id ) + console.log(111, user_id) + organization.users.push user + App.Collection.load( type: 'Organization', data: data.load.organizations ) + + # load ticket collection if data.load.tickets App.Collection.load( type: 'Ticket', data: data.load.tickets ) diff --git a/app/assets/javascripts/app/controllers/user_info_widget.js.coffee b/app/assets/javascripts/app/controllers/user_info_widget.js.coffee index a91eea985..e255df007 100644 --- a/app/assets/javascripts/app/controllers/user_info_widget.js.coffee +++ b/app/assets/javascripts/app/controllers/user_info_widget.js.coffee @@ -24,7 +24,7 @@ class App.UserInfo extends App.Controller 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.name isnt 'firstname' && item.name isnt 'lastname' && item.name isnt 'organization' if item.info data.push item diff --git a/app/assets/javascripts/app/views/organization_info_small.jst.eco b/app/assets/javascripts/app/views/organization_info_small.jst.eco index 8815b391c..25b38eb0f 100644 --- a/app/assets/javascripts/app/views/organization_info_small.jst.eco +++ b/app/assets/javascripts/app/views/organization_info_small.jst.eco @@ -1,6 +1,18 @@
<%- @P( @organization ) %> | -... | +<%- @T( 'Shared' ) %> | +<%- @P( @organization.shared ) %> |