Skip to content
This repository has been archived by the owner on May 14, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1051 from pulibrary/suppress-embargo-lease
Browse files Browse the repository at this point in the history
Suppress display of embargo/release visibility options
  • Loading branch information
Trey Pendragon committed Feb 28, 2017
2 parents cb2eaa3 + 44d6884 commit 1eb8074
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
30 changes: 30 additions & 0 deletions app/views/hyrax/base/_form_visibility_component.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!-- hyrax view overridden to suppress embargo/lease options -->
<fieldset>
<legend class="legend-save-work">Visibility</legend>
<ul class="visibility">
<li class="radio">
<label>
<%= f.radio_button :visibility, Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_PUBLIC, data: { 'target': '#collapsePublic' } %>
<%= visibility_badge(Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_PUBLIC) %>
<%= t('hyrax.visibility.open.note_html', type: f.object.human_readable_type) %>
<div class="collapse" id="collapsePublic">
<%= t('hyrax.visibility.open.warning_html', label: visibility_badge(Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_PUBLIC)) %>
</div>
</label>
</li>
<li class="radio">
<label>
<%= f.radio_button :visibility, Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_AUTHENTICATED %>
<%= visibility_badge(Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_AUTHENTICATED) %>
<%= t('hyrax.visibility.authenticated.note_html', institution: institution_name) %>
</label>
</li>
<li class="radio">
<label>
<%= f.radio_button :visibility, Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_PRIVATE %>
<%= visibility_badge(Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_PRIVATE) %>
<%= t('hyrax.visibility.private.note_html') %>
</label>
</li>
</ul>
</fieldset>
2 changes: 2 additions & 0 deletions spec/features/new_scanned_resource_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
expect(page).to_not have_selector("label.label-warning", text: "Pending")
expect(page).to_not have_text("To create a separate work for each of the files")
expect(page).to_not have_text("The more descriptive information you provide")
expect(page).to_not have_selector("span.warning", text: "Embargo")
expect(page).to_not have_selector("span.warning", text: "Lease")

fill_in 'scanned_resource_title', with: 'Test Title'
expect(page).to have_select 'scanned_resource_rights_statement', selected: 'No Known Copyright'
Expand Down

0 comments on commit 1eb8074

Please sign in to comment.