Cleanup BuildView
This commit is contained in:
parent
67e787596f
commit
345cb6e29e
|
@ -10,3 +10,11 @@ Travis.BuildController = Ember.Controller.extend Travis.GithubUrlProperties,
|
||||||
loading: (->
|
loading: (->
|
||||||
@get('build.isLoading')
|
@get('build.isLoading')
|
||||||
).property('build.isLoading')
|
).property('build.isLoading')
|
||||||
|
|
||||||
|
urlCommitterGravatarImage: (->
|
||||||
|
Travis.Urls.gravatarImage(@get('commit.committerEmail'), 40)
|
||||||
|
).property('commit.committerEmail')
|
||||||
|
|
||||||
|
urlAuthorGravatarImage: (->
|
||||||
|
Travis.Urls.gravatarImage(@get('commit.authorEmail'), 40)
|
||||||
|
).property('commit.authorEmail')
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<div class="commit-changes">
|
<div class="commit-changes">
|
||||||
<a class="commit" {{bind-attr href="controller.urlGithubCommit"}}>Commit {{formatSha commit.sha}}</a>
|
<a class="commit" {{bind-attr href="urlGithubCommit"}}>Commit {{formatSha commit.sha}}</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="commit-changes">
|
<div class="commit-changes">
|
||||||
{{#if build.pullRequest}}
|
{{#if build.pullRequest}}
|
||||||
|
@ -52,11 +52,11 @@
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
<div class="author">
|
<div class="author">
|
||||||
{{#if commit.authorName}}
|
{{#if commit.authorName}}
|
||||||
<div class="authored"><img {{bind-attr src="view.urlAuthorGravatarImage"}}/><div class="text">{{commit.authorName}} authored{{#if commit.authorIsCommitter}} and committed{{/if}}</div></div>
|
<div class="authored"><img {{bind-attr src="urlAuthorGravatarImage"}}/><div class="text">{{commit.authorName}} authored{{#if commit.authorIsCommitter}} and committed{{/if}}</div></div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#unless commit.authorIsCommitter}}
|
{{#unless commit.authorIsCommitter}}
|
||||||
{{#if commit.committerName}}
|
{{#if commit.committerName}}
|
||||||
<div class="committed"><img {{bind-attr src="view.urlCommitterGravatarImage"}}/><div class="text">{{commit.committerName}} committed</div></div>
|
<div class="committed"><img {{bind-attr src="urlCommitterGravatarImage"}}/><div class="text">{{commit.committerName}} committed</div></div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -22,16 +22,6 @@ Travis.reopen
|
||||||
BuildView: Travis.View.extend
|
BuildView: Travis.View.extend
|
||||||
classNameBindings: ['color', 'loading']
|
classNameBindings: ['color', 'loading']
|
||||||
buildBinding: 'controller.build'
|
buildBinding: 'controller.build'
|
||||||
commitBinding: 'build.commit'
|
|
||||||
|
|
||||||
urlCommitterGravatarImage: (->
|
|
||||||
Travis.Urls.gravatarImage(@get('commit.committerEmail'), 40)
|
|
||||||
).property('commit.committerEmail')
|
|
||||||
|
|
||||||
urlAuthorGravatarImage: (->
|
|
||||||
Travis.Urls.gravatarImage(@get('commit.authorEmail'), 40)
|
|
||||||
).property('commit.authorEmail')
|
|
||||||
|
|
||||||
loadingBinding: 'controller.loading'
|
loadingBinding: 'controller.loading'
|
||||||
|
|
||||||
color: (->
|
color: (->
|
||||||
|
|
Loading…
Reference in New Issue
Block a user