Skip to content

Commit bebc6a3

Browse files
6543zeripath
authored andcommitted
[Branch View] icons to buttons (#7602)
* add restore-button info message * branch deltete undo icon to button * branch deltete icon to button
1 parent 1d7dd7d commit bebc6a3

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

options/locale/locale_en-US.ini

+1
Original file line numberDiff line numberDiff line change
@@ -1407,6 +1407,7 @@ branch.deleted_by = Deleted by %s
14071407
branch.restore_success = Branch '%s' has been restored.
14081408
branch.restore_failed = Failed to restore branch '%s'.
14091409
branch.protected_deletion_failed = Branch '%s' is protected. It cannot be deleted.
1410+
branch.restore = Restore Branch '%s'
14101411
14111412
topic.manage_topics = Manage Topics
14121413
topic.done = Done

templates/repo/branch/list.tmpl

+2-2
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@
9797
{{if .IsProtected}}
9898
<i class="octicon octicon-shield"></i>
9999
{{else if .IsDeleted}}
100-
<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>
100+
<a class="ui basic jump button icon poping up undo-button" href data-url="{{$.Link}}/restore?branch_id={{.DeletedBranch.ID | urlquery}}&name={{.DeletedBranch.Name | urlquery}}" data-content="{{$.i18n.Tr "repo.branch.restore" (.Name | EscapePound)}}" data-variation="tiny inverted" data-position="top right"><i class="octicon octicon-reply text blue"></i></a>
101101
{{else}}
102-
<a class="delete-branch-button" href data-url="{{$.Link}}/delete?name={{.Name | urlquery}}" data-name="{{.Name}}"><i class="trash icon text red"></i></a>
102+
<a class="ui basic jump button icon poping up delete-branch-button" href data-url="{{$.Link}}/delete?name={{.Name | urlquery}}" data-content="{{$.i18n.Tr "repo.branch.delete" (.Name | EscapePound)}}" data-variation="tiny inverted" data-position="top right" data-name="{{.Name}}"><i class="trash icon text red"></i></a>
103103
{{end}}
104104
</td>
105105
{{end}}

0 commit comments

Comments
 (0)