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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
9174020f
Commit
9174020f
authored
Aug 20, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix event image preview
parent
b3b9b756
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
7 deletions
+9
-7
app/assets/stylesheets/sections/events.scss
app/assets/stylesheets/sections/events.scss
+4
-6
app/helpers/events_helper.rb
app/helpers/events_helper.rb
+4
-0
app/views/events/event/_note.html.haml
app/views/events/event/_note.html.haml
+1
-1
No files found.
app/assets/stylesheets/sections/events.scss
View file @
9174020f
...
@@ -68,14 +68,12 @@
...
@@ -68,14 +68,12 @@
margin
:
0
20px
;
margin
:
0
20px
;
}
}
.note-file-attach
{
.note-image-attach
{
.note-image-attach
{
margin-top
:
4px
;
margin-top
:
4px
;
margin-left
:
0px
;
margin-left
:
0px
;
max-width
:
200px
;
max-width
:
200px
;
}
}
}
}
}
.event-note-icon
{
.event-note-icon
{
color
:
#777
;
color
:
#777
;
float
:
left
;
float
:
left
;
...
...
app/helpers/events_helper.rb
View file @
9174020f
...
@@ -121,4 +121,8 @@ module EventsHelper
...
@@ -121,4 +121,8 @@ module EventsHelper
end
end
end
end
end
end
def
event_note
(
text
)
sanitize
(
markdown
(
truncate
(
text
,
length:
150
)),
tags:
%w(a img b pre p)
)
end
end
end
app/views/events/event/_note.html.haml
View file @
9174020f
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
.event-note
.event-note
.md
.md
%i
.icon-comment-alt.event-note-icon
%i
.icon-comment-alt.event-note-icon
=
sanitize
(
markdown
(
truncate
(
event
.
target
.
note
,
length:
150
)),
tags:
%w(a img b pre p)
)
=
event_note
(
event
.
target
.
note
)
-
note
=
event
.
target
-
note
=
event
.
target
-
if
note
.
attachment
.
url
-
if
note
.
attachment
.
url
-
if
note
.
attachment
.
image?
-
if
note
.
attachment
.
image?
...
...
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