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