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
+13 -4
View File
@@ -11,12 +11,21 @@
<td><%= f.label :locked %></td>
<td><%= f.check_box :locked %></td>
</tr>
<tr>
<td><%= f.label :forum_id, "Move thread" %></td>
<%
forums = []
Forum.all.sort_by{ |f| f.forumgroup.position || 0 }.each do |f|
forums << ["#{f.forumgroup.name}#{f.name}", f.id]
end
%>
<td><%= f.select :forum_id, forums %></td>
</tr>
<% end %>
</table>
<div id="form_inputs">
<%= f.text_field :title, placeholder: "Title" %>
</div>
<%= f.text_field :title, placeholder: "Title" %>
<%= render partial: "mdhelp" %>
<%= f.text_area :content, placeholder: "Text" %>
<p><%= f.submit "Update thread", class: "btn blue" %></p>
<p><%= f.submit "Update thread", class: "btn blue left" %></p>
<% end %>
<%= button_to "Delete thread", @thread, :method => "delete", data: {confirm: "Delete thread & comments forever?"}, class: "btn red right" %>
+2 -3
View File
@@ -13,9 +13,8 @@
</tr>
<% end %>
</table>
<div id="form_inputs">
<%= f.text_field :title, placeholder: "Title" %>
</div>
<%= f.text_field :title, placeholder: "Title" %>
<%= render partial: "mdhelp" %>
<%= f.text_area :content, placeholder: "Text" %>
<%= f.hidden_field :forum_id %>
<p><%= f.submit "Create thread", class: "btn blue" %></p>
+7 -2
View File
@@ -1,11 +1,16 @@
<%= link_to @thread.forum.group, forumgroup_path(@thread.forum.group) %><%= link_to @thread.forum, @thread.forum %><%= link_to @thread %>
<div class="item-group thread with-avatar" id="thread-<%= @thread.id %>">
<%= link_to(image_tag(@thread.author.avatar_url(64), class: "avatar"), @thread.author, title: @thread.author.ign) %>
<div class="header">
<%= render partial: "users/username", locals: { user: @thread.author } %> <time><%= link_to @thread.created_at.strftime("%e. %b %Y, %H:%m"), p %></time>
<%= link_to(image_tag(@thread.author.avatar_url(64), class: "avatar"), @thread.author, title: @thread.author.ign) %>
<%= render partial: "users/username", locals: { user: @thread.author } %> <time><%= link_to @thread.created_at.strftime("%e. %b %Y, %H:%M"), p %></time>
<%= link_to "edit", edit_forumthread_path( @thread), class: "editlink" if (@thread.author.is?(current_user) || mod?) %>
</div>
<div class="items">
<% if @thread.edited? %>
<div class="item edited">
Last edited <time><%= @thread.updated_at.strftime("%e. %b %Y, %H:%M") %></time> by <%= link_to @thread.editor.name, @thread.editor %>.
</div>
<% end %>
<div class="item content">
<h2 class="headline"><%= link_to truncate(@thread.title, length: 60, omission: " …"), p %></h2>
<%= render_md(@thread.content).html_safe %>