Closed briri closed 1 year ago
I have created new text fields for the Research Outputs Guidance. Note that I currently have tinymce enabled.
Where should this guidance appear?
If the guidance is to appear as a tooltip, I think the guidance needs to be plain text (no links, lists, tables).
Note that I have created the following fields in my PR:
@terrywbrady This should function as a tooltip and appear just to the right of the field.
Thanks @mariapraetzellis . For the Output Type, should the tooltip go on each field or just on the select box?
To start the conversation, I have inserted the tooltip on the page. I am not confident that it is in the correct place.
Terry and Maria discussed tooltip placement. New issues/tickets have been created.
@terrywbrady The Preferences tab should also be available for administrators who customize funder templates they did not create. For example, in this case, I am logged into the tool as a UCOP administrator and want to add customizations to this template: Department of Energy (DOE): Office of Science.
I tested and confirmed that the following features are working as expected:
Small change: can you fix the success message that appears when adding a Research Output? It currently reads: "Successfully added the researchoutput" and just needs to be split into two words "research output".
@briri , what permission check would I need to make to enable the tab as Maria requested?
I am currently checking template_modifiable
<% if template_modifiable?(template) %>
<li role="presentation" <%= active_page?(new_org_admin_template_phase_path(template.id)) ? ' class=active' : '' %>>
<%= link_to(_('Add new phase'), new_org_admin_template_phase_path(template.id), { 'aria-controls': 'add_phase', role: 'tab' }) %>
</li>
<li role="presentation" <%= active_page?(preferences_org_admin_template_path(template.id)) ? ' class=active' : '' %>>
<%= link_to(_('Preferences'), preferences_org_admin_template_path(template.id), { 'aria-controls': 'preferences', role: 'tab' }) %>
</li>
<% end %>
Adding:
def obj_name_for_display(obj)
display_name = {
...
ResearchOutput: _('Research Output'),
}
@terrywbrady, that template_modifiable?
is preventing the preferences tab from appearing when the admin is trying to customize a template. You should probably use template.latest? && template.id.present? && template.org_id = current_user.org.id
instead. This will just prevent it from appearing for historical versions and if the user is somehow viewing a template/customization that they do not own.
@mariapraetzellis I'm not sure if we've thought through this or not but, should an admin who is customizing a template be able to modify the preferences set by a funder admin? For example, if you set preferences for the FDP template, should an admin from Berkeley be able to add their own repositories, licenses, etc. or remove preferences you have defined?
@briri , I added this change https://github.com/CDLUC3/dmptool/commit/0807decf324203dabf4a4768ffc2ddb565eed830
Question, if you look at my policy rules, and I checking all of the right permissions or do these rules need to be stricter?
https://github.com/CDLUC3/dmptool/blob/tbstart5/app/policies/template_policy.rb#L12-L26
Yes, those are the correct permissions @terrywbrady
Add a new 'Preferences' tab to the page that organizational admins use when editing their own templates or when customizing a funder's template.
The change will need to be made to the template navigation partial.