Skip to content

Commit

Permalink
Fixed export of date_reviewed and added abstract
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark committed Oct 17, 2018
1 parent c92248a commit 3ad19d1
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions publons/PublonsHandler.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ static function setPlugin($plugin) {
function exportReview($args, $request) {
$plugin =self::$plugin;
$templateMgr =& TemplateManager::getManager();
$templateMgr->addStyleSheet(Request::getBaseUrl() . '/' . $plugin->getStyleSheet());
$templateMgr->addStyleSheet('https://fonts.googleapis.com/css?family=Roboto');
$templateMgr->addStyleSheet('publons-base', Request::getBaseUrl() . '/' . $plugin->getStyleSheet());
$templateMgr->addStyleSheet('publons-font', 'https://fonts.googleapis.com/css?family=Roboto');

$reviewId = intval($args[0]);

Expand Down Expand Up @@ -138,6 +138,9 @@ function exportReview($args, $request) {

$plugin->import('classes.PublonsReviews');

$dateRequested = new DateTime($reviewAssignment->getDateNotified());
$dateCompleted = new DateTime($reviewAssignment->getDateCompleted());

$locale = AppLocale::getLocale();

$publonsReviews = new PublonsReviews();
Expand Down Expand Up @@ -166,9 +169,13 @@ function exportReview($args, $request) {
$data["reviewer"]["name"] = $rname;
$data["reviewer"]["email"] = $remail;
$data["publication"]["title"] = $rtitle;
$data["complete_date"]["day"] = date('d');
$data["complete_date"]["month"] = date('m');
$data["complete_date"]["year"] = date('Y');
$data["publication"]["abstract"] = $reviewSubmission->getLocalizedAbstract();
$data["request_date"]["day"] = $dateRequested->format('d');
$data["request_date"]["month"] = $dateRequested->format('m');
$data["request_date"]["year"] = $dateRequested->format('Y');
$data["complete_date"]["day"] = $dateCompleted->format('d');
$data["complete_date"]["month"] = $dateCompleted->format('m');
$data["complete_date"]["year"] = $dateCompleted->format('Y');

// Don't send content if it is empty
if ($body !== '')
Expand Down

0 comments on commit 3ad19d1

Please sign in to comment.