Files
webgit/src/main/resources/templates/changes.html

57 lines
1.7 KiB
HTML

<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<title th:text="'Staging - ' + ${name}">Staging</title>
</head>
<body>
<h2>Staging</h2>
<p>Branch: <b th:text="${branch}"></b></p>
<h3>Modified Files (unstaged)</h3>
<form method="post" th:action="@{/repo/{name}/stage(name=${name})}" th:if="${!#lists.isEmpty(modifiedFiles)}">
<table border="1" cellpadding="4" cellspacing="0">
<tr>
<th></th>
<th>File</th>
</tr>
<tr th:each="file : ${modifiedFiles}">
<td><input type="checkbox" name="files" th:value="${file}"></td>
<td><a th:href="@{'/repo/' + ${name} + '/diff/' + ${file}}" th:text="${file}"></a></td>
</tr>
</table>
<br>
<input type="submit" name="action" value="Stage Selected">
<input type="submit" name="action" value="Rollback Selected">
</form>
<p th:if="${#lists.isEmpty(modifiedFiles)}"><i>No modified files.</i></p>
<h3>Staged Files</h3>
<form method="post" th:action="@{/repo/{name}/unstage(name=${name})}" th:if="${!#lists.isEmpty(stagedFiles)}">
<table border="1" cellpadding="4" cellspacing="0">
<tr>
<th></th>
<th>File</th>
</tr>
<tr th:each="file : ${stagedFiles}">
<td><input type="checkbox" name="files" th:value="${file}"></td>
<td><a th:href="@{'/repo/' + ${name} + '/diff/' + ${file}}" th:text="${file}"></a></td>
</tr>
</table>
<br>
<input type="submit" value="Unstage Selected">
</form>
<p th:if="${#lists.isEmpty(stagedFiles)}"><i>No staged files.</i></p>
<form method="post" th:action="@{/repo/{name}/commit(name=${name})}" th:if="${!#lists.isEmpty(stagedFiles)}">
<table border="0" cellpadding="4" cellspacing="0">
<tr>
<td>Commit message:</td>
<td><input type="text" name="message" size="60"></td>
<td><input type="submit" value="Commit"></td>
</tr>
</table>
</form>
</body>
</html>