mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-05-06 11:16:28 +02:00
Added navigational link to repo's history
This commit is contained in:
@@ -22,7 +22,8 @@
|
||||
"actions-label": "Actions",
|
||||
"back-label": "Back",
|
||||
"navigation-label": "Navigation",
|
||||
"information": "Information"
|
||||
"information": "Information",
|
||||
"history": "History"
|
||||
},
|
||||
"create": {
|
||||
"title": "Create Repository",
|
||||
|
||||
@@ -12,6 +12,7 @@ class DropDown extends React.Component<Props> {
|
||||
render() {
|
||||
const {options, preselectedOption} = this.props;
|
||||
return <select value={preselectedOption} onChange={this.change}>
|
||||
<option key=""> </option>
|
||||
{options.map(option => {
|
||||
return <option key={option}
|
||||
value={option}>{option}</option>
|
||||
|
||||
@@ -112,7 +112,7 @@ function extractChangesetsByIds(data: any, oldChangesetsByIds: any) {
|
||||
|
||||
//selectors
|
||||
export function getChangesetsForNamespaceAndNameFromState(namespace: string, name: string, state: Object) {
|
||||
const key = namespace + "/" + name;
|
||||
const key = createItemId(namespace, name);
|
||||
if (!state.changesets[key]) {
|
||||
return null;
|
||||
}
|
||||
@@ -121,7 +121,6 @@ export function getChangesetsForNamespaceAndNameFromState(namespace: string, nam
|
||||
|
||||
export function getChangesets(namespace: string, name: string, branch: string, state: Object) {
|
||||
const key = createItemId(namespace, name, branch);
|
||||
console.log("getChangesets for key " + key);
|
||||
if (!state.changesets[key]) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -103,6 +103,12 @@ class RepositoryRoot extends React.Component<Props> {
|
||||
component={() => <Edit repository={repository}/>}
|
||||
/>
|
||||
<Route
|
||||
exact
|
||||
path={`${url}/history`}
|
||||
component={() => <Changesets repository={repository}/>}
|
||||
/>
|
||||
<Route
|
||||
exact
|
||||
path={`${url}/history/:branch`}
|
||||
component={() => <Changesets repository={repository}/>}
|
||||
/>
|
||||
@@ -111,6 +117,7 @@ class RepositoryRoot extends React.Component<Props> {
|
||||
<Navigation>
|
||||
<Section label={t("repository-root.navigation-label")}>
|
||||
<NavLink to={url} label={t("repository-root.information")}/>
|
||||
<NavLink activeOnlyWhenExact={false} to={`${url}/history`} label={t("repository-root.history")}/>
|
||||
<EditNavLink repository={repository} editUrl={`${url}/edit`}/>
|
||||
</Section>
|
||||
<Section label={t("repository-root.actions-label")}>
|
||||
|
||||
Reference in New Issue
Block a user