woodpecker/template/amber/repo_activate.amber

33 lines
1 KiB
Text
Raw Normal View History

2015-09-30 01:21:17 +00:00
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();
}
});
});