diff --git a/example/config.yml b/example/config.yml
index 9f45f06d..a930e59b 100644
--- a/example/config.yml
+++ b/example/config.yml
@@ -17,7 +17,7 @@ collections: # A list of collections the CMS should be able to edit
meta:
- {label: "Publish Date", name: "date", widget: "datetime", format: "YYYY-MM-DD hh:mma"}
- {label: "SEO Description", name: "description", widget: "text"}
- card: {type: "media", media: "image", text: "title"}
+ card: {type: "image", image: "image", text: "title"}
- name: "faq" # Used in routes, ie.: /admin/collections/:slug/edit
label: "FAQ" # Used in the UI, ie.: "New Post"
diff --git a/src/components/Cards.js b/src/components/Cards.js
index ba455280..ab903e2b 100644
--- a/src/components/Cards.js
+++ b/src/components/Cards.js
@@ -1,10 +1,10 @@
import UnknownCard from './Cards/UnknownCard';
-import MediaCard from './Cards/MediaCard';
+import ImageCard from './Cards/ImageCard';
import AlltypeCard from './Cards/AlltypeCard';
const Cards = {
_unknown: UnknownCard,
- media: MediaCard,
+ image: ImageCard,
alltype: AlltypeCard
};
diff --git a/src/components/Cards/ImageCard.js b/src/components/Cards/ImageCard.js
new file mode 100644
index 00000000..001bf391
--- /dev/null
+++ b/src/components/Cards/ImageCard.js
@@ -0,0 +1,22 @@
+import React, { PropTypes } from 'react';
+import { Card } from '../UI';
+
+export default function ImageCard({ onClick, image, text }) {
+ return (
+
+
+ {text}
+
+ );
+}
+
+ImageCard.propTypes = {
+ image: PropTypes.string.isRequired,
+
+ onClick: PropTypes.func,
+ text: PropTypes.string.isRequired
+};
+
+ImageCard.defaultProps = {
+ onClick: function() {},
+};
diff --git a/src/components/Cards/MediaCard.js b/src/components/Cards/MediaCard.js
deleted file mode 100644
index fbb10e49..00000000
--- a/src/components/Cards/MediaCard.js
+++ /dev/null
@@ -1,16 +0,0 @@
-import React, { PropTypes } from 'react';
-import { Card } from '../UI';
-
-export default function MediaCard({ onClick, media, text }) {
- return (
-
-
- {text}
-
- );
-}
-
-MediaCard.propTypes = {
- media: PropTypes.string.isRequired,
- text: PropTypes.string.isRequired
-};
diff --git a/src/components/EntryListing.js b/src/components/EntryListing.js
index d45378ea..beed5b30 100644
--- a/src/components/EntryListing.js
+++ b/src/components/EntryListing.js
@@ -58,7 +58,7 @@ export default class EntryListing extends React.Component {
collection: collection,
onClick: browserHistory.push.bind(this, link),
text: entry.getIn(['data', collection.getIn(['card', 'text'])]),
- media: entry.getIn(['data', collection.getIn(['card', 'media'])]),
+ image: entry.getIn(['data', collection.getIn(['card', 'image'])]),
});
}
@@ -67,7 +67,7 @@ export default class EntryListing extends React.Component {
const name = collection.get('name');
return
-
Listing entries!
+
Listing {name}
this._entries = c}>
{entries.map((entry) => {
const path = `/collections/${name}/entries/${entry.get('slug')}`;
diff --git a/src/containers/CollectionPage.js b/src/containers/CollectionPage.js
index 8d8b12b4..d7e43ea9 100644
--- a/src/containers/CollectionPage.js
+++ b/src/containers/CollectionPage.js
@@ -30,13 +30,6 @@ class DashboardPage extends React.Component {
return
Dashboard
-
- {collections.map((collection) => (
-
- {collection.get('name')}
-
- )).toArray()}
-
{entries ? : 'Loading entries...'}