remove mini markdown renderer everywhere

was still used for comment emails etc
This commit is contained in:
jomo
2015-01-26 00:42:58 +01:00
parent f0c0c1c20e
commit 374f602163
19 changed files with 16 additions and 60 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
<div class="md_editor <%= "mini" if mini %>">
<div class="md_editor">
<%= render partial: 'mdhelp' %>
<div class="field_container">
<div class="preview-button btn dark">Preview</div>
+1 -1
View File
@@ -3,7 +3,7 @@
<h1>Edit post</h1>
<%= form_for @post do |f|%>
<%= f.text_field :title %>
<%= render partial: "md_editor", locals: {name: "blogpost[content]", content: @post.content, mini: false} %>
<%= render partial: "md_editor", locals: {name: "blogpost[content]", content: @post.content} %>
<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>
+1 -1
View File
@@ -3,7 +3,7 @@
<h1>New Post</h1>
<%= form_for @post do |f|%>
<%= f.text_field :title, placeholder: "Title" %>
<%= render partial: "md_editor", locals: {name: "blogpost[content]", content: @post.content, mini: false} %>
<%= render partial: "md_editor", locals: {name: "blogpost[content]", content: @post.content} %>
<p><%= f.submit "Create Post", class: "btn blue left" %></p>
<div class="clear"></div>
<% end %>
+1 -1
View File
@@ -1,5 +1,5 @@
<h3>New comment</h3>
<%= form_for [@post, @comment] do |f| %>
<%= render partial: "md_editor", locals: {name: "comment[content]", content: @comment.content, mini: false} %>
<%= render partial: "md_editor", locals: {name: "comment[content]", content: @comment.content} %>
<p><%= f.submit class: "btn blue" %></p>
<% end %>
+1 -1
View File
@@ -3,7 +3,7 @@
<h1>Edit comment</h1>
<%= form_for [@comment.blogpost, @comment] do |f| %>
<%= render partial: "md_editor", locals: {name: "comment[content]", content: @comment.content, mini: false} %>
<%= render partial: "md_editor", locals: {name: "comment[content]", content: @comment.content} %>
<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>
+1 -1
View File
@@ -34,7 +34,7 @@
<div class="table-cell full-width">
<%= f.text_field :title, placeholder: "Title" %>
</div>
<%= render partial: "md_editor", locals: {name: "forumthread[content]", content: @thread.content, mini: false} %>
<%= render partial: "md_editor", locals: {name: "forumthread[content]", content: @thread.content} %>
<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" %>
+1 -1
View File
@@ -28,7 +28,7 @@
<div class="table-cell full-width">
<%= f.text_field :title, placeholder: "Title" %>
</div>
<%= render partial: "md_editor", locals: {name: "forumthread[content]", content: @thread.content, mini: false} %>
<%= render partial: "md_editor", locals: {name: "forumthread[content]", content: @thread.content} %>
<%= f.hidden_field :forum_id %>
<p><%= f.submit "Create thread", class: "btn blue left" %></p>
<div class="clear"></div>
+1 -1
View File
@@ -3,7 +3,7 @@
<h1>Edit Info</h1>
<%= form_for @info do |f|%>
<%= f.text_field :title%>
<%= render partial: "md_editor", locals: {name: "info[content]", content: @info.content, mini: false} %>
<%= render partial: "md_editor", locals: {name: "info[content]", content: @info.content} %>
<p><%= f.submit "Update Info", class: "btn blue left" %></p>
<% end %>
<p><%= button_to "Delete Info", @info, method: "delete", data: {confirm: "Delete Info forever?"}, class: "btn red right" %></p>
+1 -1
View File
@@ -3,7 +3,7 @@
<h1>New Info</h1>
<%= form_for @info, url: info_index_path do |f|%>
<%= f.text_field :title, placeholder: "Title" %>
<%= render partial: "md_editor", locals: {name: "info[content]", content: @info.content, mini: false} %>
<%= render partial: "md_editor", locals: {name: "info[content]", content: @info.content} %>
<p><%= f.submit "Create Info", class: "btn blue left" %></p>
<div class="clear"></div>
<% end %>
@@ -5,8 +5,7 @@
<p><%= link_to @comment.author.name, user_url(@comment.author), style: "text-decoration: none; color: #4096EE;" %> has replied to '<%= @comment.blogpost.title %>' on the Redstoner blog!</p>
<blockquote>
<%# TODO: fix relative links + iframes %>
<%= render_mini_md(@comment.content).html_safe %>
<%= render_md(@comment.content).html_safe %>
</blockquote>
<p><%= link_to "Click here", blogpost_url(@comment.blogpost) + "#comment-#{@comment.id}", style: "text-decoration: none; color: #4096EE;" %> to view the blog post.</p>
@@ -5,8 +5,7 @@
<p><%= link_to @comment.author.name, user_url(@comment.author), style: "text-decoration: none; color: #4096EE;" %> has mentioned you in '<%= @comment.blogpost.title %>' on the Redstoner blog!</p>
<blockquote>
<%# TODO: fix relative links + iframes %>
<%= render_mini_md(@comment.content).html_safe %>
<%= render_md(@comment.content).html_safe %>
</blockquote>
<p><%= link_to "Click here", blogpost_url(@comment.blogpost) + "#comment-#{@comment.id}", style: "text-decoration: none; color: #4096EE;" %> to view the blog post.</p>
@@ -5,8 +5,7 @@
<p><%= link_to @post.author.name, user_url(@post.author), style: "text-decoration: none; color: #4096EE;" %> has mentioned you in '<%= @post.title %>' on the Redstoner blog!</p>
<blockquote>
<%# TODO: fix relative links + iframes %>
<%= render_mini_md(@post.content).html_safe %>
<%= render_md(@post.content).html_safe %>
</blockquote>
<p><%= link_to "Click here", blogpost_url(@post), style: "text-decoration: none; color: #4096EE;" %> to view the blog post.</p>
+1 -1
View File
@@ -1,4 +1,4 @@
<%= form_for [reply.thread, reply] do |f| %>
<%= render partial: "md_editor", locals: {name: "threadreply[content]", content: reply.content, mini: false} %>
<%= render partial: "md_editor", locals: {name: "threadreply[content]", content: reply.content} %>
<p><%= f.submit "Reply#{ ' (Locked)' if reply.thread.locked? }", class: "btn blue" %></p>
<% end %>
+1 -1
View File
@@ -3,7 +3,7 @@
<%= 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| %>
<%= render partial: "md_editor", locals: {name: "threadreply[content]", content: @reply.content, mini: false} %>
<%= render partial: "md_editor", locals: {name: "threadreply[content]", content: @reply.content} %>
<p><%= f.submit "Reply", class: "btn blue left" %></p>
<% end %>
<p><%= button_to "Delete reply", [@reply.thread, @reply], method: "delete", data: {confirm: "Delete reply forever?"}, class: "btn red right" %></p>
+1 -1
View File
@@ -67,7 +67,7 @@
<tr>
<td>About you</td>
<td>
<%= render partial: "md_editor", locals: {name: "user[about]", content: @user.about, mini: false, options: {disabled: !can_edit?, placeholder: "Tell us something about you ..."}} %>
<%= render partial: "md_editor", locals: {name: "user[about]", content: @user.about, options: {disabled: !can_edit?, placeholder: "Tell us something about you ..."}} %>
</td>
</tr>
</tbody>