mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-02 07:27:04 +00:00
View repo content in list mode (#2579)
This commit is contained in:
@@ -1,17 +1,16 @@
|
||||
import React, { Fragment } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Utils } from '../../utils/utils';
|
||||
import { gettext } from '../../utils/constants';
|
||||
import { gettext, siteRoot } from '../../utils/constants';
|
||||
import ModalPortal from '../modal-portal';
|
||||
import CreateFolder from '../../components/dialog/create-folder-dialog';
|
||||
import CreateFile from '../../components/dialog/create-file-dialog';
|
||||
|
||||
const propTypes = {
|
||||
isViewFile: PropTypes.bool,
|
||||
isViewFile: PropTypes.bool, // just for view file,
|
||||
permission: PropTypes.string, //just for view file, and premission is file permission
|
||||
path: PropTypes.string.isRequired,
|
||||
repoID: PropTypes.string.isRequired,
|
||||
serviceUrl: PropTypes.string.isRequired,
|
||||
permission: PropTypes.string.isRequired,
|
||||
onAddFile: PropTypes.func.isRequired,
|
||||
onAddFolder: PropTypes.func.isRequired,
|
||||
onUploadFile: PropTypes.func.isRequired,
|
||||
@@ -58,8 +57,8 @@ class DirOperationToolbar extends React.Component {
|
||||
|
||||
onEditClick = (e) => {
|
||||
e.preventDefault();
|
||||
let { path, repoID, serviceUrl } = this.props;
|
||||
window.location.href= serviceUrl + '/lib/' + repoID + '/file' + path + '?mode=edit';
|
||||
let { path, repoID } = this.props;
|
||||
window.location.href= siteRoot + 'lib/' + repoID + '/file' + path + '?mode=edit';
|
||||
}
|
||||
|
||||
onUploadClick = (e) => {
|
||||
|
Reference in New Issue
Block a user