2014-06-04 21:25:38 +00:00
|
|
|
extends base
|
|
|
|
|
|
|
|
block title
|
|
|
|
| #{Repo.Name}
|
|
|
|
|
|
|
|
block content
|
|
|
|
article.pure-g
|
|
|
|
header.pure-u-1
|
|
|
|
h1
|
|
|
|
span #{Repo.Owner}
|
|
|
|
span /
|
|
|
|
a[href="#"] #{Repo.Name}
|
2014-06-06 00:10:58 +00:00
|
|
|
a.pure-button[href="/"+Repo.Host+"/"+Repo.Owner+"/"+Repo.Name+"/settings"]
|
2014-06-04 21:25:38 +00:00
|
|
|
i.fa.fa-cog
|
|
|
|
|
2014-06-05 23:48:45 +00:00
|
|
|
$repo=Repo
|
|
|
|
if Repo.Active
|
|
|
|
if Commits
|
|
|
|
section.pure-u-3-5
|
|
|
|
div.commit-list
|
|
|
|
each $commit in Commits
|
2014-06-06 00:10:58 +00:00
|
|
|
a.pure-g.commit-item[data-status=Status][href="/"+$repo.Host+"/"+$repo.Owner+"/"+$repo.Name+"/branch/"+Branch+"/commit/"+Sha]
|
2014-06-05 23:48:45 +00:00
|
|
|
div.pure-u-1-8
|
|
|
|
img[src="https://secure.gravatar.com/avatar/"+Gravatar+"?s=48&d=identicon"]
|
2014-06-04 21:25:38 +00:00
|
|
|
|
2014-06-05 23:48:45 +00:00
|
|
|
div.pure-u-3-4
|
|
|
|
h2 #{Message}
|
|
|
|
span.commit-sha #{ShaShort}
|
|
|
|
span.commit-branch #{Branch}
|
|
|
|
span.commit-date.timeago[title=FinishedString]
|
|
|
|
div.pure-u-2-5
|
|
|
|
section.pure-g.branches
|
|
|
|
div.pure-u-1.pure-menu.pure-menu-open
|
|
|
|
a.pure-menu-heading Recent Branches
|
|
|
|
ul
|
|
|
|
each $commit in Branches
|
|
|
|
li
|
2014-06-06 00:10:58 +00:00
|
|
|
a[data-status=Status][href="/"+$repo.Host+"/"+$repo.Owner+"/"+$repo.Name+"/branch/"+Branch] #{Branch}
|
2014-06-05 23:48:45 +00:00
|
|
|
|
|
|
|
else
|
|
|
|
section.pure-u-1
|
|
|
|
div.alert.alert-info
|
|
|
|
| Your Build history is empty. Push to your remote repository to trigger a build.
|
|
|
|
|
|
|
|
|
|
|
|
else
|
|
|
|
section.pure-u-1
|
2014-06-06 00:10:58 +00:00
|
|
|
div.alert.alert-info#alert
|
2014-06-05 23:48:45 +00:00
|
|
|
| This Repository is not yet active. Please activate to start testing commits.
|
|
|
|
br
|
2014-06-06 00:10:58 +00:00
|
|
|
form.pure-form.pure-form-stacked[action="/v1/repos/"+Repo.Host+"/"+Repo.Owner+"/"+Repo.Name]
|
2014-06-05 23:48:45 +00:00
|
|
|
div.pure-controls
|
|
|
|
button.pure-button.pure-button-primary Click to Active Repository
|
2014-06-04 21:25:38 +00:00
|
|
|
|
|
|
|
block append scripts
|
|
|
|
script
|
|
|
|
$(document).ready(function() {
|
|
|
|
$(".timeago").timeago();
|
2014-06-06 00:10:58 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
if Repo.Active
|
|
|
|
script
|
|
|
|
else
|
|
|
|
script
|
|
|
|
document.forms[0].onsubmit = function(event) {
|
2014-06-06 18:36:16 +00:00
|
|
|
var form = event.target;
|
2014-06-06 00:10:58 +00:00
|
|
|
var formData = new FormData(form);
|
|
|
|
xhr = new XMLHttpRequest();
|
|
|
|
xhr.open('POST', form.action);
|
|
|
|
xhr.onload = function() {
|
|
|
|
if (this.status == 201) {
|
|
|
|
window.location.reload();
|
|
|
|
} else {
|
|
|
|
$("#alert").text("Failed to activate the repository settings. Please try again");
|
|
|
|
$("#alert").attr("class", "alert alert-danger");
|
|
|
|
};
|
|
|
|
};
|
|
|
|
xhr.send(formData);
|
|
|
|
return false;
|
|
|
|
}
|