LOTS of stuff
This commit is contained in:
@@ -1,17 +1,25 @@
|
||||
<%= link_to @group %> → New forum
|
||||
<h1>New forum</h1>
|
||||
<%= simple_form_for [@group, @forum] do |f|%>
|
||||
<div id="form_labels">
|
||||
<%= f.label :name %>
|
||||
<%= f.label :position %>
|
||||
<%= f.label :role_read_id, "Min read role" %>
|
||||
<%= f.label :role_write_id, "Min write role" %>
|
||||
</div>
|
||||
<div id="form_inputs">
|
||||
<%= f.input :name, placeholder: "Name" %>
|
||||
<%= f.input :position, placeholder: "Position" %>
|
||||
<%= f.input :role_read_id, as: :select, collection: Role.all_from(Role.get :default), include_blank: "None" %>
|
||||
<%= f.input :role_write_id, as: :select, collection: Role.all_from(Role.get :default), include_blank: false %>
|
||||
</div>
|
||||
<%= f.submit "Create forum", class: "btn blue" %>
|
||||
<% end %>
|
||||
<%= link_to @group, forumgroup_path(@group) %> → New forum
|
||||
<h1>New forum forum</h1>
|
||||
<% role_selection = Role.all_from_to(:normal, :admin).collect{|p|[p.name, p.id]} %>
|
||||
<%= form_for @forum do |f|%>
|
||||
<table>
|
||||
<tr>
|
||||
<td><%= f.label :name %></td>
|
||||
<td><%= f.text_field :name, placeholder: "Name" %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><%= f.label :position %></td>
|
||||
<td><%= f.number_field :position, placeholder: "Position" %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><%= f.label :role_read_id, "Min. read role" %></td>
|
||||
<td><%= f.select :role_read_id, role_selection, include_blank: "None" %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><%= f.label :role_write_id, "Min. write role" %></td>
|
||||
<td><%= f.select :role_write_id, role_selection, include_blank: false %></td>
|
||||
</tr>
|
||||
</table>
|
||||
<%= f.hidden_field :forumgroup_id, value: @group.id %>
|
||||
<%= f.submit "Create forum", class: "btn blue" %>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user