Skip to content
Snippets Groups Projects
Commit 42ee5869 authored by Sameer Al-Sakran's avatar Sameer Al-Sakran
Browse files

Merge branch 'collection_stats' of github.com:metabase/metabase-init into collection_stats

parents 7d5d336b b7f53aaa
No related branches found
No related tags found
No related merge requests found
......@@ -16,7 +16,7 @@ export const MODAL_CHILD_CONTEXT_TYPES = {
};
function getModalContent(props) {
if (React.Children.count(props.children).length > 1 ||
if (React.Children.count(props.children) > 1 ||
props.title != null || props.footer != null
) {
return <ModalContent {..._.omit(props, "className", "style")} />
......
......@@ -3,7 +3,6 @@ import { Link } from "react-router";
import cx from "classnames";
import Icon from "metabase/components/Icon";
import CollectionActions from "./CollectionActions";
import ArchiveCollectionWidget from "../containers/ArchiveCollectionWidget";
const COLLECTION_ICON_SIZE = 64;
......@@ -11,12 +10,12 @@ const COLLECTION_ICON_SIZE = 64;
const COLLECTION_BOX_CLASSES = "relative block p4 hover-parent hover--visibility cursor-pointer text-centered transition-background";
const CollectionButtons = ({ collections, isAdmin, push }) =>
<ol className="flex">
<ol className="flex flex-wrap">
{ collections
.map(collection => <CollectionButton {...collection} push={push} isAdmin={isAdmin} />)
.concat(isAdmin ? [<NewCollectionButton push={push} />] : [])
.map((element, index) =>
<li key={index} className="mr4">
<li key={index} className="mr4 mb4">
{element}
</li>
)
......@@ -48,12 +47,10 @@ class CollectionButton extends Component {
>
{ isAdmin &&
<div className="absolute top right mt2 mr2 hover-child">
<CollectionActions>
<Link to={"/collections/permissions?collectionId=" + id}>
<Icon name="lockoutline" tooltip="Set collection permissions" />
</Link>
<ArchiveCollectionWidget collectionId={id} />
</CollectionActions>
<Link to={"/collections/permissions?collectionId=" + id} className="mr1">
<Icon name="lockoutline" tooltip="Set collection permissions" />
</Link>
<ArchiveCollectionWidget collectionId={id} />
</div>
}
<Icon
......
......@@ -201,7 +201,7 @@ export default class EntityList extends Component {
:
null
}
{ showEntityFilterWidget &&
{ showEntityFilterWidget && entityIds.length > 0 &&
<EntityFilterWidget
section={section}
onChange={onChangeSection}
......
......@@ -73,7 +73,7 @@ export default class QuestionIndex extends Component {
</div>
</div>
{ showCollections &&
<div className="mb2">
<div>
{ collections.length > 0 ?
<CollectionButtons collections={collections} isAdmin={isAdmin} push={push} />
:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment