Bring back hack for download log button

This commit is contained in:
Piotr Sarnacki 2015-01-08 17:03:34 +01:00
parent 97050b8111
commit 78dccd194c
2 changed files with 9 additions and 7 deletions

View File

@ -32,10 +32,12 @@
{{/if}}
</li>
{{/if}}
{{#if view.showDownloadLog}}
<li class="icon download-log" title="Download Log">
<a class="download-log" {{bind-attr href="view.plainTextLogUrl"}}></a>
</li>
{{#if view.jobIdForLog}}
{{#if view.showDownloadLog}}
<li class="icon download-log" title="Download Log">
<a class="download-log" {{bind-attr href="view.plainTextLogUrl"}}></a>
</li>
{{/if}}
{{/if}}
{{#if view.displayRemoveLog}}
<li class="icon remove-log" title="Remove Log">

View File

@ -262,8 +262,8 @@ Travis.reopen
).property('displayRequeueJob', 'hasPermission')
showDownloadLog: (->
@get('_job')
).property('_job')
@get('jobIdForLog')
).property('jobIdForLog')
_job: (->
if id = @get('jobIdForLog')
@ -294,7 +294,7 @@ Travis.reopen
displayRemoveLog: (->
if job = Travis.Job.find(@get('jobIdForLog'))
(@get('isJobTab') || (@get('isBuildTab') && @get('build.jobs.length') == 1)) && job.get('canRemoveLog')
).property('isJobTab', 'isBuildTab', 'build.jobs.length', 'job.canRemoveLog', 'jobIdForLog')
).property('isJobTab', 'isBuildTab', 'build.jobs.length', '_job.canRemoveLog', 'jobIdForLog')
canCancelBuild: (->
@get('displayCancelBuild') && @get('hasPermission')