-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
258 changed files
with
7,917 additions
and
18,685 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { | ||
SET_SECTION_TABS, | ||
GET_PARENT_FOLDER_DATA, | ||
GET_NAV_ITEMS | ||
} from '~/constants/ActionTypes'; | ||
|
||
|
||
export function setSectionTabs(payload) { | ||
return { | ||
type: SET_SECTION_TABS, | ||
payload: payload, | ||
}; | ||
} | ||
|
||
|
||
export function getParentFolderData(url) { | ||
return { | ||
type: GET_PARENT_FOLDER_DATA, | ||
request: { | ||
op: 'get', | ||
path: `/${url}?fullobjects`, | ||
}, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
import React, { Component } from 'react'; | ||
import { injectIntl } from 'react-intl'; | ||
import PropTypes from 'prop-types'; | ||
import articles from './articles.json' | ||
import { Grid} from 'semantic-ui-react'; | ||
|
||
const items = articles.items | ||
|
||
class Edit extends Component { | ||
/** | ||
* Property types. | ||
* @property {Object} propTypes Property types. | ||
* @static | ||
*/ | ||
static propTypes = { | ||
selected: PropTypes.bool.isRequired, | ||
block: PropTypes.string.isRequired, | ||
index: PropTypes.number.isRequired, | ||
data: PropTypes.objectOf(PropTypes.any).isRequired, | ||
pathname: PropTypes.string.isRequired, | ||
onChangeBlock: PropTypes.func.isRequired, | ||
onSelectBlock: PropTypes.func.isRequired, | ||
onDeleteBlock: PropTypes.func.isRequired, | ||
onFocusPreviousBlock: PropTypes.func.isRequired, | ||
onFocusNextBlock: PropTypes.func.isRequired, | ||
}; | ||
|
||
constructor(props) { | ||
super(props); | ||
this.state = { | ||
list: items | ||
}; | ||
} | ||
|
||
|
||
componentDidMount() { | ||
this.onChangeData() | ||
} | ||
|
||
onChangeData() { | ||
this.props.onChangeBlock(this.props.block, { | ||
...this.props.data, | ||
list: this.state.list, | ||
}); | ||
} | ||
|
||
|
||
|
||
|
||
render() { | ||
return ( | ||
<Grid columns={1}> | ||
<Grid.Column> | ||
{items && | ||
items.map(item => | ||
<div className="article-list-row"> | ||
<img className="article-img" src={item.imgUrl} /> | ||
<Grid.Column> | ||
<p className="article-title"> | ||
{item.title}</p> | ||
<p class="article-date">{item.date}</p> | ||
<p className="article-description">{item.description}</p> | ||
<a className="read-article" target="_blank" href={item.url}> | ||
READ ARTICLE | ||
</a> | ||
</Grid.Column> | ||
</div>) | ||
} | ||
</Grid.Column> | ||
</Grid> | ||
); | ||
} | ||
} | ||
|
||
export default injectIntl(Edit); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/** | ||
* Edit map block. | ||
* @module components/manage/Blocks/Maps/Edit | ||
*/ | ||
|
||
import React, { Component } from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { injectIntl } from 'react-intl'; | ||
import { Grid } from 'semantic-ui-react'; | ||
|
||
class View extends Component { | ||
/** | ||
* Property types. | ||
* @property {Object} propTypes Property types. | ||
* @static | ||
*/ | ||
static propTypes = { | ||
data: PropTypes.objectOf(PropTypes.any).isRequired, | ||
// pathname: PropTypes.string.isRequired, | ||
}; | ||
|
||
render() { | ||
return ( | ||
<Grid columns={1}> | ||
<Grid.Column> | ||
{this.props.data.list && | ||
this.props.data.list.map(item => | ||
<div className="article-list-row"> | ||
<img className="article-img" src={item.imgUrl} /> | ||
<Grid.Column> | ||
<p className="article-title"> | ||
{item.title}</p> | ||
<p class="article-date">{item.date}</p> | ||
<p className="article-description">{item.description}</p> | ||
<a className="read-article" target="_blank" href={item.url}> | ||
READ ARTICLE | ||
</a> | ||
</Grid.Column> | ||
</div>) | ||
} | ||
</Grid.Column> | ||
</Grid> | ||
); | ||
} | ||
} | ||
|
||
export default injectIntl(View); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"items": [ | ||
{ | ||
"id": 0, | ||
"title": "title no 1", | ||
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum", | ||
"date": "3.9.2019", | ||
"imgUrl": "https://readreidread.files.wordpress.com/2011/09/yellow_tree1.jpg?w=998&h=624", | ||
"url": "http://google.com" | ||
}, | ||
{ | ||
"id": 1, | ||
"title": "title no 2", | ||
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.", | ||
"date": "5.10.2019", | ||
"imgUrl": "https://www.mountainphotographer.com/wp-content/uploads/2010/11/201011_freiburgYellowTree.jpg", | ||
"url": "http://google.com" | ||
} | ||
] | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
import React, { Component } from 'react'; | ||
import { injectIntl } from 'react-intl'; | ||
import PropTypes from 'prop-types'; | ||
import { Grid } from 'semantic-ui-react'; | ||
import AddLinkForm from '../DetailedLink/AddLinkForm'; | ||
import { compose } from 'redux'; | ||
import { connect } from 'react-redux'; | ||
import { getParentFolderData } from '~/actions'; | ||
import { Link } from 'react-router-dom'; | ||
import _ from 'lodash' | ||
|
||
|
||
class Edit extends Component { | ||
/** | ||
* Property types. | ||
* @property {Object} propTypes Property types. | ||
* @static | ||
*/ | ||
static propTypes = { | ||
selected: PropTypes.bool.isRequired, | ||
block: PropTypes.string.isRequired, | ||
index: PropTypes.number.isRequired, | ||
data: PropTypes.objectOf(PropTypes.any).isRequired, | ||
pathname: PropTypes.string.isRequired, | ||
onChangeBlock: PropTypes.func.isRequired, | ||
onSelectBlock: PropTypes.func.isRequired, | ||
onDeleteBlock: PropTypes.func.isRequired, | ||
onFocusPreviousBlock: PropTypes.func.isRequired, | ||
onFocusNextBlock: PropTypes.func.isRequired, | ||
}; | ||
|
||
constructor(props) { | ||
super(props); | ||
this.state = { | ||
}; | ||
} | ||
|
||
componentDidUpdate(prevProps) { | ||
if (prevProps.childrenLinks !== this.props.childrenLinks) { | ||
this.onEditData() | ||
} | ||
} | ||
|
||
handleLinkData = (link) => { | ||
this.props.getParentFolderData(link.value) | ||
|
||
} | ||
|
||
onEditData() { | ||
const childrenLinks = this.props.childrenLinks; | ||
this.props.onChangeBlock(this.props.block, { | ||
...this.props.data, | ||
links: childrenLinks, | ||
}); | ||
} | ||
|
||
render() { | ||
|
||
const childrenLinks = this.props.data.links; | ||
|
||
return ( | ||
<Grid columns={1}> | ||
<Grid.Row> | ||
{childrenLinks && | ||
childrenLinks.map(child => | ||
<div className="child-container"> | ||
<Link target="_blank" className="child-link" to={child.url}> | ||
{_.capitalize(child.title)} | ||
</Link> | ||
</div> | ||
) | ||
} | ||
</Grid.Row> | ||
<Grid.Column> | ||
<p className="search-text">Search page</p> | ||
<AddLinkForm onAddLink={this.handleLinkData} /> | ||
</Grid.Column> | ||
</Grid> | ||
); | ||
} | ||
} | ||
|
||
|
||
|
||
const mapDispatchToProps = { | ||
getParentFolderData, | ||
} | ||
|
||
export default compose( | ||
injectIntl, | ||
connect( | ||
state => ({ | ||
state, | ||
childrenLinks: state.parent_folder_data.items | ||
}), | ||
mapDispatchToProps, | ||
) | ||
)(Edit) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/** | ||
* Edit map block. | ||
* @module components/manage/Blocks/Maps/Edit | ||
*/ | ||
|
||
import React, { Component } from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { injectIntl } from 'react-intl'; | ||
import { Grid } from 'semantic-ui-react'; | ||
import { Link } from 'react-router-dom'; | ||
import _ from 'lodash' | ||
|
||
class View extends Component { | ||
/** | ||
* Property types. | ||
* @property {Object} propTypes Property types. | ||
* @static | ||
*/ | ||
static propTypes = { | ||
data: PropTypes.objectOf(PropTypes.any).isRequired, | ||
// pathname: PropTypes.string.isRequired, | ||
}; | ||
|
||
render() { | ||
|
||
const childrenLinks = this.props.data.links | ||
return ( | ||
<div style={{marginBottom:"40px",marginTop:"40px"}}> | ||
<Grid columns={1}> | ||
{childrenLinks && | ||
childrenLinks.map(child => | ||
<div className="child-container"> | ||
<Link target="_blank" className="child-link" to={child.url}> | ||
{_.capitalize(child.title)} | ||
|
||
</Link> | ||
</div> | ||
|
||
) | ||
} | ||
</Grid> | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
export default injectIntl(View); |
Oops, something went wrong.