|
@@ -2,7 +2,7 @@ import React from 'react'
|
2
|
2
|
import { translate } from 'react-i18next'
|
3
|
3
|
import PropTypes from 'prop-types'
|
4
|
4
|
import classnames from 'classnames'
|
5
|
|
-// import FileItem from './FileItem.jsx'
|
|
5
|
+import FileItem from './FileItem.jsx'
|
6
|
6
|
import PopupExtandedAction from '../../container/PopupExtandedAction.jsx'
|
7
|
7
|
|
8
|
8
|
class Folder extends React.Component {
|
|
@@ -39,12 +39,13 @@ class Folder extends React.Component {
|
39
|
39
|
|
40
|
40
|
render () {
|
41
|
41
|
const {
|
42
|
|
- // app,
|
|
42
|
+ app,
|
43
|
43
|
folderData,
|
44
|
|
- // onClickItem,
|
45
|
|
- // onClickFolder,
|
|
44
|
+ onClickItem,
|
|
45
|
+ onClickFolder,
|
46
|
46
|
isLast,
|
47
|
|
- t } = this.props
|
|
47
|
+ t
|
|
48
|
+ } = this.props
|
48
|
49
|
|
49
|
50
|
return (
|
50
|
51
|
<div className={classnames('folder', {'active': this.state.open, 'item-last': isLast})}>
|
|
@@ -68,13 +69,12 @@ class Folder extends React.Component {
|
68
|
69
|
|
69
|
70
|
<div className='folder__header__name__button d-flex align-items-center '>
|
70
|
71
|
|
71
|
|
- {this.state.openExtandedAction === false &&
|
72
|
|
- <div>
|
73
|
|
- <div className='folder__header__name__button__advancedbtn btn btn-outline-primary d-none d-md-block' onClick={this.handleClickToggleExtandedAction}>
|
74
|
|
- <i className='fa fa-fw fa-ellipsis-h' />
|
75
|
|
- </div>
|
76
|
|
- </div>
|
77
|
|
- }
|
|
72
|
+ <div
|
|
73
|
+ className='folder__header__name__button__advancedbtn btn btn-outline-primary d-none d-md-block'
|
|
74
|
+ onClick={this.handleClickToggleExtandedAction}
|
|
75
|
+ >
|
|
76
|
+ <i className='fa fa-fw fa-ellipsis-h' />
|
|
77
|
+ </div>
|
78
|
78
|
|
79
|
79
|
{this.state.openExtandedAction === true &&
|
80
|
80
|
<PopupExtandedAction
|
|
@@ -87,6 +87,7 @@ class Folder extends React.Component {
|
87
|
87
|
<button className='addbtn__text btn btn-outline-primary dropdown-toggle' type='button' id='dropdownMenuButton' data-toggle='dropdown' aria-haspopup='true' aria-expanded='false'>
|
88
|
88
|
{t('Folder.create')} ...
|
89
|
89
|
</button>
|
|
90
|
+
|
90
|
91
|
<div className='addbtn__subdropdown dropdown-menu' aria-labelledby='dropdownMenuButton'>
|
91
|
92
|
<div className='subdropdown__link dropdown-item'>
|
92
|
93
|
<div className='subdropdown__link__folder d-flex align-items-center'>
|
|
@@ -164,8 +165,10 @@ class Folder extends React.Component {
|
164
|
165
|
</div>
|
165
|
166
|
</div>
|
166
|
167
|
</div>
|
|
168
|
+ </div>
|
167
|
169
|
|
168
|
|
- {/* <div className='col-5 col-sm-5 col-md-5 col-lg-4 col-xl-3 d-none'>
|
|
170
|
+ {/*
|
|
171
|
+ <div className='col-5 col-sm-5 col-md-5 col-lg-4 col-xl-3 d-none'>
|
169
|
172
|
<div className='folder__header__contenttype d-none d-sm-flex'>
|
170
|
173
|
<div className='folder__header__contenttype__text d-none d-lg-flex'>
|
171
|
174
|
{t('Folder.content_type')} :
|
|
@@ -175,7 +178,7 @@ class Folder extends React.Component {
|
175
|
178
|
</div>
|
176
|
179
|
</div>
|
177
|
180
|
</div>
|
178
|
|
- </div>
|
|
181
|
+ */}
|
179
|
182
|
|
180
|
183
|
<div className='folder__content'>
|
181
|
184
|
{ folderData.content.map((c, i) => c.type === 'folder'
|
|
@@ -197,7 +200,7 @@ class Folder extends React.Component {
|
197
|
200
|
isLast={isLast && i === folderData.content.length - 1}
|
198
|
201
|
key={c.id}
|
199
|
202
|
/>
|
200
|
|
- )} */}
|
|
203
|
+ )}
|
201
|
204
|
</div>
|
202
|
205
|
</div>
|
203
|
206
|
)
|
|
@@ -211,8 +214,8 @@ Folder.propTypes = {
|
211
|
214
|
title: PropTypes.string.isRequired,
|
212
|
215
|
content: PropTypes.array
|
213
|
216
|
}),
|
214
|
|
- // app: PropTypes.object,
|
215
|
|
- // onClickItem: PropTypes.func.isRequired,
|
216
|
|
- // onClickFolder: PropTypes.func.isRequired,
|
|
217
|
+ app: PropTypes.object,
|
|
218
|
+ onClickItem: PropTypes.func.isRequired,
|
|
219
|
+ onClickFolder: PropTypes.func.isRequired,
|
217
|
220
|
isLast: PropTypes.bool.isRequired
|
218
|
221
|
}
|