1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 08:21:15 +03:00

wrap org list in Card for consistency between detail

This commit is contained in:
John Mitchell 2019-01-29 12:50:15 -05:00
parent 65e369c0f3
commit 990851aa3b
No known key found for this signature in database
GPG Key ID: FE6A9B5BD4EB5C94

View File

@ -8,6 +8,7 @@ import {
import { I18n, i18nMark } from '@lingui/react'; import { I18n, i18nMark } from '@lingui/react';
import { t } from '@lingui/macro'; import { t } from '@lingui/macro';
import { import {
Card,
PageSection, PageSection,
PageSectionVariants, PageSectionVariants,
} from '@patternfly/react-core'; } from '@patternfly/react-core';
@ -195,46 +196,48 @@ class OrganizationsList extends Component {
return ( return (
<Fragment> <Fragment>
<PageSection variant={medium}> <PageSection variant={medium}>
<DataListToolbar <Card>
addUrl={`${match.url}/add`} <DataListToolbar
isAllSelected={selected.length === results.length} addUrl={`${match.url}/add`}
sortedColumnKey={sortedColumnKey} isAllSelected={selected.length === results.length}
sortOrder={sortOrder} sortedColumnKey={sortedColumnKey}
columns={this.columns} sortOrder={sortOrder}
onSearch={this.onSearch} columns={this.columns}
onSort={this.onSort} onSearch={this.onSearch}
onSelectAll={this.onSelectAll} onSort={this.onSort}
showDelete onSelectAll={this.onSelectAll}
showSelectAll showDelete
/> showSelectAll
<I18n> />
{({ i18n }) => ( <I18n>
<ul className="pf-c-data-list" aria-label={i18n._(t`Organizations List`)}> {({ i18n }) => (
{ results.map(o => ( <ul className="pf-c-data-list" aria-label={i18n._(t`Organizations List`)}>
<OrganizationListItem { results.map(o => (
key={o.id} <OrganizationListItem
itemId={o.id} key={o.id}
name={o.name} itemId={o.id}
detailUrl={`${match.url}/${o.id}`} name={o.name}
userCount={o.summary_fields.related_field_counts.users} detailUrl={`${match.url}/${o.id}`}
teamCount={o.summary_fields.related_field_counts.teams} userCount={o.summary_fields.related_field_counts.users}
isSelected={selected.includes(o.id)} teamCount={o.summary_fields.related_field_counts.teams}
onSelect={() => this.onSelect(o.id)} isSelected={selected.includes(o.id)}
/> onSelect={() => this.onSelect(o.id)}
))} />
</ul> ))}
)} </ul>
</I18n> )}
<Pagination </I18n>
count={count} <Pagination
page={page} count={count}
pageCount={pageCount} page={page}
page_size={page_size} pageCount={pageCount}
pageSizeOptions={this.pageSizeOptions} page_size={page_size}
onSetPage={this.onSetPage} pageSizeOptions={this.pageSizeOptions}
/> onSetPage={this.onSetPage}
{ loading ? <div>loading...</div> : '' } />
{ error ? <div>error</div> : '' } { loading ? <div>loading...</div> : '' }
{ error ? <div>error</div> : '' }
</Card>
</PageSection> </PageSection>
</Fragment> </Fragment>
); );