diff --git a/frontend/src/metabase/questions/collections.js b/frontend/src/metabase/questions/collections.js index cef5b9ba289c7f39261e4123bd2233bca93a6eb5..119f1b28aeb09d46ed5337f10d6e5b1427bab00a 100644 --- a/frontend/src/metabase/questions/collections.js +++ b/frontend/src/metabase/questions/collections.js @@ -1,7 +1,8 @@ import { createAction, createThunkAction, handleActions, combineReducers } from "metabase/lib/redux"; import { reset } from 'redux-form'; -import { goBack } from "react-router-redux"; +import { push } from "react-router-redux"; +import Urls from "metabase/lib/urls"; import _ from "underscore"; @@ -36,7 +37,7 @@ export const saveCollection = createThunkAction(SAVE_COLLECTION, (collection) => if (response.id != null) { dispatch(reset("collection")); } - dispatch(goBack()) + dispatch(push(Urls.collection(response))); return response; } catch (e) { // redux-form expects an object with either { field: error } or { _error: error } diff --git a/frontend/src/metabase/questions/components/CollectionButtons.jsx b/frontend/src/metabase/questions/components/CollectionButtons.jsx index 0fb649942e70e0907200b1260ff5b204ff42dcf4..a27c6f4a61b0b6af4d53f2ad3a2d6dabfaa58d6b 100644 --- a/frontend/src/metabase/questions/components/CollectionButtons.jsx +++ b/frontend/src/metabase/questions/components/CollectionButtons.jsx @@ -29,9 +29,11 @@ class CollectionButton extends Component { } render () { - const { id, name, color, slug, isAdmin, push } = this.props; + const { id, name, color, slug, isAdmin } = this.props; return ( - <div + <Link + to={`/questions/collections/${slug}`} + className="no-decoration" onMouseEnter={() => this.setState({ hovered: true })} onMouseLeave={() => this.setState({ hovered: false })} > @@ -43,7 +45,6 @@ class CollectionButton extends Component { borderRadius: 10, backgroundColor: this.state.hovered ? color : '#fafafa' }} - onClick={() => push(`/questions/collections/${slug}`)} > { isAdmin && <div className="absolute top right mt2 mr2 hover-child"> @@ -61,7 +62,7 @@ class CollectionButton extends Component { /> <h3>{ name }</h3> </div> - </div> + </Link> ) } } diff --git a/frontend/src/metabase/questions/containers/CollectionPage.jsx b/frontend/src/metabase/questions/containers/CollectionPage.jsx index baadede815f1b07028167bee428552accdec4b71..ee97c700ec86fc04e884bee96f934497e819bf16 100644 --- a/frontend/src/metabase/questions/containers/CollectionPage.jsx +++ b/frontend/src/metabase/questions/containers/CollectionPage.jsx @@ -55,6 +55,7 @@ export default class CollectionPage extends Component { </div> <div className="mt4"> <EntityList + defaultEmptyState="No questions have been added to this collection yet." entityType="cards" entityQuery={{ f: "all", collection: params.collectionSlug, ...location.query }} // use replace when changing sections so back button still takes you back to collections page diff --git a/frontend/src/metabase/reference/selectors.js b/frontend/src/metabase/reference/selectors.js index 21bab81b6dc7ef75ac108043c74868abd604cf40..d9b90fad6629dad9e6f03494bcbeb9a0ddc81e69 100644 --- a/frontend/src/metabase/reference/selectors.js +++ b/frontend/src/metabase/reference/selectors.js @@ -45,7 +45,7 @@ const referenceSections = { message: "Metrics will appear here once your admins have created some", image: "/app/img/metrics-list", adminAction: "Learn how to create metrics", - adminLink: "http://www.metabase.com/docs/latest/administration-guide/05-segments-and-metrics.html" + adminLink: "http://www.metabase.com/docs/latest/administration-guide/06-segments-and-metrics.html" }, breadcrumb: "Metrics", // mapping of propname to args of dispatch function @@ -65,7 +65,7 @@ const referenceSections = { message: "Segments will appear here once your admins have created some", image: "/app/img/segments-list", adminAction: "Learn how to create segments", - adminLink: "http://www.metabase.com/docs/latest/administration-guide/05-segments-and-metrics.html" + adminLink: "http://www.metabase.com/docs/latest/administration-guide/06-segments-and-metrics.html" }, breadcrumb: "Segments", fetch: {