Remove icon from milestone reference.

This commit is contained in:
Douwe Maan 2016-01-05 16:45:53 +01:00
parent fd91b48f24
commit 0b66151632
4 changed files with 5 additions and 6 deletions

View file

@ -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?

View file

@ -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

View file

@ -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

View file

@ -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