1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2024-12-12 08:23:48 +02:00
woodpecker/template/amber/repo_activate.amber
2015-09-29 18:21:17 -07:00

33 lines
1.0 KiB
Plaintext

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();
}
});
});