2019-10-20 18:02:52 +02:00
|
|
|
import React from "react";
|
2019-10-23 15:47:08 +02:00
|
|
|
import { WithTranslation, withTranslation } from "react-i18next";
|
2019-10-20 18:02:52 +02:00
|
|
|
import { Repository } from "@scm-manager/ui-types";
|
|
|
|
|
import { MailLink, DateFromNow } from "@scm-manager/ui-components";
|
2019-04-16 15:16:36 +02:00
|
|
|
|
2019-10-23 15:47:08 +02:00
|
|
|
type Props = WithTranslation & {
|
2019-10-19 16:38:07 +02:00
|
|
|
repository: Repository;
|
2019-04-16 15:16:36 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class RepositoryDetailTable extends React.Component<Props> {
|
|
|
|
|
render() {
|
|
|
|
|
const { repository, t } = this.props;
|
|
|
|
|
return (
|
|
|
|
|
<table className="table">
|
|
|
|
|
<tbody>
|
|
|
|
|
<tr>
|
2019-10-20 18:02:52 +02:00
|
|
|
<th>{t("repository.name")}</th>
|
2019-04-16 15:16:36 +02:00
|
|
|
<td>{repository.name}</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
2019-10-20 18:02:52 +02:00
|
|
|
<th>{t("repository.type")}</th>
|
2019-04-16 15:16:36 +02:00
|
|
|
<td>{repository.type}</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
2019-10-20 18:02:52 +02:00
|
|
|
<th>{t("repository.contact")}</th>
|
2019-04-16 15:16:36 +02:00
|
|
|
<td>
|
|
|
|
|
<MailLink address={repository.contact} />
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
2019-10-20 18:02:52 +02:00
|
|
|
<th>{t("repository.description")}</th>
|
2019-04-16 15:16:36 +02:00
|
|
|
<td>{repository.description}</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
2019-10-20 18:02:52 +02:00
|
|
|
<th>{t("repository.creationDate")}</th>
|
2019-04-16 15:16:36 +02:00
|
|
|
<td>
|
|
|
|
|
<DateFromNow date={repository.creationDate} />
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
2019-10-20 18:02:52 +02:00
|
|
|
<th>{t("repository.lastModified")}</th>
|
2019-04-16 15:16:36 +02:00
|
|
|
<td>
|
|
|
|
|
<DateFromNow date={repository.lastModified} />
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2019-10-23 15:47:08 +02:00
|
|
|
export default withTranslation("repos")(RepositoryDetailTable);
|