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
Boxiang Sun
gitlab-ce
Commits
0b661516
Commit
0b661516
authored
Jan 05, 2016
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove icon from milestone reference.
parent
fd91b48f
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
6 deletions
+5
-6
app/models/milestone.rb
app/models/milestone.rb
+1
-1
app/views/shared/issuable/_sidebar.html.haml
app/views/shared/issuable/_sidebar.html.haml
+2
-1
lib/banzai/filter/milestone_reference_filter.rb
lib/banzai/filter/milestone_reference_filter.rb
+0
-2
spec/lib/banzai/filter/milestone_reference_filter_spec.rb
spec/lib/banzai/filter/milestone_reference_filter_spec.rb
+2
-2
No files found.
app/models/milestone.rb
View file @
0b661516
...
@@ -76,7 +76,7 @@ class Milestone < ActiveRecord::Base
...
@@ -76,7 +76,7 @@ class Milestone < ActiveRecord::Base
end
end
def
reference_link_text
(
from_project
=
nil
)
def
reference_link_text
(
from_project
=
nil
)
%Q{<i class="fa fa-clock-o"></i> }
.
html_safe
+
self
.
title
self
.
title
end
end
def
expired?
def
expired?
...
...
app/views/shared/issuable/_sidebar.html.haml
View file @
0b661516
...
@@ -28,7 +28,8 @@
...
@@ -28,7 +28,8 @@
%span
.back-to-milestone
%span
.back-to-milestone
=
link_to
namespace_project_milestone_path
(
@project
.
namespace
,
@project
,
issuable
.
milestone
)
do
=
link_to
namespace_project_milestone_path
(
@project
.
namespace
,
@project
,
issuable
.
milestone
)
do
%strong
%strong
=
issuable
.
milestone
.
reference_link_text
=
icon
(
'clock-o'
)
=
issuable
.
milestone
.
title
-
else
-
else
.light
None
.light
None
.selectbox
.selectbox
...
...
lib/banzai/filter/milestone_reference_filter.rb
View file @
0b661516
...
@@ -3,8 +3,6 @@ require 'banzai'
...
@@ -3,8 +3,6 @@ require 'banzai'
module
Banzai
module
Banzai
module
Filter
module
Filter
# HTML filter that replaces milestone references with links.
# HTML filter that replaces milestone references with links.
#
# This filter supports cross-project references.
class
MilestoneReferenceFilter
<
AbstractReferenceFilter
class
MilestoneReferenceFilter
<
AbstractReferenceFilter
def
self
.
object_class
def
self
.
object_class
Milestone
Milestone
...
...
spec/lib/banzai/filter/milestone_reference_filter_spec.rb
View file @
0b661516
...
@@ -29,7 +29,7 @@ describe Banzai::Filter::MilestoneReferenceFilter, lib: true do
...
@@ -29,7 +29,7 @@ describe Banzai::Filter::MilestoneReferenceFilter, lib: true do
it
'links with adjacent text'
do
it
'links with adjacent text'
do
doc
=
reference_filter
(
"milestone (
#{
reference
}
.)"
)
doc
=
reference_filter
(
"milestone (
#{
reference
}
.)"
)
expect
(
doc
.
to_html
).
to
match
(
/\(<a.+>
<i.+><\/i>
#{
Regexp
.
escape
(
milestone
.
title
)
}
<\/a>\.\)/
)
expect
(
doc
.
to_html
).
to
match
(
/\(<a.+>
#{
Regexp
.
escape
(
milestone
.
title
)
}
<\/a>\.\)/
)
end
end
it
'includes a title attribute'
do
it
'includes a title attribute'
do
...
...
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