Commit b8ca423c authored by Sacred Seven's avatar Sacred Seven

Fixed milestone Expired_at rendering

parent 261e7ea5
......@@ -71,9 +71,9 @@ class Milestone < ActiveRecord::Base
def expires_at
if due_date
if due_date.past?
"expired at #{due_date.stamp("Aug 21, 2011")}"
"expired at #{JalaliDate.new(due_date).strftime("%A %d %b %Y")}"
else
"expires at #{due_date.stamp("Aug 21, 2011")}"
"expires at #{JalaliDate.new(due_date).strftime("%A %d %b %Y")}"
end
end
end
......
......@@ -46,7 +46,7 @@
%li
= link_to project_filter_path(milestone_id: milestone.id) do
%strong= milestone.title
%small.light expires at #{JalaliDate.new(Date.parse(milestone.expires_at)).strftime("%A %d %b %Y")}
%small.light= milestone.expires_at
.pull-right
= render 'shared/sort_dropdown'
......
......@@ -10,7 +10,7 @@
- if milestone.expired? and not milestone.closed?
%span.cred (Expired)
%small
= "expires at #{JalaliDate.new(Date.parse(milestone.expires_at)).strftime("%A %d %b %Y")}"
= milestone.expires_at
- if milestone.is_empty?
%span.muted Empty
- else
......
......@@ -30,7 +30,7 @@
- else
Open
.creator
= JalaliDate.new(Date.parse(@milestone.expires_at)).strftime("%A %d %b %Y")
= @milestone.expires_at
%h4.title{ dir: :auto }
= gfm escape_once(@milestone.title)
......@@ -49,7 +49,7 @@
#{@milestone.open_items_count} open
&nbsp;
%span.light #{@milestone.percent_complete}% complete
%span.pull-right= "expires at #{JalaliDate.new(Date.parse(@milestone.expires_at)).strftime("%A %d %b %Y")}"
%span.pull-right= @milestone.expires_at
.progress.progress-info
.progress-bar{style: "width: #{@milestone.percent_complete}%;"}
......
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