diff --git a/app/templates/jobs/pre.hbs b/app/templates/jobs/pre.hbs
index e969488b..e60f99c4 100644
--- a/app/templates/jobs/pre.hbs
+++ b/app/templates/jobs/pre.hbs
@@ -12,19 +12,22 @@
Download Log
-
-
-
- {{#if view.job.isFinished}}
- Scroll to End of Log
- {{else}}
- Follow Log
- {{/if}}
-
-
+ {{#if view.showTailing}}
+
+
+
+ {{#if view.job.isFinished}}
+ Scroll to End of Log
+ {{else}}
+ Follow Log
+ {{/if}}
+
+
+ {{/if}}
+
- {{#if view.log.hasContent}}
+ {{#if view.showToTop}}
Top
{{/if}}
diff --git a/app/views/pre.coffee b/app/views/pre.coffee
index 89f475d5..67ffeea2 100644
--- a/app/views/pre.coffee
+++ b/app/views/pre.coffee
@@ -111,6 +111,11 @@ View = BasicView.extend
job.get('canRemoveLog') && @get('hasPermission')
).property('job.canRemoveLog', 'hasPermission')
+ showToTop: (->
+ @get('log.hasContent') && @get('job.canRemoveLog')
+ ).property('log.hasContent', 'job.canRemoveLog')
+ showTailing: Ember.computed.alias('showToTop')
+
actions:
toTop: () ->
Travis.tailing.stop()