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 title to webpage when editing texture #87

Merged
merged 5 commits into from
Oct 11, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
9 changes: 7 additions & 2 deletions TextureHandler.inc.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,8 @@ public function editor($args, $request) {
if (!$submissionId || !$stageId || !$fileId) {
fatalError('Invalid request');
}

$submissionDao = DAORegistry::getDAO('SubmissionDAO');
$submission = $submissionDao->getById($submissionId);
NateWr marked this conversation as resolved.
Show resolved Hide resolved
$submissionFile = $this->getAuthorizedContextObject(ASSOC_TYPE_SUBMISSION_FILE);
$filePath = $submissionFile->getFilePath();
$manuscriptXml = file_get_contents($filePath);
Expand All @@ -333,16 +334,20 @@ public function editor($args, $request) {
array(
'submissionId' => $submissionId,
'fileId' => $fileId,
'stageId' => $stageId,
'stageId' => $stageId
)
);

AppLocale::requireComponents(LOCALE_COMPONENT_APP_COMMON, LOCALE_COMPONENT_PKP_MANAGER);
$templateMgr = TemplateManager::getManager($request);
$publication = $submission->getCurrentPublication();
$title = $publication->getData('title', $publication->getData('locale')) ?: 'Texture';
NateWr marked this conversation as resolved.
Show resolved Hide resolved

$templateMgr->assign(array(
'documentUrl' => $documentUrl,
'textureUrl' => $this->_plugin->getTextureUrl($request),
'texturePluginUrl' => $this->_plugin->getPluginUrl($request),
'title' => $title
));
return $templateMgr->fetch($editorTemplateFile);
}
Expand Down
1 change: 1 addition & 0 deletions templates/editor.tpl
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<head>
<meta charset="UTF-8">
<meta name="jobId" content="{$documentUrl|escape}">
<title>{$title}</title>
NateWr marked this conversation as resolved.
Show resolved Hide resolved

{* Texture dependencies (see index.html in Texture distribution) *}
<link href="{$textureUrl|escape}/texture.css" rel="stylesheet" type="text/css"/>
Expand Down