cleaned up, added threadreplies, added info
This commit is contained in:
4
app/views/threadreplies/_new.html.erb
Normal file
4
app/views/threadreplies/_new.html.erb
Normal file
@@ -0,0 +1,4 @@
|
||||
<%= form_for [reply.thread, reply] do |f| %>
|
||||
<%= f.text_area :content, placeholder: "Text" %>
|
||||
<p><%= f.submit "Reply", class: "btn blue" %></p>
|
||||
<% end %>
|
||||
12
app/views/threadreplies/_reply.html.erb
Normal file
12
app/views/threadreplies/_reply.html.erb
Normal file
@@ -0,0 +1,12 @@
|
||||
<div class="item-group thread-reply with-avatar" id="reply-<%= reply.id %>">
|
||||
<%= link_to(image_tag(reply.author.avatar_url(64), class: "avatar"), reply.author, title: reply.author.ign) %>
|
||||
<div class="header">
|
||||
<%= render partial: "users/username", locals: { user: reply.author } %> <time><%= link_to reply.created_at.strftime("%e. %b %Y, %H:%m"), "#reply-#{reply.id}" %></time>
|
||||
<%= link_to "edit", edit_forumthread_threadreply_path(reply.thread, reply), class: "editlink" if mod? || thread.author.is?(current_user) %>
|
||||
</div>
|
||||
<div class="items">
|
||||
<div class="item content">
|
||||
<%= render_md(reply.content).html_safe %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
6
app/views/threadreplies/edit.html.erb
Normal file
6
app/views/threadreplies/edit.html.erb
Normal file
@@ -0,0 +1,6 @@
|
||||
<%= link_to @reply.thread.forum.group, forumgroup_path(@reply.thread.forum.group) %> → <%= link_to @reply.thread.forum, @reply.thread.forum %> → <%= link_to @reply.thread %> → Edit reply
|
||||
<h1>Edit reply</h1>
|
||||
<%= form_for [@reply.thread, @reply] do |f| %>
|
||||
<%= f.text_area :content, placeholder: "Text" %>
|
||||
<p><%= f.submit "Reply", class: "btn blue" %></p>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user