Sha256: 9cd13e7637084ebce82e2687d8a23a9f907ea214abde5c8e44e3ee323dc7ffec
Contents?: true
Size: 1.74 KB
Versions: 7
Compression:
Stored size: 1.74 KB
Contents
<form> <h2>1. Choose permission to change</h2> <p class="action-options"> <label>Privilege</label> <%= select_tag :privilege, options_for_select(@privileges.map(&:to_s).sort, @privilege.to_s) %> <br/> <label>On</label> <%= select_tag :context, options_for_select(@contexts.map(&:to_s).sort, @context.to_s) %> <br/> <%= link_to_function "Current permissions", "show_current_permissions()", :class => 'unimportant' %> </p> <h2>2. Whose permission should be changed?</h2> <table class="change-options"> <thead> <tr> <td>User</td> <td>Current roles</td> <td class="choose">?</td> <td class="choose">Yes</td> <td class="choose">No</td> </tr> </thead> <tbody> <% @users.each do |user| %> <tr class="<%= controller.authorization_engine.permit?(@privilege, :context => @context, :user => user, :skip_attribute_test => true) ? 'permitted' : 'not-permitted' %>"> <td class="user_id"><%=h user.id %></td> <td style="font-weight:bold"><%=h user.login %></td> <td><%=h user.role_symbols * ', ' %></td> <td><%= radio_button_tag "user[#{user.id}][permission]", "undetermined", true %></td> <td class="yes"><%= radio_button_tag "user[#{user.id}][permission]", "yes" %></td> <td class="no"><%= radio_button_tag "user[#{user.id}][permission]", "no" %></td> </tr> <% end %> <tr> <td colspan="5" style="text-align:right; padding-top:0.5em" class="unimportant"> <span style="background: #FFE599;"> </span> Current permission </td> </tr> </tbody> </table> <h2 style="display:none">Prohibited actions</h2> <ul id="prohibited_actions"></ul> <p class="submit"> <%= button_to_function "Suggest Changes", "suggest_changes()" %> </p> </form>
Version data entries
7 entries across 7 versions & 3 rubygems