Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add view challenge button in task read only modes completion widget #2290

Merged
merged 1 commit into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React, { Component } from 'react'
import PropTypes from 'prop-types'
import classNames from 'classnames'
import { FormattedMessage, injectIntl } from 'react-intl'
import { Link } from "react-router-dom";
import _get from 'lodash/get'
import _map from 'lodash/map'
import _pick from 'lodash/pick'
Expand Down Expand Up @@ -425,8 +426,15 @@ export class ActiveTaskControls extends Component {
/>

{this.props.taskReadOnly ?
<div className="mr-mt-4 mr-text-lg mr-text-pink-light">
<FormattedMessage {...messages.readOnly} />
<div>
<div className="mr-mt-4 mr-text-lg mr-text-pink-light">
<FormattedMessage {...messages.readOnly} />
</div>
<Link to={`/browse/challenges/${this.props.challengeId}`}>
<button className="mr-mt-4 mr-button">
<FormattedMessage {...messages.browseChallenge} />
</button>
</Link>
</div> :
<React.Fragment>
{AsCooperativeWork(this.props.task).isTagType() && (!isFinal || needsRevised) && this.props.user.settings.seeTagFixSuggestions &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ export default defineMessages({
defaultMessage: "Previewing task in read-only mode",
},

browseChallenge: {
id: 'Task.browseChallenge.message',
defaultMessage: "View Challenge",
},

viewChangesetLabel: {
id: "Task.controls.viewChangeset.label",
defaultMessage: "View Changeset",
Expand Down
Loading