Skip to content

Commit

Permalink
# This is a combination of 2 commits.
Browse files Browse the repository at this point in the history
# This is the 1st commit message:

download review label added

# This is the commit message pkp#2:

review download backend working

read reviews with download reviews links

download review in pdf and xml

export review as xml

refactored xml download to reuse custom tag rendering logic

related object removed for xml download

added dom implementation for xml generation for review downloads

lock file updated after merge conflict

code styling tweaks

made composer files inline with master

fpdf dependency added

download reviews using mpdf

using get authorized objeect thereby utilizing permissions to retrieve reviews and submissions

indentation of tpl file reverted

changes for download reviews re-implemented without affecting indentation

xml utf 8 support and open reviewer support

rich text comments tags stripped to prepare for xml

PDF output supporting uf8 chars

Vue dropdown component used in readReview template for downloading reviews

removed exportPDF from grid action and added logic to controllers to as API route

download XML ported to controller and removed from grid action

reverted unintended formatting

routes grouped and named more readably

parameter validation and http responses added to methods

download reviews utilizing temp files

export review PDF refactor to separate PDF generation and API handing

refactored api request validation

error details passing from refactored validation method

method doc description

adding attribute to validate xml exported file

download reviews review template added as own file

download xml using createTextNode function

replaced spaces with tabs on templates

replaces spaces with tabs

tabs used instead of spaces fix for review download template

indentation restored
  • Loading branch information
rob-a-ubiquity authored and MrRob100 committed Nov 13, 2024
1 parent 4005992 commit 49c4521
Show file tree
Hide file tree
Showing 8 changed files with 1,160 additions and 325 deletions.
442 changes: 441 additions & 1 deletion api/v1/reviews/PKPReviewController.php

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions classes/core/PKPString.php
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,27 @@ public static function getWordCount(string $str): int
{
return count(preg_split('/\s+/', trim(str_replace(' ', ' ', strip_tags($str)))));
}

/**
* Map the specific HTML tags in title/ sub title for JATS schema compability
* @see https://jats.nlm.nih.gov/publishing/0.4/xsd/JATS-journalpublishing0.xsd
*
* @param string $htmlTitle The submission title/sub title as in HTML
* @return string
*/
public static function mapTitleHtmlTagsToXml(string $htmlTitle): string
{
$mappings = [
'<b>' => '<bold>',
'</b>' => '</bold>',
'<i>' => '<italic>',
'</i>' => '</italic>',
'<u>' => '<underline>',
'</u>' => '</underline>',
];

return str_replace(array_keys($mappings), array_values($mappings), $htmlTitle);
}
}

if (!PKP_STRICT_MODE) {
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"league/flysystem-sftp-v3": "^3.0",
"michelf/php-markdown": "2.*",
"moxiecode/plupload": "2.*",
"mpdf/mpdf": "^8.2",
"phpmailer/phpmailer": "6.*",
"ralouphie/getallheaders": "*",
"smarty/smarty": "4.*",
Expand Down
Loading

0 comments on commit 49c4521

Please sign in to comment.