mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-24 02:41:01 +00:00
33 lines
No EOL
1 KiB
Text
33 lines
No EOL
1 KiB
Text
extends base
|
|
|
|
block append head
|
|
title #{Repo.Name}
|
|
|
|
block header
|
|
ol
|
|
li #{Repo.Owner} / #{Repo.Name}
|
|
|
|
block content
|
|
div.container.repo_activate
|
|
div.alert.alert-danger.hidden
|
|
div.alert.alert-info
|
|
| This repository is not yet activated.
|
|
button.btn.btn-info#activateRepo Activate Now
|
|
|
|
|
|
block append scripts
|
|
script
|
|
$( "#activateRepo" ).click(function() {
|
|
$( "#activateRepo" ).hide();
|
|
$.ajax({
|
|
type: "POST",
|
|
url: "/api/repos/#{Repo.FullName}",
|
|
success: function() {
|
|
window.location.href="/#{Repo.FullName}"
|
|
},
|
|
error: function(err) {
|
|
$(".alert-info").hide();
|
|
$(".alert-danger").text("Unable to activate this repository. You must have administrative access to this repository. Also, please check the third-party application access policy to ensure Drone is approved. "+ err.responseText).show();
|
|
}
|
|
});
|
|
}); |