Merge branch 'dev' into new_layout
This commit is contained in:
commit
fb33ccd87f
5 changed files with 10 additions and 3 deletions
1
Gemfile
1
Gemfile
|
@ -19,6 +19,7 @@ gem "pygments.rb", "0.2.3"
|
||||||
gem "thin"
|
gem "thin"
|
||||||
gem "git"
|
gem "git"
|
||||||
gem "acts_as_list"
|
gem "acts_as_list"
|
||||||
|
gem 'rdiscount'
|
||||||
|
|
||||||
group :assets do
|
group :assets do
|
||||||
gem 'sass-rails', " ~> 3.1.0"
|
gem 'sass-rails', " ~> 3.1.0"
|
||||||
|
|
|
@ -161,6 +161,7 @@ GEM
|
||||||
rdoc (~> 3.4)
|
rdoc (~> 3.4)
|
||||||
thor (~> 0.14.6)
|
thor (~> 0.14.6)
|
||||||
rake (0.9.2)
|
rake (0.9.2)
|
||||||
|
rdiscount (1.6.8)
|
||||||
rdoc (3.9.4)
|
rdoc (3.9.4)
|
||||||
rspec (2.6.0)
|
rspec (2.6.0)
|
||||||
rspec-core (~> 2.6.0)
|
rspec-core (~> 2.6.0)
|
||||||
|
@ -264,6 +265,7 @@ DEPENDENCIES
|
||||||
pygments.rb (= 0.2.3)
|
pygments.rb (= 0.2.3)
|
||||||
rails (= 3.1.0)
|
rails (= 3.1.0)
|
||||||
rails-footnotes (>= 3.7.5.rc4)
|
rails-footnotes (>= 3.7.5.rc4)
|
||||||
|
rdiscount
|
||||||
rspec-rails
|
rspec-rails
|
||||||
ruby-debug19
|
ruby-debug19
|
||||||
sass-rails (~> 3.1.0)
|
sass-rails (~> 3.1.0)
|
||||||
|
|
|
@ -30,6 +30,10 @@ module ApplicationHelper
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def markdown(text)
|
||||||
|
RDiscount.new(text, :autolink, :no_pseudo_protocols, :safelink, :smart, :filter_html).to_html.html_safe
|
||||||
|
end
|
||||||
|
|
||||||
def search_autocomplete_source
|
def search_autocomplete_source
|
||||||
projects = current_user.projects.map{ |p| { :label => p.name, :url => project_path(p) } }
|
projects = current_user.projects.map{ |p| { :label => p.name, :url => project_path(p) } }
|
||||||
default_nav = [
|
default_nav = [
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
%div.note_author
|
%div.note_author
|
||||||
= image_tag gravatar_icon(note.author.email), :class => "left", :width => 40, :style => "padding-right:5px;"
|
= image_tag gravatar_icon(note.author.email), :class => "left", :width => 40, :style => "padding-right:5px;"
|
||||||
%div.note_content.left
|
%div.note_content.left
|
||||||
= simple_format(html_escape(note.note))
|
= markdown(note.note)
|
||||||
- if note.attachment.url
|
- if note.attachment.url
|
||||||
Attachment:
|
Attachment:
|
||||||
= link_to note.attachment_identifier, note.attachment.url, :target => "_blank"
|
= link_to note.attachment_identifier, note.attachment.url, :target => "_blank"
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
%p{:style => "margin-bottom: 3px;"}
|
%p{:style => "margin-bottom: 3px;"}
|
||||||
%span.author
|
%span.author
|
||||||
= note.author.name
|
= note.author.name
|
||||||
= link_to truncate(note.note, :length => 200), link_to_item + "#note_#{note.id}"
|
= link_to markdown(truncate(note.note, :length => 200)), link_to_item + "#note_#{note.id}"
|
||||||
- if note.attachment.url
|
- if note.attachment.url
|
||||||
%br
|
%br
|
||||||
Attachment:
|
Attachment:
|
||||||
|
|
Loading…
Reference in a new issue