Properly refresh last build link on repos list
value change. Since {{action}} is also not a bound helper, I need some structure that I can put into {{with}} helper
This commit is contained in:
parent
d1cb2c7a92
commit
9853826bae
|
@ -12,6 +12,14 @@ require 'travis/model'
|
|||
|
||||
lastBuild: DS.belongsTo('Travis.Build')
|
||||
|
||||
lastBuildHash: (->
|
||||
{
|
||||
id: @get('lastBuildId')
|
||||
number: @get('lastBuildNumber')
|
||||
repo: this
|
||||
}
|
||||
).property('lastBuildId', 'lastBuildNumber')
|
||||
|
||||
allBuilds: (->
|
||||
allBuilds = DS.RecordArray.create
|
||||
type: Travis.Build
|
||||
|
|
|
@ -13,8 +13,9 @@
|
|||
<a {{action showRepo this href=true}} class="slug">{{slug}}</a>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{#if lastBuildId}}
|
||||
<a {{action showBuild this lastBuildId href=true}} class="last_build">{{lastBuildNumber}}</a>
|
||||
{{#with lastBuildHash}}
|
||||
{{#if id}}
|
||||
<a {{action showBuild repo id href=true}} class="last_build">{{number}}</a>
|
||||
{{/if}}
|
||||
|
||||
<p class="summary">
|
||||
|
|
Loading…
Reference in New Issue
Block a user