Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
iv
gitlab-ce
Commits
1f3323f9
Commit
1f3323f9
authored
Oct 30, 2011
by
Nihad Abbasov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use helper to markdown text
parent
6c7706eb
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
2 deletions
+6
-2
app/helpers/application_helper.rb
app/helpers/application_helper.rb
+4
-0
app/views/notes/_show.html.haml
app/views/notes/_show.html.haml
+1
-1
app/views/projects/_recent_messages.html.haml
app/views/projects/_recent_messages.html.haml
+1
-1
No files found.
app/helpers/application_helper.rb
View file @
1f3323f9
...
...
@@ -30,6 +30,10 @@ module ApplicationHelper
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
projects
=
current_user
.
projects
.
map
{
|
p
|
{
:label
=>
p
.
name
,
:url
=>
project_path
(
p
)
}
}
default_nav
=
[
...
...
app/views/notes/_show.html.haml
View file @
1f3323f9
...
...
@@ -2,7 +2,7 @@
%div
.note_author
=
image_tag
gravatar_icon
(
note
.
author
.
email
),
:class
=>
"left"
,
:width
=>
40
,
:style
=>
"padding-right:5px;"
%div
.note_content.left
=
raw
RDiscount
.
new
(
note
.
note
,
:smart
,
:filter_html
).
to_html
=
markdown
(
note
.
note
)
-
if
note
.
attachment
.
url
Attachment:
=
link_to
note
.
attachment_identifier
,
note
.
attachment
.
url
,
:target
=>
"_blank"
...
...
app/views/projects/_recent_messages.html.haml
View file @
1f3323f9
...
...
@@ -40,7 +40,7 @@
%p
{
:style
=>
"margin-bottom: 3px;"
}
%span
.author
=
note
.
author
.
name
=
link_to
truncate
(
note
.
note
,
:length
=>
200
),
link_to_item
+
"#note_
#{
note
.
id
}
"
=
link_to
truncate
(
markdown
(
note
.
note
)
,
:length
=>
200
),
link_to_item
+
"#note_
#{
note
.
id
}
"
-
if
note
.
attachment
.
url
%br
Attachment:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment