From d69595a19128f4cfdfba6abbc6a600f34d42ff9d Mon Sep 17 00:00:00 2001 From: Kasper Brandt Date: Mon, 2 Mar 2015 09:55:21 +0100 Subject: [PATCH] [#1264] Added goals overview --- akvo/rsr/static/rsr/v3/js/src/react-project-main.js | 8 +++++++- akvo/rsr/static/rsr/v3/js/src/react-project-main.jsx | 6 ++++++ akvo/rsr/views/project.py | 1 + 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/akvo/rsr/static/rsr/v3/js/src/react-project-main.js b/akvo/rsr/static/rsr/v3/js/src/react-project-main.js index 19c1955a3b..351634e1aa 100755 --- a/akvo/rsr/static/rsr/v3/js/src/react-project-main.js +++ b/akvo/rsr/static/rsr/v3/js/src/react-project-main.js @@ -33,6 +33,11 @@ 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, @@ -40,7 +45,8 @@ var AccordionInstance = React.createClass({displayName: 'AccordionInstance', current_status, project_plan, target_group, - sustainability + sustainability, + goals_overview ) ); } diff --git a/akvo/rsr/static/rsr/v3/js/src/react-project-main.jsx b/akvo/rsr/static/rsr/v3/js/src/react-project-main.jsx index e4d39b4e75..521b4190e9 100755 --- a/akvo/rsr/static/rsr/v3/js/src/react-project-main.jsx +++ b/akvo/rsr/static/rsr/v3/js/src/react-project-main.jsx @@ -33,6 +33,11 @@ var AccordionInstance = React.createClass({ } else { sustainability = null; } + if (this.props.source.goals_overview != "") { + goals_overview = {this.props.source.goals_overview}; + } else { + goals_overview = null; + } return ( @@ -41,6 +46,7 @@ var AccordionInstance = React.createClass({ {project_plan} {target_group} {sustainability} + {goals_overview} ); } diff --git a/akvo/rsr/views/project.py b/akvo/rsr/views/project.py index cbb9f88902..78b95bd58a 100644 --- a/akvo/rsr/views/project.py +++ b/akvo/rsr/views/project.py @@ -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