Allow to show the time in the future

This commit is contained in:
Kamil Trzcinski 2016-06-10 15:11:53 +02:00 committed by Phil Hughes
parent fab1c4a81b
commit 304979f897
3 changed files with 9 additions and 5 deletions

View File

@ -254,6 +254,8 @@ $ ->
.on "resize.app", (e) ->
fitSidebarForSize()
jQuery.timeago.settings.allowFuture = true;
gl.awardsHandler = new AwardsHandler()
checkInitialSidebarSize()
new Aside()

View File

@ -20,7 +20,6 @@ module TimeHelper
end
end
def date_from_to(from, to)
"#{from.to_s(:short)} - #{to.to_s(:short)}"
end

View File

@ -16,11 +16,14 @@
.title
Build artifacts
- if @build.artifacts_expired?
.artifacts-expired.alert.alert-warning
The artifacts were removed #{time_ago_with_tooltip(@build.artifacts_expire_at)}
%p
The artifacts were removed
#{time_ago_with_tooltip(@build.artifacts_expire_at)}
- elsif @build.artifacts_expire_at
.artifacts-expired.alert.alert-warning
The artifacts will be removed in #{time_interval_in_words(@build.artifacts_expire_in)}
%p
The artifacts will be removed in
#{time_ago_with_tooltip(@build.artifacts_expire_at)}
- if @build.artifacts?
.btn-group.btn-group-justified{ role: :group }
- if @build.artifacts_expire_at