()
| 189 | } |
| 190 | |
| 191 | render() { |
| 192 | const { |
| 193 | collection, |
| 194 | entityManager, |
| 195 | query, |
| 196 | intl, |
| 197 | result, |
| 198 | schema, |
| 199 | isEntitySet, |
| 200 | sort, |
| 201 | updateStatus, |
| 202 | writeable, |
| 203 | } = this.props; |
| 204 | const { selection } = this.state; |
| 205 | const visitEntity = this.onEntityClick; |
| 206 | const showEmptyComponent = result.total === 0 && query.hasQuery(); |
| 207 | const selectedEntities = selection |
| 208 | .map(this.getEntity) |
| 209 | .filter((e) => e !== undefined); |
| 210 | |
| 211 | return ( |
| 212 | <div className="EntityTable"> |
| 213 | <EntityActionBar |
| 214 | query={query} |
| 215 | writeable={writeable} |
| 216 | onSearchSubmit={this.onSearchSubmit} |
| 217 | updateStatus={updateStatus} |
| 218 | searchPlaceholder={intl.formatMessage(messages.search_placeholder, { |
| 219 | schema: schema.plural.toLowerCase(), |
| 220 | })} |
| 221 | searchDisabled={result.total === 0 && !query.hasQuery()} |
| 222 | > |
| 223 | {!isEntitySet && ( |
| 224 | <> |
| 225 | <DialogToggleButton |
| 226 | buttonProps={{ |
| 227 | text: intl.formatMessage(messages.bulk_import), |
| 228 | icon: 'import', |
| 229 | }} |
| 230 | Dialog={DocumentSelectDialog} |
| 231 | dialogProps={{ |
| 232 | schema, |
| 233 | collection, |
| 234 | onSelect: this.onDocSelected, |
| 235 | }} |
| 236 | /> |
| 237 | <Divider /> |
| 238 | </> |
| 239 | )} |
| 240 | {!schema.isEdge && ( |
| 241 | <DialogToggleButton |
| 242 | buttonProps={{ |
| 243 | text: intl.formatMessage(messages.add_link), |
| 244 | icon: 'new-link', |
| 245 | disabled: selection.length < 1 || selection.length > 2, |
| 246 | }} |
| 247 | Dialog={EdgeCreateDialog} |
| 248 | dialogProps={{ |
nothing calls this directly
no test coverage detected