<%# Copyright © 2012 The Pennsylvania State University Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. %> <% depositor = gf.depositor || GenericFile.find(:is_part_of_s => "info:fedora/#{batch.pid}").first.depositor %> <% public_perm = gf.permissions.map { |perm| perm[:access] if perm[:name] == "public"}.compact.first %> <% public_perm = true if params[:controller] == 'batch' %> <% psu_perm = gf.permissions.map { |perm| perm[:access] if perm[:name] == "registered"}.compact.first %>

<% if params[:controller] == 'batch' %>Bulk <% end %>Permissions <% if params[:controller] == 'batch' %>(applied to all files just uploaded)<% end %>

Permissions are not saved until the "Save" button is pressed at the bottom of the page.
×

What's this

Visibility - who should have the ability to read and download

Share With (optional)

Enter <%=t('sufia.account_label') %> (one at a time)

<%= text_field_tag 'new_user_name_skel', nil, :class => "span29" %><%=t('sufia.directory.suffix') %> <%= select_tag 'new_user_permission_skel', options_for_select(Sufia::Engine.config.permission_levels), :class=> 'span17' %>
<% @groups.unshift('Select a group') %> <%= select_tag 'new_group_name_skel', options_for_select(@groups), :class => 'span38' %> <%= select_tag 'new_group_permission_skel', options_for_select(Sufia::Engine.config.permission_levels), :class => 'span17' %>
<% gf.permissions.each do |permission| %> <%-# skip the public, penn state (aka registered), and depositor perms as they are displayed first at the top -%> <% next if permission[:name].downcase == 'public' %> <% next if permission[:name].downcase == 'registered' %> <% next if permission[:name].downcase == depositor %> <% end %>
Person/Group Access Level
<%= label_tag :owner_access, "Depositor (#{link_to_profile depositor})".html_safe, :class=>"control-label" %> <%= Sufia::Engine.config.owner_permission_levels.keys[0] %>
<%= label_tag "generic_file[permissions][#{permission[:type]}][#{permission[:name]}]", permission[:name], :class=>"control-label" %> <%= select_tag "generic_file[permissions][#{permission[:type]}][#{permission[:name]}]", options_for_select(Sufia::Engine.config.permission_levels, permission[:access]), :class=>'span20 select_perm' %>
<%= button_tag ' Save'.html_safe, :type => 'submit', :class => 'btn-primary btn-large', :onclick => "confirmation_needed = false;", :id => "upload_submit", :name => "update_permission" %>