From 266bd718f53fd88845a500a7ebbcfaf6a9aeb9c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Tournoy?= Date: Wed, 24 May 2023 00:47:12 +0200 Subject: [PATCH] prepare new release 1.0.40.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Raphaël Tournoy --- CHANGELOG.md | 4 + application/languages/en/views.php | 2 + .../journal/views/scripts/paper/view.phtml | 31 ++- .../views/scripts/partials/paper_export.phtml | 40 ++-- .../views/scripts/partials/paper_share.phtml | 183 ++++++++++-------- 5 files changed, 136 insertions(+), 124 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa29549f6..a6c53001d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Security --> +## 1.0.40.1 - 2023-05-24 +### Changed +- Merged Share + Metadata export panels to save space + ## 1.0.40 - 2023-05-23 ### Changed - New WYSIWYG editor version (editing toolbar for text areas) ; bumped from TinyMCE v4 to TinyMCE v6 diff --git a/application/languages/en/views.php b/application/languages/en/views.php index 4a6cc57c8..119ca8202 100644 --- a/application/languages/en/views.php +++ b/application/languages/en/views.php @@ -1805,7 +1805,9 @@ 'Rédacteur sans rubrique' => 'Editor without section', "Exporter" => "Export", + "Export métadonnées" => "Export metadata", "Partager" => "Share", + "Partager et exporter" => 'Share and export', "Voulez-vous partager la publication ? Rendez-vous" => "Do you want to share the publication? Go", "ici" => 'here', "Statistiques de consultation" => "Consultation statistics", diff --git a/application/modules/journal/views/scripts/paper/view.phtml b/application/modules/journal/views/scripts/paper/view.phtml index 5ce986436..4322bacdf 100644 --- a/application/modules/journal/views/scripts/paper/view.phtml +++ b/application/modules/journal/views/scripts/paper/view.phtml @@ -130,17 +130,17 @@ if ($paper->isPublished()) { foreach ($ogMeta as $key => $meta) { if ($key === 'tag') { foreach ($meta as $tag) { - $this->headMeta()->appendProperty('og:'.$ogKey. ':' .$key, $tag); + $this->headMeta()->appendProperty('og:' . $ogKey . ':' . $key, $tag); } continue; } if ($key === 'author') { foreach ($meta as $profile) { - $this->headMeta()->appendProperty('og:'.$ogKey. ':' . 'author', $profile['citation_author']); + $this->headMeta()->appendProperty('og:' . $ogKey . ':' . 'author', $profile['citation_author']); } continue; } - $this->headMeta()->appendProperty('og:' . $ogKey. ':' .$key, $meta); + $this->headMeta()->appendProperty('og:' . $ogKey . ':' . $key, $meta); } break; @@ -173,7 +173,7 @@ if ($paper->isPublished()) { } continue; } - $this->headMeta()->appendName("twitter:".$twitterKey, $twitterMeta); + $this->headMeta()->appendName("twitter:" . $twitterKey, $twitterMeta); } foreach ($headMeta['header'] as $hKey => $headerMeta) { switch ($hKey) { @@ -232,8 +232,8 @@ $this->jQuery()->addJavascriptFile('/js/paper/view.js');
translate('Statut actuel') . $this->translate(' :') . ' '; ?>

- - translate(Episciences_PapersManager::getStatusLabel($status))) ?> + translate(Episciences_PapersManager::getStatusLabel($status))) ?> partial('partials/paper-revision-deadline.phtml', ['revisionDeadline' => $this->revisionDeadline]) ?>

@@ -346,22 +346,15 @@ if ($this->citations !== '') { isPublished()) : ?> -
-
- partial('partials/paper_export.phtml', ['docid' => $paper->getDocid()]); ?> -
-
- - -
-
-

translate('Partager') ?>

-
- partial('partials/paper_share.phtml', ['paper' => $paper]); ?> -
+ +
+
+

translate('Partager et exporter') ?>

+ partial('partials/paper_share.phtml', ['paper' => $paper]); ?>
+ page_count || $this->file_count) : ?> diff --git a/application/modules/journal/views/scripts/partials/paper_export.phtml b/application/modules/journal/views/scripts/partials/paper_export.phtml index da90024b9..3191b81d8 100644 --- a/application/modules/journal/views/scripts/partials/paper_export.phtml +++ b/application/modules/journal/views/scripts/partials/paper_export.phtml @@ -2,27 +2,27 @@ $docid = $this->docid; ?> -
-
-

translate('Exporter') ?>

-
-
- +url(['id' => $docid]); +$exportFormat['bibtex'] = 'BibTeX'; +$exportFormat['tei'] = 'TEI'; +$exportFormat['dc'] = 'Dublin Core'; +$exportFormat['datacite'] = 'OpenAIRE'; +$exportFormat['crossref'] = 'Crossref'; +$exportFormat['doaj'] = 'DOAJ'; +$exportFormat['zbjats'] = 'ZbMATH Open'; +$exportFormat['json'] = 'JSON'; +?> + -
\ No newline at end of file + +
diff --git a/application/modules/journal/views/scripts/partials/paper_share.phtml b/application/modules/journal/views/scripts/partials/paper_share.phtml index 43e072ae0..7a1c191ab 100644 --- a/application/modules/journal/views/scripts/partials/paper_share.phtml +++ b/application/modules/journal/views/scripts/partials/paper_share.phtml @@ -1,10 +1,11 @@ escape('https://doi.org/'.$this->paper->getDoi()); +$docid = $this->paper->getDocid(); +$doi = $this->escape('https://doi.org/' . $this->paper->getDoi()); $title = $this->escape($this->paper->getTitle()); $controller = Zend_Controller_Front::getInstance()->getRequest()->getControllerName(); // twitter -$url = "https://twitter.com/intent/tweet/?text=".$title."&url=".$doi; +$url = "https://twitter.com/intent/tweet/?text=" . $title . "&url=" . $doi; $contributorSocialMedia = $this->contributorTwitter; // for mastodon @@ -17,102 +18,114 @@ if (Episciences_Auth::isLogged()) { } if (substr_count($contributorSocialMedia, "@") === 1) { - $url = "https://twitter.com/intent/tweet/?text=".$title; + $url = "https://twitter.com/intent/tweet/?text=" . $title; if (!is_null($contributorSocialMedia)) { - $url .= (strpos($contributorSocialMedia, "@") === 0) ? " ".$contributorSocialMedia."&url=".$doi - : " @".$contributorSocialMedia."&url=".$doi; + $url .= (strpos($contributorSocialMedia, "@") === 0) ? " " . $contributorSocialMedia . "&url=" . $doi + : " @" . $contributorSocialMedia . "&url=" . $doi; } else { - $url .= "&url=".$doi; + $url .= "&url=" . $doi; } } ?>
- - - - - - - - - 1) : - $loggedUserInfo = Episciences_Tools::getMastodonSeparatedInfo($loggedUserSocialMedia); - ?> - - -
- -
-
- +
+
+ + + + + + + + + + + 1) : + $loggedUserInfo = Episciences_Tools::getMastodonSeparatedInfo($loggedUserSocialMedia); + ?> + + +
+ +
+
+ - - - + - - -
- -
-
+ + +
+ +
+
- - - - +
+ partial('partials/paper_export.phtml', ['docid' => $docid]); ?> +
+
+
\ No newline at end of file