1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-02 23:48:47 +00:00

[shared with all, group, groups] mobile: improvement (#3874)

* added component libs-mobile-thead.js
This commit is contained in:
llj
2019-07-18 20:21:50 +08:00
committed by Daniel Pan
parent d5ad9ea67c
commit 168c0992a7
7 changed files with 60 additions and 37 deletions

View File

@@ -4,6 +4,7 @@ import { gettext } from '../../utils/constants';
import { Utils } from '../../utils/utils';
import SharedRepoListItem from './shared-repo-list-item';
import toaster from '../toast';
import LibsMobileThead from '../libs-mobile-thead';
const propTypes = {
libraryType: PropTypes.string,
@@ -129,23 +130,9 @@ class SharedRepoListView extends React.Component {
}
renderMobileUI = () => {
let isShowTableThread = this.props.isShowTableThread !== undefined ? this.props.isShowTableThread : true;
const { sortByName, sortByTime, sortIcon } = this.getSortMetaData();
return (
<table className={isShowTableThread ? '' : 'table-thead-hidden'}>
<thead>
<tr>
<th width="18%"><span className="sr-only">{gettext('Library Type')}</span></th>
<th width="68%">
{gettext('Sort:')}
<a className="table-sort-op" href="#" onClick={this.sortByName}>{gettext('name')} {sortByName && sortIcon}</a>
<a className="table-sort-op" href="#" onClick={this.sortByTime}>{gettext('last update')} {sortByTime && sortIcon}</a>
</th>
<th width="14%"><span className="sr-only">{gettext('Actions')}</span></th>
</tr>
</thead>
<table className="table-thead-hidden">
<LibsMobileThead />
<tbody>
{this.renderRepoListView()}
</tbody>