BigW Consortium Gitlab

Commit 0b661516 by Douwe Maan

Remove icon from milestone reference.

parent fd91b48f
......@@ -76,7 +76,7 @@ class Milestone < ActiveRecord::Base
end
def reference_link_text(from_project = nil)
%Q{<i class="fa fa-clock-o"></i> }.html_safe + self.title
self.title
end
def expired?
......
......@@ -28,7 +28,8 @@
%span.back-to-milestone
= link_to namespace_project_milestone_path(@project.namespace, @project, issuable.milestone) do
%strong
= issuable.milestone.reference_link_text
= icon('clock-o')
= issuable.milestone.title
- else
.light None
.selectbox
......
......@@ -3,8 +3,6 @@ require 'banzai'
module Banzai
module Filter
# HTML filter that replaces milestone references with links.
#
# This filter supports cross-project references.
class MilestoneReferenceFilter < AbstractReferenceFilter
def self.object_class
Milestone
......
......@@ -29,7 +29,7 @@ describe Banzai::Filter::MilestoneReferenceFilter, lib: true do
it 'links with adjacent text' do
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
it 'includes a title attribute' do
......@@ -41,7 +41,7 @@ describe Banzai::Filter::MilestoneReferenceFilter, lib: true do
milestone.update_attribute(:title, %{"></a>whatever<a title="})
doc = reference_filter("milestone #{reference}")
expect(doc.text).to eq "milestone #{milestone.title}"
expect(doc.text).to eq "milestone #{milestone.title}"
end
it 'includes default classes' do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment