@(owner: String, repository: String)(implicit context: gitbucket.core.controller.Context)
@gitbucket.core.html.main("Creating...") {
<div class="content-wrapper main-center">
<div class="content body">
<!-- Progress bar -->
<div class="text-center" id="progress">
<h2>Creating repository...</h2>
<img src="@context.path/assets/common/images/indicator-bar.gif"/>
</div>
<!-- Error message -->
<div id="error" style="display: none;">
<h1>Failed to create repository</h1>
<div id="errorMessage"></div>
</div>
</div>
</div>
}
<script>
$(function () {
checkCreating();
});
function checkCreating() {
$.get('@context.path/@owner/@repository/creating', function (data) {
if (data.creating == true) {
setTimeout(checkCreating, 2000);
} else {
if (data.error) {
$('#errorMessage').text(data.error);
$('#error').show();
$('#progress').hide();
} else {
setTimeout(function(){ location.href = '@context.path/@owner/@repository'; });
}
}
});
}
</script>