mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-06 21:45:50 +01:00
(refs #74)Add the web hook configuration page.
This commit is contained in:
@@ -88,6 +88,13 @@ trait RepositorySettingsControllerBase extends ControllerBase with FlashMapSuppo
|
|||||||
redirect(s"/${repository.owner}/${repository.name}/settings/collaborators")
|
redirect(s"/${repository.owner}/${repository.name}/settings/collaborators")
|
||||||
})
|
})
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display the web hook page.
|
||||||
|
*/
|
||||||
|
get("/:owner/:repository/settings/hooks")(ownerOnly { repository =>
|
||||||
|
settings.html.hooks(repository)
|
||||||
|
})
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Display the delete repository page.
|
* Display the delete repository page.
|
||||||
*/
|
*/
|
||||||
|
|||||||
16
src/main/twirl/settings/hooks.scala.html
Normal file
16
src/main/twirl/settings/hooks.scala.html
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
@(repository: service.RepositoryService.RepositoryInfo)(implicit context: app.Context)
|
||||||
|
@import context._
|
||||||
|
@import view.helpers._
|
||||||
|
@html.main("Settings", Some(repository)){
|
||||||
|
@html.header("settings", repository)
|
||||||
|
@menu("hooks", repository){
|
||||||
|
<h3>WebHook URLs</h3>
|
||||||
|
<form method="POST" action="@url(repository)/settings/hooks/add" validate="true">
|
||||||
|
<div>
|
||||||
|
<span class="error" id="error-url"></span>
|
||||||
|
</div>
|
||||||
|
<input type="text" name="url" id="url" style="width: 300px; margin-bottom: 0px;"/>
|
||||||
|
<input type="submit" class="btn" value="Add"/>
|
||||||
|
</form>
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -11,6 +11,9 @@
|
|||||||
<li@if(active=="collaborators"){ class="active"}>
|
<li@if(active=="collaborators"){ class="active"}>
|
||||||
<a href="@url(repository)/settings/collaborators">Collaborators</a>
|
<a href="@url(repository)/settings/collaborators">Collaborators</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li@if(active=="hooks"){ class="active"}>
|
||||||
|
<a href="@url(repository)/settings/hooks">Service Hooks</a>
|
||||||
|
</li>
|
||||||
<li@if(active=="delete"){ class="active"}>
|
<li@if(active=="delete"){ class="active"}>
|
||||||
<a href="@url(repository)/settings/delete">Delete Repository</a>
|
<a href="@url(repository)/settings/delete">Delete Repository</a>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
Reference in New Issue
Block a user