a TON of bugfixes and new features

This commit is contained in:
jomo
2014-04-28 03:01:33 +02:00
parent a6ba503e73
commit 65f5adf65d
59 changed files with 1023 additions and 970 deletions
+3 -2
View File
@@ -1,7 +1,8 @@
<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"} %>
<%= f.text_field :title%>
<%= render partial: "mdhelp" %>
<%= f.text_area :content, class: "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>
+4 -4
View File
@@ -1,9 +1,9 @@
<h1>Info</h1>
<% if mod? %>
<%= link_to "New Info", new_info_path, class: "btn blue" %>
<% end %>
<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 %>
</ul>
+2 -1
View File
@@ -1,6 +1,7 @@
<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"} %>
<%= render partial: "mdhelp" %>
<%= f.text_area :content, placeholder: "Text", class: "vertical" %>
<p><%= f.submit "Create Info", class: "btn blue left" %></p>
<% end %>
+2
View File
@@ -1,3 +1,5 @@
<%= link_to "Info", info_index_path %><%= @info.title %>
<%= link_to "Edit Info", edit_info_path(@info), class: "btn blue right" %>
<div class="clear"></div>
<h1><%= @info.title %></h1>
<div class="post"><%= render_md(@info.content).html_safe %></div>