Skip to content

Commit

Permalink
Merge pull request #2071 from akvo/#1966-results-frontend
Browse files Browse the repository at this point in the history
[#1966] Editor headings fix and project page link fixed
  • Loading branch information
KasperBrandt committed Mar 31, 2016
2 parents 276100a + 24f65b4 commit 6d623df
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 24 deletions.
38 changes: 28 additions & 10 deletions akvo/rsr/static/scripts-src/my-results.js
Original file line number Diff line number Diff line change
Expand Up @@ -1504,11 +1504,20 @@ function initReact() {
for (var parProjectId in result.parent_project) {
if (result.parent_project.hasOwnProperty(parProjectId)) {
var parProjectTitle = result.parent_project[parProjectId];
var parNode = React.DOM.div( {className:"indicator-period-list parentProject"},
React.DOM.span( {className:"relatedInfo"},
i18nResults.parent_project,": ", React.DOM.a( {href:language + "/myrsr/results/" + parProjectId + "/"}, parProjectTitle)
)
);
var parNode;
if (isPublic) {
parNode = React.DOM.div( {className:"indicator-period-list parentProject"},
React.DOM.span( {className:"relatedInfo"},
i18nResults.parent_project,": ", React.DOM.a( {href:language + "/project/" + parProjectId + "/#results"}, parProjectTitle)
)
);
} else {
parNode = React.DOM.div( {className:"indicator-period-list parentProject"},
React.DOM.span( {className:"relatedInfo"},
i18nResults.parent_project,": ", React.DOM.a( {href:language + "/myrsr/results/" + parProjectId + "/"}, parProjectTitle)
)
);
}
parentsAndChildren.push(parNode);
}
}
Expand All @@ -1517,11 +1526,20 @@ function initReact() {
for (var childProjectId in result.child_projects) {
if (result.child_projects.hasOwnProperty(childProjectId)) {
var childProjectTitle = result.child_projects[childProjectId];
var childNode = React.DOM.div( {className:"indicator-period-list childProject"},
React.DOM.span( {className:"relatedInfo"},
i18nResults.child_project,": ", React.DOM.a( {href:language + "/myrsr/results/" + childProjectId + "/"}, childProjectTitle)
)
);
var childNode;
if (isPublic) {
childNode = React.DOM.div( {className:"indicator-period-list childProject"},
React.DOM.span( {className:"relatedInfo"},
i18nResults.child_project,": ", React.DOM.a( {href:language + "/project/" + childProjectId + "/#results"}, childProjectTitle)
)
);
} else {
childNode = React.DOM.div( {className:"indicator-period-list childProject"},
React.DOM.span( {className:"relatedInfo"},
i18nResults.child_project,": ", React.DOM.a( {href:language + "/myrsr/results/" + childProjectId + "/"}, childProjectTitle)
)
);
}
parentsAndChildren.push(childNode);
}
}
Expand Down
38 changes: 28 additions & 10 deletions akvo/rsr/static/scripts-src/my-results.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -1504,11 +1504,20 @@ function initReact() {
for (var parProjectId in result.parent_project) {
if (result.parent_project.hasOwnProperty(parProjectId)) {
var parProjectTitle = result.parent_project[parProjectId];
var parNode = <div className="indicator-period-list parentProject">
<span className="relatedInfo">
{i18nResults.parent_project}: <a href={language + "/myrsr/results/" + parProjectId + "/"}>{parProjectTitle}</a>
</span>
</div>;
var parNode;
if (isPublic) {
parNode = <div className="indicator-period-list parentProject">
<span className="relatedInfo">
{i18nResults.parent_project}: <a href={language + "/project/" + parProjectId + "/#results"}>{parProjectTitle}</a>
</span>
</div>;
} else {
parNode = <div className="indicator-period-list parentProject">
<span className="relatedInfo">
{i18nResults.parent_project}: <a href={language + "/myrsr/results/" + parProjectId + "/"}>{parProjectTitle}</a>
</span>
</div>;
}
parentsAndChildren.push(parNode);
}
}
Expand All @@ -1517,11 +1526,20 @@ function initReact() {
for (var childProjectId in result.child_projects) {
if (result.child_projects.hasOwnProperty(childProjectId)) {
var childProjectTitle = result.child_projects[childProjectId];
var childNode = <div className="indicator-period-list childProject">
<span className="relatedInfo">
{i18nResults.child_project}: <a href={language + "/myrsr/results/" + childProjectId + "/"}>{childProjectTitle}</a>
</span>
</div>;
var childNode;
if (isPublic) {
childNode = <div className="indicator-period-list childProject">
<span className="relatedInfo">
{i18nResults.child_project}: <a href={language + "/project/" + childProjectId + "/#results"}>{childProjectTitle}</a>
</span>
</div>;
} else {
childNode = <div className="indicator-period-list childProject">
<span className="relatedInfo">
{i18nResults.child_project}: <a href={language + "/myrsr/results/" + childProjectId + "/"}>{childProjectTitle}</a>
</span>
</div>;
}
parentsAndChildren.push(childNode);
}
}
Expand Down
8 changes: 5 additions & 3 deletions akvo/rsr/static/styles-src/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -2054,7 +2054,8 @@ body.translationBarActive div.skiptranslate ~ #map {

.formProgress .panel-heading {
cursor: pointer;
transition: background 0.1s linear; }
transition: background 0.1s linear;
padding: 0 15px 15px 15px; }
.formProgress .panel-heading:hover {
background: rgba(92, 184, 92, 0.1); }

Expand Down Expand Up @@ -2087,7 +2088,8 @@ body.translationBarActive div.skiptranslate ~ #map {

.formOverviewInfo .panel-heading {
cursor: pointer;
transition: background 0.1s linear; }
transition: background 0.1s linear;
padding: 0 15px 15px 15px; }
.formOverviewInfo .panel-heading:hover {
background: rgba(114, 205, 255, 0.1); }

Expand Down Expand Up @@ -2151,7 +2153,7 @@ body.translationBarActive div.skiptranslate ~ #map {
.projectEdit .formStep .section-progress {
position: absolute;
width: 30%;
top: 15px;
top: 20px;
right: 5px; }
.projectEdit .formStep form {
padding-top: 10px; }
Expand Down
4 changes: 3 additions & 1 deletion akvo/rsr/static/styles-src/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2547,6 +2547,7 @@ body {
.panel-heading {
cursor: pointer;
transition: background 0.1s linear;
padding: 0 15px 15px 15px;
&:hover {
background: rgba($progressSuccess, 0.1);
}
Expand Down Expand Up @@ -2588,6 +2589,7 @@ body {
.panel-heading {
cursor: pointer;
transition: background 0.1s linear;
padding: 0 15px 15px 15px;
&:hover {
background: rgba($rsrBlue2, 0.1);
}
Expand Down Expand Up @@ -2656,7 +2658,7 @@ body {
.section-progress {
position: absolute;
width: 30%;
top: 15px;
top: 20px;
right: 5px;
}
form {
Expand Down

0 comments on commit 6d623df

Please sign in to comment.