2016-10-28 22:39:34 +00:00
|
|
|
import * as React from "react";
|
|
|
|
|
2016-11-29 20:57:53 +00:00
|
|
|
interface IBody {
|
2016-12-07 08:15:21 +00:00
|
|
|
description: string,
|
|
|
|
api: Object
|
2016-11-10 19:30:47 +00:00
|
|
|
}
|
|
|
|
|
2016-11-29 20:57:53 +00:00
|
|
|
/**
|
|
|
|
* The Component for the main body of the repo page
|
|
|
|
* @param {string} description - The description of the repository
|
2016-12-07 08:15:21 +00:00
|
|
|
* @param {object} api - The ApiService injected from Angular
|
2016-11-29 20:57:53 +00:00
|
|
|
*/
|
|
|
|
class body extends React.Component<IBody, {}> {
|
2016-11-10 19:30:47 +00:00
|
|
|
static propTypes = {
|
|
|
|
description: React.PropTypes.string.isRequired,
|
2016-12-07 08:15:21 +00:00
|
|
|
api: React.PropTypes.object.isRequired
|
2016-11-10 19:30:47 +00:00
|
|
|
}
|
2016-10-28 22:39:34 +00:00
|
|
|
render () {
|
2016-11-29 20:57:53 +00:00
|
|
|
let description: string = this.props.description;
|
2016-12-06 01:29:40 +00:00
|
|
|
if (description === null || description === "") {
|
2016-11-29 20:57:53 +00:00
|
|
|
description = "No Description";
|
|
|
|
}
|
2016-11-10 19:30:47 +00:00
|
|
|
return(
|
|
|
|
<div>
|
|
|
|
<ul className="nav nav-tabs rp-tabs">
|
2016-12-06 01:29:40 +00:00
|
|
|
<li className="active">
|
|
|
|
<a data-target="#tab1" data-toggle="tab">Description</a>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<a data-target="#tab2" data-toggle="tab">Automated Builds</a>
|
|
|
|
</li>
|
2016-11-10 19:30:47 +00:00
|
|
|
</ul>
|
|
|
|
<div className="panel-body rp-panelBody">
|
|
|
|
<div className="tab-content">
|
|
|
|
<div className="tab-pane in active" id="tab1">
|
2016-11-29 20:57:53 +00:00
|
|
|
<div className="rp-description">{description}</div>
|
2016-11-10 19:30:47 +00:00
|
|
|
</div>
|
|
|
|
<div className="tab-pane" id="tab2">
|
2016-12-07 08:15:21 +00:00
|
|
|
<h3 className="tab-header">Repository Builds</h3>
|
2016-11-10 19:30:47 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
2016-10-28 22:39:34 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-10-31 20:21:45 +00:00
|
|
|
export default body;
|
2016-10-28 22:39:34 +00:00
|
|
|
|