Sha256: 8bd8c9442d1668ed7f4f40a8b7c6c1ccd34c4d255b7465a84c2cdcef76143c42

Contents?: true

Size: 943 Bytes

Versions: 49

Compression:

Stored size: 943 Bytes

Contents

<h1>New User Group</h1>

<%% form_for(<%= namespace.blank? ? '@user_group' : "[:#{namespace}, @user_group]"  %>) do |f| %>
  <%%= f.error_messages %>
  <p>
    <b>Name</b><br />
    <%%= f.text_field :name %>
  </p>
  <p>
    <b>Permissions</b><br />
    <ul style="list-style: none;">
      <%% 
        @all_permissions.each_with_index do |perm,i|
          input_id = "perm_#{perm.id}"
          checked = (@user_group.permission_ids.include?(perm.id) ? "checked" : "")          
      %>
          <li id="li_<%%= input_id %>">
            <label for="<%%= input_id %>">
              <input id="<%%= input_id %>" name="<%%= input_id %>" type="checkbox" <%%= checked %>/>&nbsp;&nbsp;<%%= perm.name %>
            </label>
          </li>
      <%% 
        end
      %>
    </ul>
  </p>

  <p> <%%= f.submit "Create" %> </p>
<%% end %>

<%%= link_to 'Back', <%= namespace.blank? ? 'user_groups_path' : "#{namespace}_user_groups_path" %> %>

Version data entries

49 entries across 49 versions & 6 rubygems

Version Path
andrewzielinski-lockdown-0.9.6 rails_generators/lockdown/templates/app/views/user_groups/new.html.erb
blaxter-lockdown-0.9.8.99 rails_generators/lockdown/templates/app/views/user_groups/new.html.erb
blaxter-lockdown-0.9.9 rails_generators/lockdown/templates/app/views/user_groups/new.html.erb
hone-lockdown-1.2.1 rails_generators/lockdown/templates/app/views/user_groups/new.html.erb
hone-lockdown-1.2.2 rails_generators/lockdown/templates/app/views/user_groups/new.html.erb
hone-lockdown-1.2.3 rails_generators/lockdown/templates/app/views/user_groups/new.html.erb
revo-lockdown-0.9.6 rails_generators/lockdown/templates/app/views/user_groups/new.html.erb
lockdown_vail-1.6.2.1 rails_generators/lockdown/templates/app/views/user_groups/new.html.erb
lockdown-1.6.5 rails_generators/lockdown/templates/app/views/user_groups/new.html.erb
revo-lockdown-1.6.2.2 rails_generators/lockdown/templates/app/views/user_groups/new.html.erb
lockdown-1.6.4 rails_generators/lockdown/templates/app/views/user_groups/new.html.erb
lockdown-1.6.3 rails_generators/lockdown/templates/app/views/user_groups/new.html.erb
revo-lockdown-1.6.2.1 rails_generators/lockdown/templates/app/views/user_groups/new.html.erb
revo-lockdown-1.6.2 rails_generators/lockdown/templates/app/views/user_groups/new.html.erb
lockdown-1.6.2 rails_generators/lockdown/templates/app/views/user_groups/new.html.erb
lockdown-1.6.1 rails_generators/lockdown/templates/app/views/user_groups/new.html.erb
lockdown-1.6.0 rails_generators/lockdown/templates/app/views/user_groups/new.html.erb
lockdown-1.5.1 rails_generators/lockdown/templates/app/views/user_groups/new.html.erb
lockdown-1.5.0 rails_generators/lockdown/templates/app/views/user_groups/new.html.erb
lockdown-1.3.2 rails_generators/lockdown/templates/app/views/user_groups/new.html.erb