Repository navigation
[PURR][#2812]Display the Review tab and progress notice to user in publication submission process - #1930
[PURR][#2812]Display the Review tab and progress notice to user in publication submission process#1930kuang5 wants to merge 1 commit into
Conversation
…blication submission process
nkissebe
left a comment
There was a problem hiding this comment.
Thanks for picking this up. A few things before this can go in:
The UI change isn't in the PR. The diff only adds the language key. The always-visible Review tab and the notice that renders it (per the description, a doi-template override of statusbar.php) aren't included, and nothing in the repo references PLG_PROJECTS_PUBLICATIONS_PROGRESS_NOTICE. As-is, 2.4-main would gain an orphan string and none of the test steps can be reproduced from the repo. Please include the actual template/plugin change so it can be reviewed together with the string.
Fix the Review-tab guard in core rather than forking the statusbar template. The tab is hidden by a four-line guard in core/plugins/projects/publications/views/draft/tmpl/statusbar.php (around line 74):
if ($blockname == 'review' && ($blockId != $activenum)) { continue; }Copying the whole statusbar into app/templates/doi/html/... duplicates ~80 lines of curation status/class logic that will drift the next time core touches it. Removing (or parameterising) that guard in core is safe: review.php already gates on curation('complete') (lines 16 and 64) and the submit handler re-checks completeness in publications.php (~line 2042), so jumping to Review early can't submit an incomplete draft. Keep only the notice markup/CSS in the template.
Inline notes on the string itself below.
| PLG_PROJECTS_PUBLICATIONS_ERROR_REGISTER_METADATA="Error registering the DOI metadata and issuing DOI." | ||
| PLG_PROJECTS_PUBLICATIONS_ERROR_REGISTER_NAME_URL="Error registering the DOI name and dataset URL." | ||
| PLG_PROJECTS_PUBLICATIONS_ERROR_UPDATE_DOI="Failed to update DOI." | ||
| PLG_PROJECTS_PUBLICATIONS_PROGRESS_NOTICE="Your dataset is not yet submitted! When you have filled each required field, open the Review tab, then click "Submit draft" to send your dataset to an administrator." |
There was a problem hiding this comment.
Wrong button name in the resubmit flow. For a curator-returned publication (state 7 / WORKED, which is test step 2 in the description), the Review page renders PLG_PROJECTS_PUBLICATIONS_RESUBMIT_DRAFT ("Re-submit draft to be published"), not "Submit draft" (see views/draft/tmpl/review.php ~line 289). So the notice would tell the user to look for a button that isn't there, which is the stall this PR is meant to fix. Either add a second key for the isWorked() case or make the wording generic (e.g. "click the submit button").
Site-specific wording in the shared core file. "Your dataset" and "an administrator" are PURR phrasing; the rest of this plugin says "publication". PURR already keeps this kind of override in app/bootstrap/site/language/overrides/en-GB.override.ini (e.g. PLG_PROJECTS_PUBLICATIONS_WHATS_NEXT_PENDING), which the translator merges over every loaded file. If a core key is wanted at all, give it generic wording here and put the PURR wording in the override.
| PLG_PROJECTS_PUBLICATIONS_ERROR_REGISTER_METADATA="Error registering the DOI metadata and issuing DOI." | ||
| PLG_PROJECTS_PUBLICATIONS_ERROR_REGISTER_NAME_URL="Error registering the DOI name and dataset URL." | ||
| PLG_PROJECTS_PUBLICATIONS_ERROR_UPDATE_DOI="Failed to update DOI." | ||
| PLG_PROJECTS_PUBLICATIONS_PROGRESS_NOTICE="Your dataset is not yet submitted! When you have filled each required field, open the Review tab, then click "Submit draft" to send your dataset to an administrator." |
There was a problem hiding this comment.
Unescaped double quotes inside a double-quoted INI value. This only parses because Translator loads with INI_SCANNER_RAW; the translator's own post-processing (str_replace('\"', '"')) shows the supported convention is \". Any normal-mode parser (default parse_ini_file, external tooling, a future lint) will error on this line and drop the whole file. Please write click \"Submit draft\" or use single quotes.
Placement. This is an informational draft-flow message but it's been added inside the ; Errors block between ERROR_* keys. Move it next to PLG_PROJECTS_PUBLICATIONS_DRAFT_READY_TO_SUBMIT or the other draft-flow strings.
There was a problem hiding this comment.
Sorry that I forgot to mention that the language change in this PR needs to be combined with the view changes in https://gitlab.hubzero.org/hub-purr/tpl_doi/-/merge_requests/17. All changes together implemented the functionality.
nkissebe
left a comment
There was a problem hiding this comment.
Second pass, after finding the view this string serves: tpl_doi branch kuang_local_branch_doi_template_09252026, a full copy of core's draft/statusbar.php that differs from core in two generic ways: it drops the guard hiding the Review tab until you are on it, and it shows a "not submitted yet" notice. Neither is PURR-specific, and as a copy of a core view it will drift. So I've put both into core and left the template with styling only:
- #1940 supersedes this PR (your commit carried, rework on top): the Review tab is always listed, the notice is shown for new and returned drafts (the returned case names the right button, "Re-submit draft to be published"), with generic strings in the draft-flow section.
tpl_doibranchpub-review-noticekeeps PURR's red styling for the notice; no statusbar override needed. A merge request still needs opening: https://gitlab.hubzero.org/hub-purr/tpl_doi/-/merge_requests/new?merge_request%5Bsource_branch%5D=pub-review-notice- PURR's "dataset"/"administrator" wording is in the hub's
app/bootstrap/site/language/overrides/en-GB.override.ini, where the other publications phrasing already lives.
|
Merged via #1940: your commit carried as-is on top of current 2.4-main, plus the rework described above (Review tab always listed in the draft status bar, a notice for unsubmitted and returned drafts with generic wording in core). PURR's styling is on tpl_doi branch pub-review-notice and its wording in the hub's language override file; nothing else is needed in the template. |
PURR Ticket: https://purr.purdue.edu/support/ticket/2812
We saw a few users who prepare datasets submission stop at finishing the Notes section and they didn't click the Next button to enter the review page. One reason is that the Review tab doesn't display in the submission progress bar. We want the Review tab to display all the time on the publication submission process bar and display a notice message 'Your dataset is not yet submitted! When you have filled each required field, open the Review tab, then click "Submit draft" to send your dataset to an administrator.' in all the progress section before the Review step.
The code changes include adding the progress notice under both the version label and progress bar and allow the Review tab to display all the time in publication submission so that users are aware of them. Modified statusbar.php is going to be the PURR view and is put in doi template for view override.
Test steps:
Test is done on dev PURR and it works as expected.