diff --git a/scm-ui/public/locales/en/repos.json b/scm-ui/public/locales/en/repos.json index d4fd950c45..509c0f5565 100644 --- a/scm-ui/public/locales/en/repos.json +++ b/scm-ui/public/locales/en/repos.json @@ -55,7 +55,13 @@ "branch": "Branch" }, "content": { - "downloadButton": "Download" + "historyLink": "History", + "downloadButton": "Download", + "path": "Path", + "branch": "Branch", + "lastModified": "Last modified", + "description": "Description", + "size": "Size" } }, "changesets": { diff --git a/scm-ui/src/repos/sources/containers/Content.js b/scm-ui/src/repos/sources/containers/Content.js index 0b764aa6a1..a03d801f55 100644 --- a/scm-ui/src/repos/sources/containers/Content.js +++ b/scm-ui/src/repos/sources/containers/Content.js @@ -2,11 +2,11 @@ import React from "react"; import { translate } from "react-i18next"; import { getSources } from "../modules/sources"; -import type { Repository, File } from "@scm-manager/ui-types"; +import type { File, Repository } from "@scm-manager/ui-types"; import { + DateFromNow, ErrorNotification, - Loading, - DateFromNow + Loading } from "@scm-manager/ui-components"; import { connect } from "react-redux"; import ImageViewer from "../components/content/ImageViewer"; @@ -87,10 +87,9 @@ class Content extends React.Component { }; showHeader() { - const { file, classes } = this.props; + const { file, classes, t } = this.props; const collapsed = this.state.collapsed; const icon = collapsed ? "fa-angle-right" : "fa-angle-down"; - const fileSize = file.directory ? "" : ; return ( @@ -101,7 +100,11 @@ class Content extends React.Component {
{file.name}
-

{fileSize}

+

+ + {t("sources.content.historyLink")} + +

); @@ -109,7 +112,7 @@ class Content extends React.Component { showMoreInformation() { const collapsed = this.state.collapsed; - const { classes, file, revision } = this.props; + const { classes, file, revision, t } = this.props; const date = ; const description = file.description ? (

@@ -123,25 +126,30 @@ class Content extends React.Component { })}

) : null; + const fileSize = file.directory ? "" : ; if (!collapsed) { return (
- + - + - + + + + + - +
Path{t("sources.content.path")} {file.path}
Branch{t("sources.content.branch")} {revision}
Last modified{t("sources.content.size")}{fileSize}
{t("sources.content.lastModified")} {date}
Description{t("sources.content.description")} {description}