CDLUC3 / dmptool

DMPTool version of the DMPRoadmap codebase
https://dmptool.org
MIT License
56 stars 13 forks source link

Make several default templates available in dmptool #480

Closed fcsousaunifesp closed 3 months ago

fcsousaunifesp commented 1 year ago

Please complete the following fields as applicable:

What version of the DMPRoadmap code are you running? (v4.0.9)

Good afternoon, I'm working on a dmptoll fork, and I've created a model that I would like to be available in my application,for each and every user, as the default template. Could you tell me what the procedures are? Informing what I need, in this case it is possible to include, later some other models that I am creating, and that these can be made available as standard, repeating, for each and every user, as the default template..

Thanks a lot!

briri commented 1 year ago

Hi @fcsousaunifesp

The code currently only supports a single default template. This is set via the is_default flag in the templates table.

After a user specifies their research institution and funder on the 'Create Plan' page, this code in the template_options_controller.rb is executed. This is where the default template is pulled in.

You should be able to update the logic in your fork to load multiple templates instead of just one. To do that you will have to update:

If you do modify your code, please consider sending us a PR. I think the change sounds like it would be useful :)