mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-07 15:33:50 +08:00
implements @ZmagoD comments
This commit is contained in:
parent
7db4bd1f5f
commit
1049e0730e
2 changed files with 26 additions and 21 deletions
|
@ -62,6 +62,7 @@ export default {
|
||||||
all_teams: "All teams",
|
all_teams: "All teams",
|
||||||
in_team: "You are member of {num} team.",
|
in_team: "You are member of {num} team.",
|
||||||
in_teams: "You are member of {num} teams.",
|
in_teams: "You are member of {num} teams.",
|
||||||
|
shows_total_entries: "Showing {start} to {to} of {total} entries.",
|
||||||
leave_team: "Leave team",
|
leave_team: "Leave team",
|
||||||
account: "Account",
|
account: "Account",
|
||||||
team: "Team",
|
team: "Team",
|
||||||
|
@ -152,7 +153,8 @@ export default {
|
||||||
title: "New team",
|
title: "New team",
|
||||||
name_label: "Team name",
|
name_label: "Team name",
|
||||||
name_placeholder: "My team",
|
name_placeholder: "My team",
|
||||||
name_sublabel: "Pick a name that would best describe your team (e.g. 'University of ..., Department of ...').",
|
name_sublabel:
|
||||||
|
"Pick a name that would best describe your team (e.g. 'University of ..., Department of ...').",
|
||||||
description_label: "Description",
|
description_label: "Description",
|
||||||
description_sublabel: "Describe your team.",
|
description_sublabel: "Describe your team.",
|
||||||
create: "Create team"
|
create: "Create team"
|
||||||
|
|
|
@ -9,6 +9,21 @@ import DataTable from "../../../../../components/data_table";
|
||||||
import { SETTINGS_TEAMS_ROUTE } from "../../../../../config/routes";
|
import { SETTINGS_TEAMS_ROUTE } from "../../../../../config/routes";
|
||||||
|
|
||||||
class TeamsDataTable extends Component {
|
class TeamsDataTable extends Component {
|
||||||
|
static renderShowsTotal(start, to, total) {
|
||||||
|
return (
|
||||||
|
<span>
|
||||||
|
<FormattedMessage
|
||||||
|
id="settings_page.shows_total_entries"
|
||||||
|
values={{
|
||||||
|
start,
|
||||||
|
to,
|
||||||
|
total
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
||||||
|
@ -37,19 +52,7 @@ class TeamsDataTable extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
linkToTeam(name, row) {
|
linkToTeam(name, row) {
|
||||||
return (
|
return <Link to={`${SETTINGS_TEAMS_ROUTE}/${row.id}`}>{name}</Link>;
|
||||||
<Link to={`${SETTINGS_TEAMS_ROUTE}/${row.id}`}>
|
|
||||||
{name}
|
|
||||||
</Link>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
renderShowsTotal(start, to, total) {
|
|
||||||
return (
|
|
||||||
<span>
|
|
||||||
Showing { start } to { to } of { total } entries.
|
|
||||||
</span>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
@ -57,9 +60,9 @@ class TeamsDataTable extends Component {
|
||||||
defaultSortName: "name",
|
defaultSortName: "name",
|
||||||
defaultSortOrder: "desc",
|
defaultSortOrder: "desc",
|
||||||
sizePerPageList: [10, 25, 50, 100],
|
sizePerPageList: [10, 25, 50, 100],
|
||||||
prePage: 'Prev', // Previous page button text
|
prePage: "Prev", // Previous page button text
|
||||||
nextPage: 'Next', // Next page button textu
|
nextPage: "Next", // Next page button textu
|
||||||
paginationShowsTotal: this.renderShowsTotal,
|
paginationShowsTotal: TeamsDataTable.renderShowsTotal,
|
||||||
alwaysShowAllBtns: true
|
alwaysShowAllBtns: true
|
||||||
};
|
};
|
||||||
const columns = [
|
const columns = [
|
||||||
|
@ -71,7 +74,7 @@ class TeamsDataTable extends Component {
|
||||||
dataFormat: this.linkToTeam,
|
dataFormat: this.linkToTeam,
|
||||||
position: 0,
|
position: 0,
|
||||||
dataSort: true,
|
dataSort: true,
|
||||||
width: '50%'
|
width: "50%"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 2,
|
id: 2,
|
||||||
|
@ -80,7 +83,7 @@ class TeamsDataTable extends Component {
|
||||||
textId: "role",
|
textId: "role",
|
||||||
position: 1,
|
position: 1,
|
||||||
dataSort: true,
|
dataSort: true,
|
||||||
width: '35%'
|
width: "35%"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 3,
|
id: 3,
|
||||||
|
@ -89,7 +92,7 @@ class TeamsDataTable extends Component {
|
||||||
textId: "members",
|
textId: "members",
|
||||||
position: 2,
|
position: 2,
|
||||||
dataSort: true,
|
dataSort: true,
|
||||||
width: '15%'
|
width: "15%"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 4,
|
id: 4,
|
||||||
|
@ -98,7 +101,7 @@ class TeamsDataTable extends Component {
|
||||||
textId: "id",
|
textId: "id",
|
||||||
dataFormat: this.leaveTeamButton,
|
dataFormat: this.leaveTeamButton,
|
||||||
position: 3,
|
position: 3,
|
||||||
width: '116px'
|
width: "116px"
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Reference in a new issue