summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo Sumaran <alfredo@gitlab.com>2017-02-28 23:08:21 +0000
committerAlfredo Sumaran <alfredo@gitlab.com>2017-02-28 23:08:21 +0000
commitb2d5869e08f9f4a790b61f53007b3ff0a467ebc9 (patch)
treed2fc4293f2171ec56a4b08807e34e5919308ad64
parent4c4810b35b3b1729865640382b4c7e593f8b876d (diff)
parent3daf142fefa30611ba74f844227078b23d8bd9e8 (diff)
downloadgitlab-ce-b2d5869e08f9f4a790b61f53007b3ff0a467ebc9.tar.gz
Merge branch '23602-show-milestone-id-in-a-consistent-way' into 'master'
Show milestone ID in a consistent way Closes #23602 See merge request !8820
-rw-r--r--app/helpers/milestones_helper.rb2
-rw-r--r--app/views/projects/milestones/show.html.haml5
-rw-r--r--spec/features/milestone_spec.rb2
-rw-r--r--spec/helpers/milestones_helper_spec.rb2
4 files changed, 5 insertions, 6 deletions
diff --git a/app/helpers/milestones_helper.rb b/app/helpers/milestones_helper.rb
index 729928ce1dd..7011e670cee 100644
--- a/app/helpers/milestones_helper.rb
+++ b/app/helpers/milestones_helper.rb
@@ -97,7 +97,7 @@ module MilestonesHelper
def milestone_date_range(milestone)
if milestone.start_date && milestone.due_date
- "#{milestone.start_date.to_s(:medium)} - #{milestone.due_date.to_s(:medium)}"
+ "#{milestone.start_date.to_s(:medium)}–#{milestone.due_date.to_s(:medium)}"
elsif milestone.due_date
if milestone.due_date.past?
"expired on #{milestone.due_date.to_s(:medium)}"
diff --git a/app/views/projects/milestones/show.html.haml b/app/views/projects/milestones/show.html.haml
index 06a31698ee6..a216d59bc74 100644
--- a/app/views/projects/milestones/show.html.haml
+++ b/app/views/projects/milestones/show.html.haml
@@ -19,10 +19,9 @@
Open
.header-text-content
%span.identifier
- Milestone ##{@milestone.iid}
+ %strong
+ Milestone %#{@milestone.iid}
- if @milestone.due_date || @milestone.start_date
- %span.creator
- &middot;
= milestone_date_range(@milestone)
.milestone-buttons
- if can?(current_user, :admin_milestone, @project)
diff --git a/spec/features/milestone_spec.rb b/spec/features/milestone_spec.rb
index a2e40546588..c3297de709a 100644
--- a/spec/features/milestone_spec.rb
+++ b/spec/features/milestone_spec.rb
@@ -24,7 +24,7 @@ feature 'Milestone', feature: true do
find('input[name="commit"]').click
expect(find('.alert-success')).to have_content('Assign some issues to this milestone.')
- expect(page).to have_content('Nov 16, 2016 - Dec 16, 2016')
+ expect(page).to have_content('Nov 16, 2016–Dec 16, 2016')
end
end
diff --git a/spec/helpers/milestones_helper_spec.rb b/spec/helpers/milestones_helper_spec.rb
index 14a95479339..68b20a1e4fc 100644
--- a/spec/helpers/milestones_helper_spec.rb
+++ b/spec/helpers/milestones_helper_spec.rb
@@ -17,7 +17,7 @@ describe MilestonesHelper do
it { expect(result_for(due_date: yesterday)).to eq("expired on #{yesterday_formatted}") }
it { expect(result_for(start_date: tomorrow)).to eq("starts on #{tomorrow_formatted}") }
it { expect(result_for(start_date: yesterday)).to eq("started on #{yesterday_formatted}") }
- it { expect(result_for(start_date: yesterday, due_date: tomorrow)).to eq("#{yesterday_formatted} - #{tomorrow_formatted}") }
+ it { expect(result_for(start_date: yesterday, due_date: tomorrow)).to eq("#{yesterday_formatted}–#{tomorrow_formatted}") }
end
describe '#milestone_counts' do