mirror of
https://github.com/go-gitea/gitea.git
synced 2024-10-30 05:52:42 +00:00
Display branch name in delete branch confirmation modal. (#5654)
Fixes: #5630.
This commit is contained in:
parent
c42bde719e
commit
dd006db5a7
@ -561,7 +561,7 @@ function initRepository() {
|
|||||||
if ($('.repository.settings.options').length > 0) {
|
if ($('.repository.settings.options').length > 0) {
|
||||||
$('#repo_name').keyup(function () {
|
$('#repo_name').keyup(function () {
|
||||||
var $prompt = $('#repo-name-change-prompt');
|
var $prompt = $('#repo-name-change-prompt');
|
||||||
if ($(this).val().toString().toLowerCase() != $(this).data('repo-name').toString().toLowerCase()) {
|
if ($(this).val().toString().toLowerCase() != $(this).data('name').toString().toLowerCase()) {
|
||||||
$prompt.show();
|
$prompt.show();
|
||||||
} else {
|
} else {
|
||||||
$prompt.hide();
|
$prompt.hide();
|
||||||
@ -2071,7 +2071,7 @@ function showDeletePopup() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var dialog = $('.delete.modal' + filter);
|
var dialog = $('.delete.modal' + filter);
|
||||||
dialog.find('.repo-name').text($this.data('repo-name'));
|
dialog.find('.name').text($this.data('name'));
|
||||||
|
|
||||||
dialog.modal({
|
dialog.modal({
|
||||||
closable: false,
|
closable: false,
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
<td>{{.NumIssues}}</td>
|
<td>{{.NumIssues}}</td>
|
||||||
<td>{{SizeFmt .Size}}</td>
|
<td>{{SizeFmt .Size}}</td>
|
||||||
<td><span title="{{.CreatedUnix.FormatLong}}">{{.CreatedUnix.FormatShort}}</span></td>
|
<td><span title="{{.CreatedUnix.FormatLong}}">{{.CreatedUnix.FormatShort}}</span></td>
|
||||||
<td><a class="delete-button" href="" data-url="{{$.Link}}/delete?page={{$.Page.Current}}" data-id="{{.ID}}" data-repo-name="{{.Name}}"><i class="trash icon text red"></i></a></td>
|
<td><a class="delete-button" href="" data-url="{{$.Link}}/delete?page={{$.Page.Current}}" data-id="{{.ID}}" data-name="{{.Name}}"><i class="trash icon text red"></i></a></td>
|
||||||
</tr>
|
</tr>
|
||||||
{{end}}
|
{{end}}
|
||||||
</tbody>
|
</tbody>
|
||||||
@ -57,7 +57,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<p>{{.i18n.Tr "repo.settings.delete_desc"}}</p>
|
<p>{{.i18n.Tr "repo.settings.delete_desc"}}</p>
|
||||||
{{.i18n.Tr "repo.settings.delete_notices_2" `<span class="repo-name"></span>` | Safe}}<br>
|
{{.i18n.Tr "repo.settings.delete_notices_2" `<span class="name"></span>` | Safe}}<br>
|
||||||
{{.i18n.Tr "repo.settings.delete_notices_fork_1"}}<br>
|
{{.i18n.Tr "repo.settings.delete_notices_fork_1"}}<br>
|
||||||
</div>
|
</div>
|
||||||
{{template "base/delete_modal_actions" .}}
|
{{template "base/delete_modal_actions" .}}
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
{{else if .IsDeleted}}
|
{{else if .IsDeleted}}
|
||||||
<a class="undo-button" href data-url="{{$.Link}}/restore?branch_id={{.DeletedBranch.ID | urlquery}}&name={{.DeletedBranch.Name | urlquery}}"><i class="octicon octicon-reply"></i></a>
|
<a class="undo-button" href data-url="{{$.Link}}/restore?branch_id={{.DeletedBranch.ID | urlquery}}&name={{.DeletedBranch.Name | urlquery}}"><i class="octicon octicon-reply"></i></a>
|
||||||
{{else}}
|
{{else}}
|
||||||
<a class="delete-branch-button" href data-url="{{$.Link}}/delete?name={{.Name | urlquery}}" data-val="{{.Name}}"><i class="trash icon text red"></i></a>
|
<a class="delete-branch-button" href data-url="{{$.Link}}/delete?name={{.Name | urlquery}}" data-name="{{.Name}}"><i class="trash icon text red"></i></a>
|
||||||
{{end}}
|
{{end}}
|
||||||
</td>
|
</td>
|
||||||
{{end}}
|
{{end}}
|
||||||
@ -69,7 +69,7 @@
|
|||||||
<div class="ui small basic delete modal">
|
<div class="ui small basic delete modal">
|
||||||
<div class="ui icon header">
|
<div class="ui icon header">
|
||||||
<i class="trash icon"></i>
|
<i class="trash icon"></i>
|
||||||
{{.i18n.Tr "repo.branch.delete_html"}} <span class="branch-name"></span>
|
{{.i18n.Tr "repo.branch.delete_html"}} <span class="name"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<p>{{.i18n.Tr "repo.branch.delete_desc" | Str2html}}</p>
|
<p>{{.i18n.Tr "repo.branch.delete_desc" | Str2html}}</p>
|
||||||
|
Loading…
Reference in New Issue
Block a user