Archived
cleaned up, added threadreplies, added info
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
<h1>Edit Info</h1>
|
||||
<%= form_for @info do |f|%>
|
||||
<%= f.text_field :title, :label => false %>
|
||||
<%= f.text_area :content, :label => false, input_html: {class: "full-width vertical"} %>
|
||||
<p><%= f.submit "Update Info", class: "btn blue left" %></p>
|
||||
<% end %>
|
||||
<p><%= button_to "Delete Info", @info, method: "delete", data: {confirm: "Delete Info forever?"}, class: "btn red right" %></p>
|
||||
@@ -0,0 +1,9 @@
|
||||
<h1>Info</h1>
|
||||
<ul>
|
||||
<% @info.each do |info| %>
|
||||
<li><%= link_to info.title, info %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% if mod? %>
|
||||
<%= link_to "New Info", new_info_path, class: "btn blue" %>
|
||||
<% end %>
|
||||
@@ -0,0 +1,6 @@
|
||||
<h1>New Info</h1>
|
||||
<%= form_for @info, url: info_index_path do |f|%>
|
||||
<%= f.text_field :title, placeholder: "Title" %>
|
||||
<%= f.text_area :content, placeholder: "Text", input_html: {class: "full-width vertical"} %>
|
||||
<p><%= f.submit "Create Info", class: "btn blue left" %></p>
|
||||
<% end %>
|
||||
@@ -0,0 +1,3 @@
|
||||
<%= link_to "Info", info_index_path %> → <%= @info.title %>
|
||||
<h1><%= @info.title %></h1>
|
||||
<div class="post"><%= render_md(@info.content).html_safe %></div>
|
||||
Reference in New Issue
Block a user