1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-07-14 15:35:35 +00:00

update admin org department libraries page

check enableSysAdminViewRepo
This commit is contained in:
lian 2021-12-15 11:40:11 +08:00
parent 632934197c
commit b8f45959c7

View File

@ -3,6 +3,8 @@ import PropTypes from 'prop-types';
import { Utils } from '../../../utils/utils.js';
import { siteRoot, gettext } from '../../../utils/constants';
const { enableSysAdminViewRepo } = window.sysadmin.pageOptions;
const RepoItemPropTypes = {
repo: PropTypes.object.isRequired,
showDeleteRepoDialog: PropTypes.func.isRequired,
@ -32,7 +34,11 @@ class RepoItem extends React.Component {
return (
<tr className={highlight ? 'tr-highlight' : ''} onMouseEnter={this.onMouseEnter} onMouseLeave={this.onMouseLeave}>
<td><img src={iconUrl} width="24" alt={gettext('icon')}/></td>
{ enableSysAdminViewRepo ?
<td><a href={siteRoot + 'sys/libraries/' + repo.repo_id + '/' + repo.name + '/'}>{repo.name}</a></td>
:
<td>{repo.name}</td>
}
<td>{Utils.bytesToSize(repo.size)}{' '}</td>
{ this.props.orgID == -1 ?
<td className="cursor-pointer text-center" onClick={this.props.showDeleteRepoDialog.bind(this, repo)}>