Closed asmecher closed 2 years ago
I've been working on a select-all toggle for the new SelectListPanel
components. This only selects all visible submissions. We probably want an "export all" button that does all of them, not just those in the ListPanel
, but here's a start anyway.
PRs: https://github.com/pkp/pkp-lib/pull/2936 https://github.com/pkp/ui-library/pull/4 https://github.com/pkp/ojs/pull/1628 https://github.com/pkp/omp/pull/458
Tests running.
@bozana could you code review?
@NateWr, for some reason now I do not see any article listed in my submission lists, also not in the export. Do I maybe miss something? :-\
EDIT: ah me crazy, I was looking into a newly created and empty journal :-P Sorry!
Phew!
OK, I've updated the PRs with the comment from your review.
Great @NateWr! You can then merge when ready!
All merged! I'll leave this open for some of the other parts of the feature request.
Some time the other export plugins will have to be migrated to vue.js. Shall this feature request for those plugins wait till it is done or shall I implement something right now?
I'd say go for it if you're already working on them!
@NateWr, what do you think where to put such a function? Would it be OK to have such a checkbox "Select All" below the grid?
@bozana If you spin up the UI Library (cd lib/ui-library & npm install & npm run dev
), then go to SelectListPanel
, you'll see an example on the right with a select all list. You can add the select all feature to a SelectListPanel
component by passing a showSelectAll
key set to true
.
However, that's different from an "Export All" button, which would export all items whether they're loaded into the list panel or not. I think the "Export All" button should probably appear below the grid, next to the Export button.
@NateWr, the DOI export plugins do not use Vue.js yet, so I cannot use the solution from UI Library, right?
And, I would rather not implement "Export All" button because those exports take sooooo muuuuuch time, that a timeout will surely occur -- especially if a journal has a lot of back issues with 1000 of articles that should be exported/registered. Thus I would prefer an "Select All" option just for one grid page. (Also, if there would be "Export All" button, there should be also "Register All"). What do you think?
@NateWr, the DOI export plugins do not use Vue.js yet, so I cannot use the solution from UI Library, right?
You can! Components from the UI Library can be instantiated and fed data similar to how our existing JS components work, by creating a <script>
tag and using a small helper function.
Here's how the CitationStyleLanguage plugin generates the data array for a SelectListPanel:
It passes that data as JSON
to the template:
And then initializes the SelectListPanel
with the data:
https://github.com/pkp/citationStyleLanguage/blob/master/templates/settings.tpl#L30-L37
This is also described at the bottom of some documentation I wrote recently. Scroll down to the section on "UI Handlers and Vue.js Components":
https://www.gitbook.com/book/natewr/ojs-3-1-overview-of-api-driven-architecture/details
@bozana I found a regression in the citationStyleLanguage plugin related to my previous PR. Can you review these PRs?
https://github.com/pkp/ojs/pull/1653 https://github.com/pkp/citationStyleLanguage/pull/9
You can test by going to Settings > Website > Plugins > Citation Style Language > Settings. Enabled styles should be pre-selected when the form is loaded.
+1 from PKP|PS (for DOAJ specifically)
I think that this is getting covered by #6062 for DOIs, and we would use a similar approach for other kinds of exports in the future, rather than modify the existing grids. Closing this for now but let's open a new issue for any specific use cases where an export/deposit all feature is required.
See http://forum.pkp.sfu.ca/t/select-all-button-in-tools-import-export-in-ojs-3-x/26699 for feature request.