more forum stuff
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
<div id="forum_groups">
|
||||
<% @groups.each do |group| %>
|
||||
<div class="group" id="forum-<%= group.id %>">
|
||||
<div class="group" id="forums-<%= group.id %>">
|
||||
<div class="header">
|
||||
<%= group.name %>
|
||||
</div>
|
||||
|
||||
<div class="forums">
|
||||
<% group.forums.sort_by{|s| s[:position]}.each do |f| %>
|
||||
<div class="forum">
|
||||
<%= link_to f.name, f %>
|
||||
</div>
|
||||
<% group.forums.each do |f| %>
|
||||
<div class="forum">
|
||||
<%= link_to f.name, f %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
||||
16
app/views/forumgroups/new.html.erb
Normal file
16
app/views/forumgroups/new.html.erb
Normal file
@@ -0,0 +1,16 @@
|
||||
<h1>New forum group</h1>
|
||||
<%= simple_form_for @group 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 group", class: "btn blue" %>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user