mirror of
https://github.com/TracksApp/tracks.git
synced 2026-03-15 00:36:33 +01:00
Render notes using RedCloth without formatize
Removes the outdated bluecloth dependency
This commit is contained in:
parent
053e3fc8d6
commit
dc311221f1
10 changed files with 16 additions and 21 deletions
|
|
@ -280,3 +280,7 @@ input#todo_description, input#tag_list, textarea#todo_notes, select#todo_project
|
|||
background: #cc3334 image-url('next.png') right center no-repeat;
|
||||
}
|
||||
}
|
||||
|
||||
div.note_wrapper p {
|
||||
display: inline;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ class ApplicationController < ActionController::Base
|
|||
protect_from_forgery
|
||||
|
||||
include LoginSystem
|
||||
helper_method :current_user, :prefs, :format_date, :markdown
|
||||
helper_method :current_user, :prefs, :format_date
|
||||
|
||||
layout proc{ |controller| controller.mobile? ? "mobile" : "application" }
|
||||
# exempt_from_layout /\.js\.erb$/
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
module NotesHelper
|
||||
def truncated_note(note, characters = 50)
|
||||
sanitize(textilize_without_paragraph(truncate(note.body, :length => characters, :omission => "...")))
|
||||
Tracks::Utils.render_text(truncate(note.body, :length => characters, :omission => "..."))
|
||||
end
|
||||
|
||||
def rendered_note(note)
|
||||
sanitize(textilize_without_paragraph(note.body))
|
||||
Tracks::Utils.render_text(note.body)
|
||||
end
|
||||
|
||||
def link_to_delete_note(note, descriptor = sanitize(note.id.to_s))
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<div class="mobile_note">
|
||||
<%= sanitize(textilize_without_paragraph(note.body)) %>
|
||||
<%= rendered_note(note) %>
|
||||
</div>
|
||||
<div class="mobile_note_info">
|
||||
<br/>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<% note = note_details -%>
|
||||
<div class="note_boby"><%= Tracks::Utils.render_text(note.body) %></div>
|
||||
<div class="note_body"><%= rendered_note(note) %></div>
|
||||
|
||||
<div class="note_footer">
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
<% note = notes_summary -%>
|
||||
<div class="note"><%= link_to( truncated_note(note), note_path(note, :format => 'm')) %></div>
|
||||
<div class="note_wrapper">
|
||||
<div class="note"><%= link_to( truncated_note(note), note_path(note, :format => 'm')) %></div>
|
||||
</div>
|
||||
<% note = nil -%>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue