mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-18 03:01:05 +01:00
added last commit message to repositorybrowser
This commit is contained in:
@@ -71,13 +71,15 @@ for dir in directories:
|
||||
print ' </file>'
|
||||
|
||||
for file in files:
|
||||
time = file.date()[0]
|
||||
desc = repo[file.linkrev()].description()
|
||||
print ' <file>'
|
||||
print ' <name>' + getName(file.path()) + '</name>'
|
||||
print ' <path>' + file.path() + '</path>'
|
||||
print ' <directory>false</directory>'
|
||||
print ' <length>' + str(file.size()) + '</length>'
|
||||
time = file.date()[0]
|
||||
print ' <lastModified>' + str(time).split('.')[0] + '</lastModified>'
|
||||
print ' <description>' + desc + '</description>'
|
||||
print ' </file>'
|
||||
print ' </children>'
|
||||
print ' </file>'
|
||||
|
||||
@@ -90,6 +90,17 @@ public class FileObject implements LastModifiedAware, Iterable<FileObject>
|
||||
return children;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getDescription()
|
||||
{
|
||||
return description;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
@@ -159,6 +170,17 @@ public class FileObject implements LastModifiedAware, Iterable<FileObject>
|
||||
this.children = children;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
*
|
||||
* @param description
|
||||
*/
|
||||
public void setDescription(String description)
|
||||
{
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
@@ -221,6 +243,9 @@ public class FileObject implements LastModifiedAware, Iterable<FileObject>
|
||||
@XmlElementWrapper(name = "children")
|
||||
private List<FileObject> children;
|
||||
|
||||
/** Field description */
|
||||
private String description;
|
||||
|
||||
/** Field description */
|
||||
private boolean directory;
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ Sonia.repository.RepositoryBrowser = Ext.extend(Ext.grid.GridPanel, {
|
||||
url: restUrl + 'repositories/' + this.repository.id + '/browse.json',
|
||||
method: 'GET'
|
||||
}),
|
||||
fields: ['path', 'name', 'length', 'lastModified', 'directory'],
|
||||
fields: ['path', 'name', 'length', 'lastModified', 'directory', 'description'],
|
||||
root: 'file.children',
|
||||
idProperty: 'path',
|
||||
autoLoad: true,
|
||||
@@ -80,10 +80,15 @@ Sonia.repository.RepositoryBrowser = Ext.extend(Ext.grid.GridPanel, {
|
||||
dataIndex: 'lastModified',
|
||||
header: 'LastModified',
|
||||
renderer: Ext.util.Format.formatTimestamp
|
||||
},{
|
||||
id: 'description',
|
||||
dataIndex: 'description',
|
||||
header: 'Description'
|
||||
}]
|
||||
});
|
||||
|
||||
var config = {
|
||||
autoExpandColumn: 'description',
|
||||
title: String.format(this.repositoryBrowserTitleText, this.repository.name),
|
||||
store: browserStore,
|
||||
colModel: browserColModel,
|
||||
|
||||
Reference in New Issue
Block a user