[OJS 3.0.2] New Tab in Submission on Dashboard

Hi,

I want to customizing the Submissions page on the Dashboard. In detail, I want to have an additional tab showing the submission with supplemental data.
I tried to follow [Customizing the submissions page] but it is not for OJS 3.0.2.

I added a new tab in templates/dashboard/index.tpl but also created a new template file for the new tab. I basically copied active.tbl and changed all the names containing active.
I furthermore adjusted the file lib/pkp/pages/dashboard/DashboardHandler.inc.php by copying and renaming the function active.
I than copied the ActiveSubmissionGridListHandler and changed the names. I left the remaining code as it is to see if it is working. In theory, my new tab should be a copy of the active tab but with a different label.

I can see the tab but if I click on it, it stays blank. In the error console of my browser I found the error message:

Failed to load resource: the server responded with a status of 404 (Not Found) http://[2001:638:902:2003:7ce0:57ff:fea4:6996]/ojs/index.php/mr2/submissions/myPaperPackages?_=1504179715981

I do not know which resource OJS cannot find. Any help is welcome.

Hi @Lydia_Mueller,

I can only offer limited advice on this, since it’s hard to know exactly what you’re working with, and customizations can be very time-consuming for us to support – but have you added the new function to the list of available functions in the addRoleAssignment call in the constructor of DashboardHandler?

Regards,
Alec Smecher
Public Knowledge Project Team

No, I didn’t.

Now I have the desired data in the tab. It is a list of all submission of a user with some additional operations. I use the function ‘getByUserId’ of ‘SubmissionDAO’. I set the number of items to 10. But, it immediately loads all submissions. Furthermore, at the end of the list, it states ‘-10 of 37 items’.
I can accept that all submissions are loaded but the wrong number of items is really disturbing.

Where is this number calculated?

Hi @Lydia_Mueller,

I suspect this is related to the way you set the number of items to 10. It would be much easier to get a quick idea of what you’re working with if you were able to post your work in progress on github or something similar.

Regards,
Alec Smecher
Public Knowledge Project Team