Link to repo settings from a hooks page
This commit is contained in:
parent
8482c4c286
commit
3a15b037da
|
@ -27,3 +27,13 @@ require 'travis/model'
|
||||||
return if @get('isSaving')
|
return if @get('isSaving')
|
||||||
@set 'active', !@get('active')
|
@set 'active', !@get('active')
|
||||||
@save()
|
@save()
|
||||||
|
|
||||||
|
repo: (->
|
||||||
|
# I don't want to make an ajax request for each repository showed in profile,
|
||||||
|
# especially, because most of them does not have any builds anyway. That's why
|
||||||
|
# I add an info which we have here to the store - this will allow to display
|
||||||
|
# a link to the repo and if more info is needed, it will be requested when the
|
||||||
|
# link is used
|
||||||
|
Travis.loadOrMerge(Travis.Repo, @getProperties('id', 'slug', 'name', 'ownerName'), skipIfExists: true)
|
||||||
|
Travis.Repo.find(@get('id'))
|
||||||
|
).property('id')
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
<p class="description">{{hook.description}}</p>
|
<p class="description">{{hook.description}}</p>
|
||||||
|
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<a {{bindAttr href="hook.urlGithubAdmin"}} class="github-admin tool-tip" title="Github service hooks admin page"></a>
|
{{#link-to "repo.settings" hook.repo class="repo-settings-icon tool-tip" title="Repository settings"}}{{/link-to}}
|
||||||
<a {{action "toggle" hook}} class="switch">
|
<a {{action "toggle" hook}} class="switch">
|
||||||
{{#if hook.active}}
|
{{#if hook.active}}
|
||||||
ON
|
ON
|
||||||
|
|
|
@ -57,14 +57,14 @@
|
||||||
float: left
|
float: left
|
||||||
display: block
|
display: block
|
||||||
|
|
||||||
.github-admin
|
.repo-settings-icon
|
||||||
// Overriding an earlier definition above, which is probably
|
// Overriding an earlier definition above, which is probably
|
||||||
// obsolete. TODO: Remove if so.
|
// obsolete. TODO: Remove if so.
|
||||||
position: relative
|
position: relative
|
||||||
height: 20px
|
height: 20px
|
||||||
width: 20px
|
width: 20px
|
||||||
padding-right: 0
|
padding-right: 0
|
||||||
background: inline-image('ui/github-admin.png') no-repeat 3px 4px
|
background: inline-image('ui/repo-settings.png') no-repeat 3px 4px
|
||||||
|
|
||||||
.switch
|
.switch
|
||||||
position: relative
|
position: relative
|
||||||
|
|
Loading…
Reference in New Issue
Block a user