Render actions in EntitiesView
authorFrank Bessou <frank.bessou@logilab.fr>
Tue, 04 Apr 2017 17:00:42 +0200
changeset 79 1070e0148bd8
parent 78 9463a36b693b
child 80 225e9a1e59d6
Render actions in EntitiesView
src/components/Entities.js
--- a/src/components/Entities.js	Tue Apr 04 16:45:05 2017 +0200
+++ b/src/components/Entities.js	Tue Apr 04 17:00:42 2017 +0200
@@ -1,6 +1,6 @@
 import React from 'react';
 import {isEmpty} from 'lodash/lang';
-import {ListView} from './BaseViews';
+import {ActionsDropDown, ListView} from './BaseViews';
 import Api from '../Api';
 import {PropTypesEntitiesModel} from '../model';
 
@@ -32,6 +32,11 @@
 };
 
 function EntitiesView(props) {
+
+    function renderActions() {
+        return <ActionsDropDown target={props.entities} />;
+    }
+
     function renderTitle() {
         return props.entities.data.links('collection')[0].title;
     }
@@ -48,6 +53,8 @@
 
     return (
         <div>
+            { renderActions() }
+            <div className="clearfix" />
             <h3>{ renderTitle() }</h3>
             { renderEntities() }
         </div>