import GroupsView from './groups-view';
import TokensView from './tokens-view';
import Template from './templates/users-list-item.hbs';
+import { areThereCustomOrganizations } from '../../store/organizations/utils';
export default Marionette.ItemView.extend({
tagName: 'tr',
firstScmAccounts: scmAccounts.slice(0, scmAccountsLimit),
moreScmAccountsCount: scmAccounts.length - scmAccountsLimit,
firstGroups: groups.slice(0, groupsLimit),
- moreGroupsCount: groups.length - groupsLimit
+ moreGroupsCount: groups.length - groupsLimit,
+ customOrganizations: areThereCustomOrganizations()
};
}
});
import Marionette from 'backbone.marionette';
import ListItemView from './list-item-view';
import Template from './templates/users-list.hbs';
+import { areThereCustomOrganizations } from '../../store/organizations/utils';
export default Marionette.CompositeView.extend({
template: Template,
hideLoading () {
this.$el.removeClass('new-loading');
+ },
+
+ serializeData () {
+ return {
+ ...Marionette.CompositeView.prototype.serializeData.apply(this, arguments),
+ customOrganizations: areThereCustomOrganizations()
+ };
}
});
</ul>
</td>
-<td>
- <ul>
- {{#each firstGroups}}
- <li class="little-spacer-bottom">{{this}}</li>
- {{/each}}
- <li class="little-spacer-bottom">
- {{#gt moreGroupsCount 0}}
- <a class="js-user-more-groups spacer-right" href="#">{{moreGroupsCount}} more</a>
- {{/gt}}
- <a class="js-user-groups icon-bullet-list" title="Update Groups" data-toggle="tooltip" href="#"></a>
- </li>
- </ul>
-</td>
+{{#unless customOrganizations}}
+ <td>
+ <ul>
+ {{#each firstGroups}}
+ <li class="little-spacer-bottom">{{this}}</li>
+ {{/each}}
+ <li class="little-spacer-bottom">
+ {{#gt moreGroupsCount 0}}
+ <a class="js-user-more-groups spacer-right" href="#">{{moreGroupsCount}} more</a>
+ {{/gt}}
+ <a class="js-user-groups icon-bullet-list" title="Update Groups" data-toggle="tooltip" href="#"></a>
+ </li>
+ </ul>
+ </td>
+{{/unless}}
<td>
{{tokensCount}}
<table class="data zebra">
<thead>
- <tr>
- {{#ifShowAvatars}}<th> </th>{{/ifShowAvatars}}
- <th class="nowrap"> </th>
- <th class="nowrap">SCM Accounts</th>
- <th class="nowrap">Groups</th>
- <th class="nowrap">Tokens</th>
- <th class="nowrap"> </th>
- </tr>
+ <tr>
+ {{#ifShowAvatars}}
+ <th> </th>
+ {{/ifShowAvatars}}
+ <th class="nowrap"> </th>
+ <th class="nowrap">SCM Accounts</th>
+ {{#unless customOrganizations}}
+ <th class="nowrap">Groups</th>
+ {{/unless}}
+ <th class="nowrap">Tokens</th>
+ <th class="nowrap"> </th>
+ </tr>
</thead>
<tbody></tbody>
</table>