diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-06-10 15:11:53 +0200 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-06-13 11:06:38 +0100 |
commit | 304979f89777f4aca52b382fdbe3a593dc7e50f3 (patch) | |
tree | 5958cccebf5e8dac3c5fa1d923024614c7d94c45 | |
parent | fab1c4a81b7eef247abe6bdd3775cf0ce42badc1 (diff) | |
download | gitlab-ce-304979f89777f4aca52b382fdbe3a593dc7e50f3.tar.gz |
Allow to show the time in the future
-rw-r--r-- | app/assets/javascripts/application.js.coffee | 2 | ||||
-rw-r--r-- | app/helpers/time_helper.rb | 1 | ||||
-rw-r--r-- | app/views/projects/builds/_sidebar.html.haml | 11 |
3 files changed, 9 insertions, 5 deletions
diff --git a/app/assets/javascripts/application.js.coffee b/app/assets/javascripts/application.js.coffee index 69d4c4f5dd3..33e593f4376 100644 --- a/app/assets/javascripts/application.js.coffee +++ b/app/assets/javascripts/application.js.coffee @@ -254,6 +254,8 @@ $ -> .on "resize.app", (e) -> fitSidebarForSize() + jQuery.timeago.settings.allowFuture = true; + gl.awardsHandler = new AwardsHandler() checkInitialSidebarSize() new Aside() diff --git a/app/helpers/time_helper.rb b/app/helpers/time_helper.rb index 8142f733e76..b04b0a5114c 100644 --- a/app/helpers/time_helper.rb +++ b/app/helpers/time_helper.rb @@ -20,7 +20,6 @@ module TimeHelper end end - def date_from_to(from, to) "#{from.to_s(:short)} - #{to.to_s(:short)}" end diff --git a/app/views/projects/builds/_sidebar.html.haml b/app/views/projects/builds/_sidebar.html.haml index 0741426b5af..14571145313 100644 --- a/app/views/projects/builds/_sidebar.html.haml +++ b/app/views/projects/builds/_sidebar.html.haml @@ -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 |