mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-11 16:05:44 +01:00
added commit and source url to repository root help page
This commit is contained in:
@@ -45,7 +45,6 @@ import sonia.scm.repository.RepositoryManager;
|
||||
import sonia.scm.template.TemplateHandler;
|
||||
import sonia.scm.url.UrlProvider;
|
||||
import sonia.scm.url.UrlProviderFactory;
|
||||
import sonia.scm.util.HttpUtil;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
@@ -158,6 +157,18 @@ public class RepositoryRootResource
|
||||
|
||||
//~--- get methods --------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getCommitUrl()
|
||||
{
|
||||
return urlProvider.getRepositoryUrlProvider().getChangesetUrl(
|
||||
repository.getId(), null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
@@ -180,6 +191,18 @@ public class RepositoryRootResource
|
||||
return repository;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getSourceUrl()
|
||||
{
|
||||
return urlProvider.getRepositoryUrlProvider().getBrowseUrl(
|
||||
repository.getId(), null, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
|
||||
@@ -92,7 +92,9 @@
|
||||
|
||||
<ul>
|
||||
<#list repositories as repository>
|
||||
<li><a href="${repository.url}">${repository.name}</a> (<a href="${repository.uIUrl}">UI</a>)</li>
|
||||
<li>
|
||||
<a href="${repository.url}">${repository.name}</a> (<a href="${repository.uIUrl}">UI</a>, <a href="${repository.commitUrl}">Commits</a>, <a href="${repository.sourceUrl}">Source</a>)
|
||||
</li>
|
||||
</#list>
|
||||
</ul>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user