more fixes, changes, support for new mojang API
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<%= link_to @forum.group, forumgroup_path(@forum.group) %> → <%= link_to @forum.name, @forum %>
|
||||
<%= link_to "(Edit) #{@forum.group.name}", edit_forumgroup_path(@forum.group) %> → <%= link_to @forum.name, @forum %>
|
||||
<h1>Edit Forum</h1>
|
||||
<% role_selection = Role.all_from_to(:normal, :admin).collect{|p|[p.name, p.id]} %>
|
||||
<%= form_for @forum do |f|%>
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
|
||||
<div class="items bold">
|
||||
<% group.forums.each do |f| %>
|
||||
<%= link_to f.name, f, class: "item" %>
|
||||
<% if f.can_read?(current_user) %>
|
||||
<%= link_to f.name, f, class: "item" %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -20,6 +20,6 @@
|
||||
<td><%= f.select :role_write_id, role_selection, include_blank: false %></td>
|
||||
</tr>
|
||||
</table>
|
||||
<%= f.hidden_field :forumgroup_id, value: @forum.group.id %>
|
||||
<%= f.hidden_field :forumgroup_id %>
|
||||
<p><%= f.submit "Create forum", class: "btn blue" %></p>
|
||||
<% end %>
|
||||
@@ -17,5 +17,6 @@
|
||||
<%= f.text_field :title, placeholder: "Title" %>
|
||||
</div>
|
||||
<%= f.text_area :content, placeholder: "Text" %>
|
||||
<%= f.hidden_field :forum_id %>
|
||||
<p><%= f.submit "Create thread", class: "btn blue" %></p>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user