mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-11 11:51:27 +00:00
System page list wiki (#7195)
* add All wikis optimize * update * optimize * select wiki info by sql * optimize publish wiki * update * optimize ui * update * Update repos.js * optimize varname * Update wiki-card-item.js --------- Co-authored-by: 孙永强 <11704063+s-yongqiang@user.noreply.gitee.com> Co-authored-by: r350178982 <32759763+r350178982@users.noreply.github.com>
This commit is contained in:
@@ -83,9 +83,11 @@ class Content extends Component {
|
||||
gettext('Files') / gettext('Size')
|
||||
}
|
||||
</th>
|
||||
<th width="32%">ID</th>
|
||||
<th width="18%">{gettext('Owner')}</th>
|
||||
<th width="5%">{/* Operations*/}</th>
|
||||
<Fragment>
|
||||
<th width="32%">ID</th>
|
||||
<th width="18%">{gettext('Owner')}</th>
|
||||
<th width="5%">{/* Operations*/}</th>
|
||||
</Fragment>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -98,6 +100,7 @@ class Content extends Component {
|
||||
onUnfreezedItem={this.onUnfreezedItem}
|
||||
onDeleteRepo={this.props.onDeleteRepo}
|
||||
onTransferRepo={this.props.onTransferRepo}
|
||||
isWiki={this.props.isWiki}
|
||||
/>);
|
||||
})}
|
||||
</tbody>
|
||||
@@ -278,6 +281,9 @@ class Item extends Component {
|
||||
|
||||
getOperations = () => {
|
||||
const { repo } = this.props;
|
||||
if (this.props.isWiki) {
|
||||
return ['Delete'];
|
||||
}
|
||||
let operations = ['Delete', 'Transfer'];
|
||||
const index = repo.owner_email.indexOf('@seafile_group');
|
||||
let isGroupOwnedRepo = index != -1;
|
||||
@@ -309,12 +315,21 @@ class Item extends Component {
|
||||
if (isGroupOwnedRepo) {
|
||||
departmentID = repo.owner_email.substring(0, index);
|
||||
}
|
||||
|
||||
let wikiName = '';
|
||||
if (this.props.isWiki) {
|
||||
wikiName = this.renderRepoName();
|
||||
if (repo.is_published) {
|
||||
wikiName = <><span>{wikiName}</span><a href={repo.public_url} target='_blank' rel='noreferrer'>(Published)</a></>;
|
||||
}
|
||||
}
|
||||
return (
|
||||
<Fragment>
|
||||
<tr className={this.state.highlight ? 'tr-highlight' : ''} onMouseEnter={this.handleMouseOver} onMouseLeave={this.handleMouseOut}>
|
||||
<td><img src={iconUrl} title={iconTitle} alt={iconTitle} width="24" /></td>
|
||||
<td>{this.renderRepoName()}</td>
|
||||
{this.props.isWiki ?
|
||||
<td>{wikiName}</td> :
|
||||
<td>{this.renderRepoName()}</td>
|
||||
}
|
||||
<td>{`${repo.file_count} / ${Utils.bytesToSize(repo.size)}`}</td>
|
||||
<td>{repo.id}</td>
|
||||
<td>
|
||||
|
Reference in New Issue
Block a user