diff --git a/CHANGELOG.md b/CHANGELOG.md
index 593cf53ac4..2ede975c00 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## Unreleased
+### Added
+- Add tooltips to short links on repository overview ([#1441](https://github.com/scm-manager/scm-manager/pull/1441))
+
## [2.10.1] - 2020-11-24
### Fixed
- Improved logging of failures during plugin installation ([#1442](https://github.com/scm-manager/scm-manager/pull/1442))
diff --git a/docs/de/user/repo/assets/repository-overview.png b/docs/de/user/repo/assets/repository-overview.png
index 59cf55e4d2..2454f625a3 100644
Binary files a/docs/de/user/repo/assets/repository-overview.png and b/docs/de/user/repo/assets/repository-overview.png differ
diff --git a/docs/en/user/repo/assets/repository-overview.png b/docs/en/user/repo/assets/repository-overview.png
index 59cf55e4d2..7e6bfcbab7 100644
Binary files a/docs/en/user/repo/assets/repository-overview.png and b/docs/en/user/repo/assets/repository-overview.png differ
diff --git a/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap b/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap
index f2fd0d93d8..eb97f1ef92 100644
--- a/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap
+++ b/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap
@@ -50439,36 +50439,70 @@ exports[`Storyshots RepositoryEntry Avatar EP 1`] = `
href="/repo/hitchhiker/heartOfGold/branches/"
onClick={[Function]}
>
-
+
+
+
+
+
+
+
+
-
+
+
+
-
+
+
+
-
+
+
+
{
};
renderBranchesLink = (repository: Repository, repositoryLink: string) => {
+ const { t } = this.props;
if (repository._links["branches"]) {
- return
;
+ return (
+
+ );
+ }
+ return null;
+ };
+
+ renderTagsLink = (repository: Repository, repositoryLink: string) => {
+ const { t } = this.props;
+ if (repository._links["tags"]) {
+ return (
+
+ );
}
return null;
};
renderChangesetsLink = (repository: Repository, repositoryLink: string) => {
+ const { t } = this.props;
if (repository._links["changesets"]) {
- return
;
+ return (
+
+ );
}
return null;
};
renderSourcesLink = (repository: Repository, repositoryLink: string) => {
+ const { t } = this.props;
if (repository._links["sources"]) {
- return
;
+ return (
+
+ );
}
return null;
};
renderModifyLink = (repository: Repository, repositoryLink: string) => {
+ const { t } = this.props;
if (repository._links["update"]) {
- return
;
+ return (
+
+ );
}
return null;
};
@@ -74,6 +113,7 @@ class RepositoryEntry extends React.Component
{
return (
<>
{this.renderBranchesLink(repository, repositoryLink)}
+ {this.renderTagsLink(repository, repositoryLink)}
{this.renderChangesetsLink(repository, repositoryLink)}
{this.renderSourcesLink(repository, repositoryLink)}
@@ -118,4 +158,4 @@ class RepositoryEntry extends React.Component {
}
}
-export default RepositoryEntry;
+export default withTranslation("repos")(RepositoryEntry);
diff --git a/scm-ui/ui-components/src/repos/RepositoryEntryLink.tsx b/scm-ui/ui-components/src/repos/RepositoryEntryLink.tsx
index f52859c15e..a0adaba7a1 100644
--- a/scm-ui/ui-components/src/repos/RepositoryEntryLink.tsx
+++ b/scm-ui/ui-components/src/repos/RepositoryEntryLink.tsx
@@ -25,10 +25,12 @@ import React from "react";
import { Link } from "react-router-dom";
import styled from "styled-components";
import { Icon } from "@scm-manager/ui-components";
+import Tooltip from "../Tooltip";
type Props = {
to: string;
icon: string;
+ tooltip?: string;
};
const PointerEventsLink = styled(Link)`
@@ -37,10 +39,20 @@ const PointerEventsLink = styled(Link)`
class RepositoryEntryLink extends React.Component {
render() {
- const { to, icon } = this.props;
+ const { to, icon, tooltip } = this.props;
+
+ let content = ;
+ if (tooltip) {
+ content = (
+
+ {content}
+
+ );
+ }
+
return (
-
+ {content}
);
}
diff --git a/scm-ui/ui-webapp/public/locales/de/repos.json b/scm-ui/ui-webapp/public/locales/de/repos.json
index 151c6844b5..6f658daeda 100644
--- a/scm-ui/ui-webapp/public/locales/de/repos.json
+++ b/scm-ui/ui-webapp/public/locales/de/repos.json
@@ -36,6 +36,13 @@
"settingsNavLink": "Einstellungen",
"generalNavLink": "Generell",
"permissionsNavLink": "Berechtigungen"
+ },
+ "tooltip": {
+ "branches": "Branches",
+ "tags": "Tags",
+ "commits": "Commits",
+ "sources": "Sources",
+ "settings": "Einstellungen"
}
},
"overview": {
diff --git a/scm-ui/ui-webapp/public/locales/en/repos.json b/scm-ui/ui-webapp/public/locales/en/repos.json
index 6bb4043c91..c126c3c7a1 100644
--- a/scm-ui/ui-webapp/public/locales/en/repos.json
+++ b/scm-ui/ui-webapp/public/locales/en/repos.json
@@ -36,6 +36,13 @@
"settingsNavLink": "Settings",
"generalNavLink": "General",
"permissionsNavLink": "Permissions"
+ },
+ "tooltip": {
+ "branches": "Branches",
+ "tags": "Tags",
+ "commits": "Commits",
+ "sources": "Sources",
+ "settings": "Settings"
}
},
"overview": {