more forum stuff

This commit is contained in:
jomo
2013-10-16 00:51:50 +02:00
parent 7c578874c9
commit b6115970dd
25 changed files with 208 additions and 55 deletions

View File

@@ -0,0 +1,17 @@
<%= 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 %>

View File

@@ -1,4 +1,4 @@
<div class='forum-path'><%= link_to @forum.group, forumgroup_path(@forum.group) %> → <%= link_to @forum %></div>
<%= link_to "Forums", forumgroups_path %> → <%= link_to @forum.group, "#{forumgroups_path}#forums-#{@forum.group.id}" %> → <%= link_to @forum %>
<h1><%= @forum.name %></h1>
<div id="forum_threads">
<% @threads.each do |thread| %>