Sha256: 092a6c7068a25cb0fc57afd4c8d8c724a4112c501165a0d81050fa0e36a89f67
Contents?: true
Size: 1.77 KB
Versions: 14
Compression:
Stored size: 1.77 KB
Contents
%h1 Listing Access Control for #{parent.class.name} '#{parent.name}' %ul.listing#ace_listing - @access_control_entries.each do |ace| %li %ul.ace{:id=>ace.element_id} %li= ace.user.email if ace.user %li= ace.role.name if ace.role %li= ace.can ? "Can" : "Cannot" %li= ace.verb %li= ace.resource_type %li= ace.resource_id if ace.resource_id %li= ace.options_str if ace.options_str - if can? :edit, ace %li= link_to "Edit", edit_access_control_entry_path(ace), :remote=>true - if can? :destroy, ace %li= link_to "X", ace, :method=>:delete, :remote=>true, "data-confirm"=>"Are you sure?" - if can? :create, AccessControlEntry %h2 Enter a new Access Control Entry = form_for new_ace, :remote=>true do |f| = hidden_field_tag :container, "ace_listing" = hidden_field_tag :ajax_function, "append" %ul.ace_form_fields - if parent.is_a? User = hidden_field_tag :user_id, parent.id - else %li .fieldName Email = f.text_field :user_email, :class=>"email" - if parent.is_a? Role = hidden_field_tag :role_id, parent.id - else %li .fieldName Role = f.select :role, Role.collection_entries %li .fieldName Can? = f.check_box :can %li .fieldName verb = f.select :verb, %w(read manage create update destroy) - if parent.is_a?(User) || parent.is_a?(Role) %li .fieldName Resource = f.select :resource_type, [["Forum", "Forum"], ["Page", "Sitemap"]] = f.hidden_field :resource_id - else = hidden_field_tag parent.class.name.foreign_key.to_sym, parent.id %li = f.submit 'Save', :disable_with=>"Saving..."
Version data entries
14 entries across 14 versions & 1 rubygems