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
+4 -2
View File
@@ -1,7 +1,9 @@
<div class="item-group with-avatar comment" id="comment-<%= c.id %>">
<%= link_to(image_tag(c.author.avatar_url(64), class: "avatar"), c.author, title: c.author.ign) %>
<div class="header <%= "op" if c.author.is?(c.blogpost.author) %>">
<%= render partial: "users/username", locals: { user: c.author } %> <time><%= link_to c.created_at.strftime("%e. %b %Y, %H:%m"), [c.blogpost, c] %></time>
<%= link_to(image_tag(c.author.avatar_url(64), class: "avatar"), c.author, title: c.author.ign) %>
<%= render partial: "users/username", locals: { user: c.author } %>
<time><%= link_to c.created_at.strftime("%e. %b %Y, %H:%M"), "#comment-#{c.id}" %></time>
<%= link_to "edit", edit_blogpost_comment_path(c.blogpost, c), class: "editlink" if (mod? || c.author.is?(current_user)) %>
</div>
<div class="items">
+4 -4
View File
@@ -1,8 +1,8 @@
<% if current_user %>
<h3>New comment</h3>
<%= simple_form_for [@post, @comment] do |f| %>
<p><blockquote>&gt; quote</blockquote> | _underline_ | <i>*italic*</i> | <b>**bold**</b> | <code>`code`</code> | <mark>==mark==</mark> | <a>[link](https://example.com)</a>
<%= f.input :content, :label => false, :as => "text", :placeholder => "Comment", input_html: {class: "comment"} %>
<%= f.submit class: "btn blue" %>
<%= form_for [@post, @comment] do |f| %>
<%= render partial: "mdhelp" %>
<%= f.text_area :content, placeholder: "Comment", class: "comment" %>
<p><%= f.submit class: "btn blue" %></p>
<% end %>
<% end %>
+3 -2
View File
@@ -1,7 +1,8 @@
<h1>Edit comment</h1>
<%= simple_form_for [@comment.blogpost, @comment] do |f| %>
<%= f.input :content, label: false, as: "text", placeholder: "Comment" %>
<%= form_for [@comment.blogpost, @comment] do |f| %>
<%= render partial: "mdhelp" %>
<%= f.text_area :content, placeholder: "Comment" %>
<p><%= f.submit "Update Comment", class: "btn blue left" %></p>
<% end %>
<p><%= button_to "Delete comment", [@comment.blogpost, @comment] , method: "delete", data: {confirm: "Delete comment forever?"}, class: "btn red right" %></p>