Skip to content

Commit

Permalink
[#1264] Added goals overview
Browse files Browse the repository at this point in the history
  • Loading branch information
KasperBrandt committed Mar 2, 2015
1 parent 342a4fe commit d69595a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
8 changes: 7 additions & 1 deletion akvo/rsr/static/rsr/v3/js/src/react-project-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,20 @@ var AccordionInstance = React.createClass({displayName: 'AccordionInstance',
} else {
sustainability = null;
}
if (this.props.source.goals_overview != "") {
goals_overview = Panel( {className:"goals_overview", header:"Goals overview", key:'goals_overview'}, this.props.source.goals_overview);
} else {
goals_overview = null;
}

return (
Accordion(null,
background,
current_status,
project_plan,
target_group,
sustainability
sustainability,
goals_overview
)
);
}
Expand Down
6 changes: 6 additions & 0 deletions akvo/rsr/static/rsr/v3/js/src/react-project-main.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ var AccordionInstance = React.createClass({
} else {
sustainability = null;
}
if (this.props.source.goals_overview != "") {
goals_overview = <Panel className="goals_overview" header="Goals overview" key={'goals_overview'}>{this.props.source.goals_overview}</Panel>;
} else {
goals_overview = null;
}

return (
<Accordion>
Expand All @@ -41,6 +46,7 @@ var AccordionInstance = React.createClass({
{project_plan}
{target_group}
{sustainability}
{goals_overview}
</Accordion>
);
}
Expand Down
1 change: 1 addition & 0 deletions akvo/rsr/views/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def _get_accordion_data(project):
accordion_data['project_plan'] = project.project_plan
accordion_data['target_group'] = project.target_group
accordion_data['sustainability'] = project.sustainability
accordion_data['goals_overview'] = project.goals_overview
return accordion_data


Expand Down

0 comments on commit d69595a

Please sign in to comment.