Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i84 - update visibility label and help text #961

Merged
merged 1 commit into from
Jun 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion app/views/bulkrax/importers/_csv_fields.html.erb
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
<div class='csv_fields'>

<%= fi.input :visibility,
label: 'Default Visibility',
collection: [
['Public', 'open'],
['Private', 'restricted'],
['Institution', 'authenticated']
],
selected: importer.parser_fields['visibility'] || 'open',
input_html: { class: 'form-control' }
input_html: { class: 'form-control' },
hint: 'If your CSV includes the visibility field, it will override the default setting.'
Copy link
Contributor Author

@ShanaLMoore ShanaLMoore Jun 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a first pass, I implemented this following pre-existing bulkrax patterns, which doesn't seem to use locales or support translations.

ref: https://github.com/samvera/bulkrax/blob/main/app/views/bulkrax/importers/_csv_fields.html.erb#L23

I will time box my attempt at the translation way.

It seems doable with example,

  <%= fi.input :visibility,
    label: t('bulkrax.importer.labels.visibility'),
    collection: [
      ['Public', 'open'],
      ['Private', 'restricted'],
      ['Institution', 'authenticated']
    ],
    selected: importer.parser_fields['visibility'] || 'open',
    input_html: { class: 'form-control' },
    hint: t('bulkrax.importer.hints.visibility') 
  %>

but I will worry about translations at another time since nothing else on this form can be translated anyways.

%>

<% if defined?(::Hyrax) %>
Expand Down
Loading