Show remove column header during proposal phase

This commit is contained in:
sqrrm 2018-12-08 13:13:45 +01:00
parent 40698fd413
commit 91f14f7faf
No known key found for this signature in database
GPG Key ID: 45235F9EF87089EC
2 changed files with 15 additions and 0 deletions

View File

@ -1596,6 +1596,7 @@ dao.proposal.display.option=Option
dao.proposal.table.header.proposalType=Proposal type
dao.proposal.table.header.link=Link
dao.proposal.table.header.myVote=My vote
dao.proposal.table.header.remove=Remove
dao.proposal.table.icon.tooltip.removeProposal=Remove my proposal
dao.proposal.table.icon.tooltip.changeVote=Current vote: ''{0}''. Change vote to: ''{1}''

View File

@ -139,6 +139,7 @@ public class ProposalsView extends ActivatableView<GridPane, Void> implements Bs
private ChangeListener<String> stakeListener;
private Subscription selectedProposalSubscription, phaseSubscription;
private boolean areVoteButtonsVisible;
private TableColumn<ProposalsListItem, ProposalsListItem> lastColumn;
///////////////////////////////////////////////////////////////////////////////////////////
@ -615,6 +616,18 @@ public class ProposalsView extends ActivatableView<GridPane, Void> implements Bs
voteButton.setVisible(false);
voteButton.setManaged(false);
}
switch (daoFacade.phaseProperty().get()) {
case PROPOSAL:
lastColumn.setText(Res.get("dao.proposal.table.header.remove"));
break;
case BLIND_VOTE:
lastColumn.setText(Res.get("dao.proposal.table.header.myVote"));
break;
default:
lastColumn.setText("");
break;
}
}
private boolean hasVotedOnProposal() {
@ -865,5 +878,6 @@ public class ProposalsView extends ActivatableView<GridPane, Void> implements Bs
}
});
tableView.getColumns().add(column);
lastColumn = column;
}
}