mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-11 20:01:10 +00:00
show permission in share links (#3249)
* show permission in share links * optimize code format * modify text display, revert utils.sharePerms
This commit is contained in:
@@ -82,9 +82,10 @@ class Content extends Component {
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th width="4%">{/*icon*/}</th>
|
<th width="4%">{/*icon*/}</th>
|
||||||
<th width="36%"><a className="d-block table-sort-op" href="#" onClick={this.sortByName}>{gettext('Name')} {sortByName && sortIcon}</a></th>
|
<th width="31%"><a className="d-block table-sort-op" href="#" onClick={this.sortByName}>{gettext('Name')} {sortByName && sortIcon}</a></th>
|
||||||
<th width="24%">{gettext('Library')}</th>
|
<th width="14%">{gettext('Library')}</th>
|
||||||
<th width="12%">{gettext('Visits')}</th>
|
<th width="20%">{gettext('Permission')}</th>
|
||||||
|
<th width="7%">{gettext('Visits')}</th>
|
||||||
<th width="14%"><a className="d-block table-sort-op" href="#" onClick={this.sortByTime}>{gettext('Expiration')} {sortByTime && sortIcon}</a></th>
|
<th width="14%"><a className="d-block table-sort-op" href="#" onClick={this.sortByTime}>{gettext('Expiration')} {sortByTime && sortIcon}</a></th>
|
||||||
<th width="10%">{/*Operations*/}</th>
|
<th width="10%">{/*Operations*/}</th>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -180,7 +181,6 @@ class Item extends Component {
|
|||||||
let iconVisibility = this.state.showOpIcon ? '' : ' invisible';
|
let iconVisibility = this.state.showOpIcon ? '' : ' invisible';
|
||||||
let linkIconClassName = 'sf2-icon-link action-icon' + iconVisibility;
|
let linkIconClassName = 'sf2-icon-link action-icon' + iconVisibility;
|
||||||
let deleteIconClassName = 'sf2-icon-delete action-icon' + iconVisibility;
|
let deleteIconClassName = 'sf2-icon-delete action-icon' + iconVisibility;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<tr onMouseOver={this.handleMouseOver} onMouseOut={this.handleMouseOut}>
|
<tr onMouseOver={this.handleMouseOver} onMouseOut={this.handleMouseOut}>
|
||||||
<td><img src={iconUrl} width="24" /></td>
|
<td><img src={iconUrl} width="24" /></td>
|
||||||
@@ -191,6 +191,10 @@ class Item extends Component {
|
|||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
<td><Link to={`${siteRoot}library/${item.repo_id}/${item.repo_name}/`}>{item.repo_name}</Link></td>
|
<td><Link to={`${siteRoot}library/${item.repo_id}/${item.repo_name}/`}>{item.repo_name}</Link></td>
|
||||||
|
{ item.permissions.can_download ?
|
||||||
|
<td>{gettext('Preview and download')}</td> :
|
||||||
|
<td>{gettext('Preview only')}</td>
|
||||||
|
}
|
||||||
<td>{item.view_cnt}</td>
|
<td>{item.view_cnt}</td>
|
||||||
<td>{this.renderExpriedData()}</td>
|
<td>{this.renderExpriedData()}</td>
|
||||||
<td>
|
<td>
|
||||||
|
Reference in New Issue
Block a user