Extract annotations view

This commit is contained in:
Henrik Hodne 2013-07-11 11:45:23 -07:00
parent c912634dd0
commit 31cb6ce98a
5 changed files with 15 additions and 10 deletions

View File

@ -0,0 +1,8 @@
<div id="annotations">
{{#each annotation in view.annotations}}
<div class="annotation">
<a {{bindAttr href="annotation.url"}}>{{annotation.providerName}}</a>:
{{annotation.description}}
</div>
{{/each}}
</div>

View File

@ -54,11 +54,7 @@
</dl>
{{#unless build.isMatrix}}
<div id="annotations">
{{#each annotation in build.jobs.firstObject.annotations}}
<div class="annotation"><a {{bindAttr href="annotation.url"}}>{{annotation.providerName}}</a>: {{annotation.description}}</div>
{{/each}}
</div>
{{view Travis.AnnotationsView annotationsBinding="build.jobs.firstObject.annotations"}}
{{/unless}}
{{#if build.isMatrix}}

View File

@ -48,11 +48,7 @@
<dd class="config">{{formatConfig job.config}}</dd>
</dl>
<div id="annotations">
{{#each annotation in view.annotations}}
<div class="annotation"><a {{bindAttr href="annotation.url"}}>{{annotation.providerName}}</a>: {{annotation.description}}</div>
{{/each}}
</div>
{{view Travis.AnnotationsView annotationsBinding="view.annotations"}}
{{view Travis.LogView jobBinding="job"}}
</div>

View File

@ -25,6 +25,7 @@ Travis.GettingStartedView = Travis.View.extend
templateName: 'no_owned_repos'
require 'views/accounts'
require 'views/annotation'
require 'views/application'
require 'views/build'
require 'views/events'

View File

@ -0,0 +1,4 @@
Travis.reopen
AnnotationsView: Travis.View.extend
templateName: 'annotations/list'