features, bug fixes
This commit is contained in:
9
app/views/forumthreads/edit.html.erb
Normal file
9
app/views/forumthreads/edit.html.erb
Normal file
@@ -0,0 +1,9 @@
|
||||
<h1>Edit thread</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 [@thread.forum, @thread] do |f|%>
|
||||
<%= f.input :title, label: false %>
|
||||
<%= f.hidden_field :content, id: "epic-textarea", label: false, input_html: {class: "full-width vertical"} %>
|
||||
<div id="epic"></div>
|
||||
<%= f.submit "Update thread", class: "btn blue left" %>
|
||||
<% end %>
|
||||
<%= button_to "Delete thread", [@thread.forum, @thread], :method => "delete", :confirm => "Delete thread & comments forever?", class: "btn red right" %>
|
||||
@@ -1,17 +1,17 @@
|
||||
<%= link_to @forum.group, forumgroup_path(@forum.group) %> → <%= link_to @forum, @forum %> → New thread
|
||||
<h1>New thread</h1>
|
||||
<%= simple_form_for [@forum, @thread] do |f|%>
|
||||
<% if mod? %>
|
||||
<%= f.label :sticky %> <%= f.input :sticky %>
|
||||
<%= f.label :locked %> <%= f.input :locked %>
|
||||
<% end %>
|
||||
<div id="form_labels">
|
||||
<%= f.label :title %>
|
||||
<%= f.label :content, "Text" %>
|
||||
</div>
|
||||
<div id="form_inputs">
|
||||
<%= f.input :title, placeholder: "Title" %>
|
||||
<%= f.input :content, placeholder: "Text" %>
|
||||
</div>
|
||||
<% if mod? %>
|
||||
<%= f.input :sticky %> <%= f.label :sticky %>
|
||||
<%= f.input :locked %> <%= f.label :locked %>
|
||||
<% end %>
|
||||
<%= f.submit "Create forum", class: "btn blue" %><br>
|
||||
<%= f.hidden_field :content, id: "epic-textarea", placeholder: "Text" %>
|
||||
<div id="epic"></div>
|
||||
<%= f.submit "Create thread", class: "btn blue" %><br>
|
||||
<% end %>
|
||||
16
app/views/forumthreads/show.html.erb
Normal file
16
app/views/forumthreads/show.html.erb
Normal file
@@ -0,0 +1,16 @@
|
||||
<%= link_to @thread.forum.group, forumgroup_path(@thread.forum.group) %> → <%= link_to @thread.forum, @thread.forum %> → <%= link_to @thread %>
|
||||
<div class="post">
|
||||
<div class="thread-title">
|
||||
<h1><%= @thread.title %></h1>
|
||||
</div>
|
||||
<div class="thread-info"><%= link_user @thread.author %> on <%= @thread.created_at.strftime("%e. %b %Y") %>
|
||||
<% if mod? %>
|
||||
<%= link_to "edit", edit_forum_forumthread_path(@thread.forum, @thread), class: "thread-edit" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="thread-content">
|
||||
<%= Sanitize.clean(GitHub::Markdown.render_gfm(@thread.content), Sanitize::Config::RELAXED).html_safe %>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
(replies go here)
|
||||
Reference in New Issue
Block a user