mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-09 06:55:54 +01:00
61 lines
2.5 KiB
HTML
61 lines
2.5 KiB
HTML
@(branch: String,
|
|
repository: service.RepositoryService.RepositoryInfo,
|
|
pathList: List[String],
|
|
fileName: String,
|
|
content: util.JGitUtil.ContentInfo)(implicit context: app.Context)
|
|
@import context._
|
|
@import view.helpers._
|
|
@html.main(s"Deleting ${path} at ${fileName} - ${repository.owner}/${repository.name}", Some(repository)) {
|
|
@html.header("code", repository)
|
|
@tab(branch, repository, "files")
|
|
<form method="POST" action="@url(repository)/remove" validate="true">
|
|
<div class="head">
|
|
<a href="@url(repository)/tree/@encodeRefName(branch)">@repository.name</a> /
|
|
@pathList.zipWithIndex.map { case (section, i) =>
|
|
<a href="@url(repository)/tree/@encodeRefName(branch)/@pathList.take(i + 1).mkString("/")">@section</a> /
|
|
}
|
|
@fileName
|
|
<input type="hidden" name="fileName" id="fileName" value="@fileName"/>
|
|
<input type="hidden" name="branch" id="branch" value="@branch"/>
|
|
<input type="hidden" name="path" id="path" value="@pathList.mkString("/")"/>
|
|
</div>
|
|
<table class="table table-bordered">
|
|
<th style="font-weight: normal;" class="box-header">
|
|
@fileName
|
|
<div class="pull-right align-right">
|
|
<a href="@url(repository)/blob/@branch/@{(pathList ::: List(fileName)).mkString("/")}" class="btn btn-small">View</a>
|
|
</div>
|
|
</th>
|
|
<tr>
|
|
<td>
|
|
<div id="diffText"></div>
|
|
<textarea id="newText" style="display: none;"></textarea>
|
|
<textarea id="oldText" style="display: none;">@content.content</textarea>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<div class="issue-avatar-image">@avatar(loginAccount.get.userName, 48)</div>
|
|
<div class="box issue-comment-box">
|
|
<div class="box-content">
|
|
<div>
|
|
<strong>Commit changes</strong>
|
|
</div>
|
|
<div>
|
|
<input type="text" name="message" style="width: 98%;"/>
|
|
</div>
|
|
<div style="text-align: right;">
|
|
<a href="@url(repository)/blob/@encodeRefName(branch)/@pathList.mkString("/")" class="btn btn-danger">Cancel</a>
|
|
<input type="submit" id="commit" class="btn btn-success" value="Commit changes"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
}
|
|
<script type="text/javascript" src="@assets/jsdifflib/difflib.js"></script>
|
|
<script type="text/javascript" src="@assets/jsdifflib/diffview.js"></script>
|
|
<link href="@assets/jsdifflib/diffview.css" type="text/css" rel="stylesheet" />
|
|
<script>
|
|
$(function(){
|
|
diffUsingJS('oldText', 'newText', 'diffText');
|
|
});
|
|
</script> |