<%= form_for(@forum, html: { class: 'square' }) do |f| %>
<%= render 'shared/errors', messages: @forum.errors.full_messages %>
<%= f.label :title %>
<%= f.text_field :title %>
<%= f.label :description %>
<%= f.text_field :description %>
<%= f.label :category %>
<%= f.select :category_id, Category.domain(Category::DOMAIN_FORUMS).ordered.collect{|c| [c, c.id]} %>
<%= f.submit 'Save' %>
<% end %>
<% unless @forum.new_record? %>
Access Rights
If no groups are specified, everyone is allowed for the specific access type.
Group |
Access Level |
Options |
<% @forum.forumers.each do |forumer| %>
<%= namelink forumer.group %> |
<%= form_for forumer do |g| %>
<%= g.select :access, forumer.accesses.invert, size: 20 %>
<% end %>
|
<%= content_tag :a, { class: 'button tiny', data: { forumer: forumer.id } } do %>
Update
<% end %>
<%= link_to "Remove", forumer, method: :delete, class: 'button tiny' %>
|
<% end %>
<%= form_for @forum.forumers.build, html: { class: 'add-acl' } do |f| %>
<%= render 'shared/errors', messages: @forum.errors.full_messages %>
<%= f.hidden_field :forum_id %>
Grant Access
<%= f.select :group_id, Group.all.collect{|g| [g, g.id]} %>
<%= f.select :access, f.object.accesses.invert, :size => 20 %>
<%= f.submit "Add" %>
<% end %>
<% end %>