Skip to content
This repository has been archived by the owner on Oct 1, 2020. It is now read-only.

Commit

Permalink
Merge pull request #625 from CDCgov/reorder-components-v3-bugfix
Browse files Browse the repository at this point in the history
updated order and programs and systems - bug fix
  • Loading branch information
kierk committed Aug 9, 2019
2 parents b1fe639 + b034577 commit 79dda67
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 21 deletions.
33 changes: 17 additions & 16 deletions webpack/components/response_sets/ResponseSetShow.js
Expand Up @@ -283,22 +283,6 @@ export default class ResponseSetShow extends Component {
}} />
</a>
}
{responseSet.questions && responseSet.questions.length > 0 &&
<div className="basic-c-box panel-default">
<div className="panel-heading">
<h2 className="panel-title">Questions</h2>
</div>
<div className="box-content">
<SectionNestedItemList items={this.nestedItemsForPage(responseSet)} currentUser={this.props.currentUser} />
{responseSet.questions.length > 10 &&
<Pagination onChange={this.pageChange} current={this.state.qPage} total={responseSet.questions.length} />
}
</div>
</div>
}
{responseSet.status === 'published' &&
<ProgramsAndSystems item={responseSet} />
}
<div className="basic-c-box panel-default">
<div className="panel-heading">
<h2 className="panel-title">Responses</h2>
Expand All @@ -325,6 +309,23 @@ export default class ResponseSetShow extends Component {
}
</div>
</div>
{responseSet.status === 'published' &&
<ProgramsAndSystems item={responseSet} />
}
{responseSet.questions && responseSet.questions.length > 0 &&
<div className="basic-c-box panel-default">
<div className="panel-heading">
<InfoModal show={this.state.showInfoParentItems} header="Parent Items" body={<p>The parent items window shows how content is being reused across the service. It helps to answer “where is this response set being used?”. The view shows the Questions that the response set is being used on.</p>} hideInfo={()=>this.setState({showInfoParentItems: false})} />
<h2 className="panel-title">Parent Items<Button bsStyle='link' style={{ padding: 3 }} onClick={() => this.setState({showInfoParentItems: true})}><i className="fa fa-info-circle" aria-hidden="true"></i><text className="sr-only">Click for info about this item (Parent Items InfoButton)</text></Button></h2>
</div>
<div className="box-content">
<SectionNestedItemList items={this.nestedItemsForPage(responseSet)} currentUser={this.props.currentUser} />
{responseSet.questions.length > 10 &&
<Pagination onChange={this.pageChange} current={this.state.qPage} total={responseSet.questions.length} />
}
</div>
</div>
}
<ul className="nav nav-tabs" role="tablist">
<li id="main-content-tab" className="nav-item active" role="tab" onClick={() => this.setState({selectedTab: 'main'})} aria-selected={this.state.selectedTab === 'main'} aria-controls="main">
<a className="nav-link" data-toggle="tab" href="#main-content" role="tab">Information</a>
Expand Down
10 changes: 5 additions & 5 deletions webpack/components/surveys/SurveyShow.js
Expand Up @@ -439,7 +439,7 @@ class SurveyShow extends Component {
</div>
}
<div className="details-border">
<strong>Surveillance Program: </strong> {this.surveillanceProgram()}
<strong>Surveillance Program</strong>{this.surveillanceProgram()}
</div>
<InfoModal show={this.state.showInfoOMBControlNumber} header="OMB Control Number" body={<p>Provides the OMB Control Number associated with the data collection instrument (if applicable).<br /> <br />This attribute is optional but completion allows other users to find vocabulary that has been used on an OMB-approved data collection instrument. Reuse of vocabulary that has been part of one or more OMB approved Paperwork Reduction Act (PRA) packages in the past can help expedite the review process. There is an advanced search filter that is based off of this attribute.</p>} hideInfo={()=>this.setState({showInfoOMBControlNumber: false})} />
{ this.props.survey.controlNumber &&
Expand Down Expand Up @@ -475,10 +475,10 @@ class SurveyShow extends Component {
</div>
}
<div className="details-border">
<strong>Surveillance System: </strong> {this.surveillanceSystem()}
<strong>Surveillance System</strong>{this.surveillanceSystem()}
</div>
<div className="details-border">
<strong>OMB Approval Date: </strong>{this.props.survey.ombApprovalDate}
<strong>OMB Approval Date: </strong> {this.props.survey.ombApprovalDate}
</div>
{ this.props.survey.status === 'published' && this.props.survey.publishedBy && this.props.survey.publishedBy.email &&
<div className="details-border">
Expand All @@ -504,15 +504,15 @@ class SurveyShow extends Component {

surveillanceSystem() {
if (this.props.survey.surveillanceSystem) {
return <p className="maincontent-item-info">Surveillance System{<Button bsStyle='link' style={{ padding: 3 }} onClick={() => this.setState({showInfoSurveillanceSystem: true})}><i className="fa fa-info-circle" aria-hidden="true"></i><text className="sr-only">Click for info about this item (Surveillance System)</text></Button>}: {this.props.survey.surveillanceSystem.name}</p>;
return <text><Button bsStyle='link' style={{ padding: 1 }} onClick={() => this.setState({showInfoSurveillanceSystem: true})}><i className="fa fa-info-circle" aria-hidden="true"></i><text className="sr-only">Click for info about this item (Surveillance System)</text></Button>: {this.props.survey.surveillanceSystem.name}</text>;
} else {
return "";
}
}

surveillanceProgram() {
if (this.props.survey.surveillanceProgram) {
return <p className="maincontent-item-info">Surveillance Program{<Button bsStyle='link' style={{ padding: 3 }} onClick={() => this.setState({showInfoSurveillanceProgram: true})}><i className="fa fa-info-circle" aria-hidden="true"></i><text className="sr-only">Click for info about this item (Surveillance Program)</text></Button>}: {this.props.survey.surveillanceProgram.name}</p>;
return <text><Button bsStyle='link' style={{ padding: 1 }} onClick={() => this.setState({showInfoSurveillanceProgram: true})}><i className="fa fa-info-circle" aria-hidden="true"></i><text className="sr-only">Click for info about this item (Surveillance Program)</text></Button>: {this.props.survey.surveillanceProgram.name}</text>;
} else {
return "";
}
Expand Down

0 comments on commit 79dda67

Please sign in to comment.