1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-03 16:10:26 +00:00

Add repo name (#2733)

This commit is contained in:
Michael An
2018-12-29 10:38:39 +08:00
committed by Daniel Pan
parent c6dfb93389
commit 29d508900b
2 changed files with 6 additions and 2 deletions

View File

@@ -48,6 +48,7 @@ class ListRelatedFileDialog extends React.Component {
relatedFiles.map((item) => {
seafileAPI.getFileInfo(item.repo_id, item.path).then(res => {
let dirent = new Dirent(res.data);
dirent['repo_name'] = item.repo_name;
dirent['related_id'] = item.related_id;
dirent['link'] = siteRoot + 'lib/' + item.repo_id + '/file' + Utils.encodePath(item.path);
direntList.push(dirent);
@@ -78,8 +79,9 @@ class ListRelatedFileDialog extends React.Component {
<Table hover size="sm" className="list-related-file-table">
<thead>
<tr>
<th width='50%'>{gettext('Name')}</th>
<th width='25%'>{gettext('Size')}</th>
<th width='30%'>{gettext('Name')}</th>
<th width='25%'>{gettext('Library Name')}</th>
<th width='20%'>{gettext('Size')}</th>
<th width='20%'>{gettext('Last Update')}</th>
<th width='5%'></th>
</tr>
@@ -143,6 +145,7 @@ class RelatedFile extends React.Component {
return (
<tr onMouseEnter={this.onMouseEnter} onMouseLeave={this.onMouseLeave}>
<td><a href={relatedFile.link} target='_blank'>{relatedFile.name}</a></td>
<td>{relatedFile.repo_name}</td>
<td>{relatedFile.size}</td>
<td>{relatedFile.mtime}</td>
<td><i className={className} onClick={this.props.onDeleteRelatedFile.bind(this, relatedFile)}></i></td>