Do not use globals to lookup views from template.

This commit is contained in:
Robert Jackson 2014-11-05 08:19:49 -05:00
parent a789fdab6f
commit 2faca2e9d6
No known key found for this signature in database
GPG Key ID: B3D10EF8171F7219
5 changed files with 11 additions and 11 deletions

View File

@ -58,9 +58,9 @@
{{/unless}} {{/unless}}
{{#if build.isMatrix}} {{#if build.isMatrix}}
{{view Travis.JobsView jobsBinding="build.requiredJobs" required="true"}} {{view 'jobs' jobs=build.requiredJobs required="true"}}
{{view Travis.JobsView jobsBinding="build.allowedFailureJobs"}} {{view 'jobs' jobs=build.allowedFailureJobs}}
{{else}} {{else}}
{{view Travis.LogView jobBinding="build.jobs.firstObject"}} {{view 'log' job=build.jobs.firstObject}}
{{/if}} {{/if}}
{{/if}} {{/if}}

View File

@ -20,7 +20,7 @@
</thead> </thead>
<tbody> <tbody>
{{#each job in view.jobs}} {{#each job in view.jobs}}
{{#view Travis.JobsItemView contextBinding="job"}} {{#view 'jobs-item' context=job}}
<td class="number"> <td class="number">
<span class="status"></span> <span class="status"></span>
{{#if job.id}} {{#if job.id}}

View File

@ -1,12 +1,12 @@
<div id="search_box"> <div id="search_box">
{{view Ember.TextField valueBinding="controller.search" placeholder="Search all repositories"}} {{input value=controller.search placeholder="Search all repositories"}}
</div> </div>
{{view Travis.ReposListTabsView}} {{view 'repos-list-tabs'}}
<div class="tab"> <div class="tab">
{{#if isLoaded}} {{#if isLoaded}}
{{#collection Travis.ReposListView contentBinding="this"}} {{#collection 'repos-list' content=this}}
{{#with view.repo}} {{#with view.repo}}
<div class="slug-and-status"> <div class="slug-and-status">
<span class="status"></span> <span class="status"></span>

View File

@ -7,13 +7,13 @@
<div id="repo-header"> <div id="repo-header">
<h3>{{#link-to "repo" this}}{{slug}}{{/link-to}}</h3> <h3>{{#link-to "repo" this}}{{slug}}{{/link-to}}</h3>
<div class="github-icon"><a {{bind-attr href="controller.urlGithub"}}><img src="/images/icons/github.svg" width="21" height="21"/></a></div> <div class="github-icon"><a {{bind-attr href="controller.urlGithub"}}><img src="/images/icons/github.svg" width="21" height="21"/></a></div>
{{view Travis.RepoShowToolsView}} {{view 'repo-show-tools'}}
</div> </div>
<p class="description">{{description}}</p> <p class="description">{{description}}</p>
{{view Travis.RepoShowTabsView}} {{view 'repo-show-tabs'}}
{{view Travis.RepoActionsView}} {{view 'repo-actions'}}
{{/with}} {{/with}}
<div class="tab"> <div class="tab">

View File

@ -2,7 +2,7 @@
<li id="tab_current" {{bind-attr class="view.classCurrent"}}> <li id="tab_current" {{bind-attr class="view.classCurrent"}}>
<h5> <h5>
{{#if repo.slug}} {{#if repo.slug}}
{{#link-to "repo" repo currentWhen="repo.index"}} {{#link-to "repo" repo current-when="repo.index"}}
Current Current
{{/link-to}} {{/link-to}}
{{/if}} {{/if}}