Sha256: 4f0bd72a1c8711c8b8a2892f0f16a78767557dfb0b5e50c1b9804467cd99a97d

Contents?: true

Size: 1.68 KB

Versions: 15

Compression:

Stored size: 1.68 KB

Contents

<% permission_service = Hyrax::EditPermissionsService.build_service_object_from(form: f, ability: current_ability) %>

<h2 class="h3 mt-4"><%= t('.currently_sharing') %></h2>

<table class="table table-bordered">
  <tr>
    <th><%= t('.table_title_user') %></th>
    <th><div class="col-sm-10"><%= t('.table_title_access') %></div></th>
  </tr>
  <tr id="file_permissions">
    <td>
      <%= label_tag :owner_access, class: "col-form-label" do %>
        Depositor (<span id="file_owner" data-depositor="<%= permission_service.depositor %>"><%= link_to_profile permission_service.depositor %></span>)
      <% end %>
    </td>
    <td>
    <div class="col-sm-10">
      <%= Hyrax.config.owner_permission_levels.keys[0] %>
    </div>
    </td>
  </tr>
  <%= f.fields_for :permissions do |permission_fields| %>
    <% permission_service.with_applicable_permission(permission_hash: permission_fields.object.to_hash) do |permission| %>
    <tr>
      <td>
        <%= permission_fields.label :agent_name, class: "col-form-label" do %>
          <%= user_display_name_and_key(permission.name) %>
          <%= permission.granted_by_html_hint %>
        <% end %>
      </td>
      <td>
        <div class="col-sm-10">
        <% if permission.can_edit? %>
          <%= permission_fields.select :access, Hyrax.config.permission_levels, {}, class: 'form-control select_perm' %>
        <% else %>
          <%= Hyrax.config.permission_levels.key(permission.access) %>
        <% end %>
        </div>
        <% if permission.can_edit? %>
          <button class="btn close remove_perm" data-index="<%= permission_fields.index %>">&times;</button>
        <% end %>
      </td>
    </tr>
    <% end %>
  <% end %>
</table>

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
hyrax-5.1.0.pre.beta1 app/views/hyrax/base/_currently_shared.html.erb
hyrax-5.0.4 app/views/hyrax/base/_currently_shared.html.erb
hyrax-5.0.3 app/views/hyrax/base/_currently_shared.html.erb
hyrax-5.0.2 app/views/hyrax/base/_currently_shared.html.erb
hyrax-5.0.1 app/views/hyrax/base/_currently_shared.html.erb
hyrax-5.0.0 app/views/hyrax/base/_currently_shared.html.erb
hyrax-5.0.0.rc3 app/views/hyrax/base/_currently_shared.html.erb
hyrax-5.0.0.rc2 app/views/hyrax/base/_currently_shared.html.erb
hyrax-5.0.0.rc1 app/views/hyrax/base/_currently_shared.html.erb
hyrax-4.0.0 app/views/hyrax/base/_currently_shared.html.erb
hyrax-4.0.0.rc3 app/views/hyrax/base/_currently_shared.html.erb
hyrax-4.0.0.rc2 app/views/hyrax/base/_currently_shared.html.erb
hyrax-4.0.0.rc1 app/views/hyrax/base/_currently_shared.html.erb
hyrax-4.0.0.beta2 app/views/hyrax/base/_currently_shared.html.erb
hyrax-4.0.0.beta1 app/views/hyrax/base/_currently_shared.html.erb