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 -4
View File
@@ -1,8 +1,8 @@
<h1>Edit post</h1>
<p id="markdown-note">Note: You can use <%= link_to "Markdown", "https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet", target: "_blank" %>!</p>
<%= simple_form_for @post do |f|%>
<%= f.input :title, :label => false %>
<%= f.text_area :content, :label => false, input_html: {class: "full-width vertical"} %>
<%= form_for @post do |f|%>
<%= f.text_field :title %>
<%= render partial: "mdhelp" %>
<%= f.text_area :content, class: "vertical" %>
<p><%= f.submit "Update Post", class: "btn blue left" %></p>
<% end %>
<p><%= button_to "Delete post", @post, method: "delete", data: {confirm: "Delete post & comments forever?"}, class: "btn red right" %></p>
+2 -2
View File
@@ -3,9 +3,9 @@
<div id="posts">
<% @posts.each do |p| %>
<div class="item-group with-avatar" id="post-<%= p.id %>">
<%= link_to(image_tag(p.author.avatar_url(64), class: "avatar"), p.author, title: p.author.ign) %>
<div class="header">
<%= render partial: "users/username", locals: { user: p.author } %> <time><%= link_to p.created_at.strftime("%e. %b %Y, %H:%m"), p %></time>
<%= link_to(image_tag(p.author.avatar_url(64), class: "avatar"), p.author, title: p.author.ign) %>
<%= render partial: "users/username", locals: { user: p.author } %> <time><%= link_to p.created_at.strftime("%e. %b %Y, %H:%M"), p %></time>
<span class="comment-counter">
<%= link_to pluralize(p.comments.count, "Comment"), p %>
</span>
+4 -4
View File
@@ -1,7 +1,7 @@
<h1>New Post</h1>
<%= simple_form_for @post do |f|%>
<%= f.input :title, placeholder: "Title" %>
<p id="markdown-note">Note: You can use <%= link_to "Markdown", "https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet", target: "_blank" %>!</p>
<%= f.text_area :content, placeholder: "Text", input_html: {class: "full-width vertical"} %>
<%= form_for @post do |f|%>
<%= f.text_field :title, placeholder: "Title" %>
<%= render partial: "mdhelp" %>
<%= f.text_area :content, placeholder: "Text", input_html: {class: "vertical"} %>
<p><%= f.submit "Create Post", class: "btn blue left" %></p>
<% end %>
+2 -2
View File
@@ -1,8 +1,8 @@
<%= link_to "News", blogposts_path %><%= link_to @post.title %>
<div class="item-group post with-avatar" id="post-<%= @post.id %>">
<%= link_to(image_tag(@post.author.avatar_url(64), class: "avatar"), @post.author, title: @post.author.ign) %>
<div class="header">
<%= render partial: "users/username", locals: { user: @post.author } %> <time><%= link_to @post.created_at.strftime("%e. %b %Y, %H:%m"), p %></time>
<%= link_to(image_tag(@post.author.avatar_url(64), class: "avatar"), @post.author, title: @post.author.ign) %>
<%= render partial: "users/username", locals: { user: @post.author } %> <time><%= link_to @post.created_at.strftime("%e. %b %Y, %H:%M"), p %></time>
<%= link_to "edit", edit_blogpost_path(@post.id), class: "editlink" if mod? %>
</div>
<div class="items">