Sha256: d8a54467c449f4021ae57bea3145c23733fcade5b19e9546f46ec808a3ef2102
Contents?: true
Size: 1.42 KB
Versions: 9
Compression:
Stored size: 1.42 KB
Contents
<% content_for :html_head do %> <% javascript_tag do %> jQuery(function($){ var cms_access_group_ids = <%= GroupType.cms_access.all.map{|e| e.id.to_s}.to_json %> $('#group_group_type_id').change(function() { if ($.inArray($('#group_group_type_id')[0].value, cms_access_group_ids) < 0) { $('#permissions').hide() $('#section-action').text('view') } else { $('#permissions').show() $('#section-action').text('edit') } }).change() }); <% end %> <% end %> <div id="permissions"> <div class="checkbox_group"> <label>Global Permissions</label> <%= hidden_field_tag "group[permission_ids][]", "" %> <div class="checkboxes"> <% Permission.all(:order => "name").each do |p| %> <div class="checkbox_fields"> <%= check_box_tag "group[permission_ids][]", p.id, @group.permissions.include?(p), :id => "permission_ids_#{p.id}", :class => "permission_ids" %> <label for="permission_ids_<%= p.id %>" style="width: 400px;#padding-top: 6px;"><%=h p.full_name %></label> </div> <div class="instructions"><%=h p.description %></div> <% end %> <div class="check_uncheck"> <%= link_to_check_all 'input.permission_ids' %>, <%= link_to_uncheck_all 'input.permission_ids' %> </div> </div> <br clear="all" /> <div style="clear: all; margin-top: -10px;"></div> </div> </div>
Version data entries
9 entries across 9 versions & 4 rubygems