OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Edit Metadata for Layout Editor

OJS development discussion, enhancement requests, third-party patches and plug-ins.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
The Public Knowledge Project Support Forum is moving to http://forum.pkp.sfu.ca

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.

Edit Metadata for Layout Editor

Postby lednakashim » Sat Aug 24, 2013 1:35 pm

Hi,
I am trying to modify OJS to support editing metadata as a layout editor - because our scientific editors are too busy to be bothered with those kinds of things. I think I am half way there, and any help would be greatly appreciated.

Modifications Made:
1. Added an include to
Code: Select all
submission/metadata/metadata.tpl

2. Added
Code: Select all
 $templateMgr->assign('canEditMetadata', true);
to
Code: Select all
./pages/layoutEditor/SubmissionLayoutHandler.inc.php


Right now the metadata shows up in a form that is not possible to edit. How do I make it editable.
lednakashim
 
Posts: 33
Joined: Wed Dec 29, 2010 10:23 pm

Re: Edit Metadata for Layout Editor

Postby asmecher » Wed Sep 04, 2013 5:35 pm

Hi lednakashim,

Can you post your modifications as a .diff? It would be easier to understand the changes you made that way.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm

Re: Edit Metadata for Layout Editor

Postby lednakashim » Fri Sep 06, 2013 8:53 pm

I got it working by also adding the associated actions to the layout editor php page.

I am stuck on another problem, allowing a layout editor to change the article scheduling. This is important because we the proof stage to occur after official publication, hence a layout editor needs to also schedule the issue.

I have added the following two lines to the submission page, but I can't get the variable
Code: Select all
issueOptions
to contain any data.



Code: Select all
        /**
         * Display layout editor submissions page.
         */
        function submissions($args) {
        import('classes.issue.IssueAction');
        $templateMgr->assign('issueOptions', IssueAction::getIssueOptions());



Shows up correctly ('Array") when logged in as an editor, but doesn't show up when logged in as a layout editor.
Code: Select all
<p>
{$issueOptions selected=$issueId}
</p>
lednakashim
 
Posts: 33
Joined: Wed Dec 29, 2010 10:23 pm

Re: Edit Metadata for Layout Editor

Postby asmecher » Mon Sep 09, 2013 8:55 am

Hi lednakashim,

It looks like you're calling $templateMgr->assign before you fetch the TemplateManager object. Also, your Smarty tag to display the $issueOptions variable isn't valid; check the Smarty documentation on how to work with arrays.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm


Return to OJS Development

Who is online

Users browsing this forum: No registered users and 1 guest