summaryrefslogtreecommitdiffstats
path: root/templates/repo
diff options
context:
space:
mode:
Diffstat (limited to 'templates/repo')
-rw-r--r--templates/repo/branch/list.tmpl36
1 files changed, 27 insertions, 9 deletions
diff --git a/templates/repo/branch/list.tmpl b/templates/repo/branch/list.tmpl
index ead9f4ba2d..2b98881f60 100644
--- a/templates/repo/branch/list.tmpl
+++ b/templates/repo/branch/list.tmpl
@@ -23,6 +23,15 @@
{{end}}
{{end}}
</td>
+ <td class="right aligned overflow-visible">
+ <div class="ui basic jump dropdown icon button poping up" data-content="{{$.i18n.Tr "repo.branch.download" ($.DefaultBranch|EscapePound)}}" data-variation="tiny inverted" data-position="top right">
+ <i class="download icon"></i>
+ <div class="menu">
+ <a class="item" href="{{$.RepoLink}}/archive/{{EscapePound $.DefaultBranch}}.zip"><i class="octicon octicon-file-zip"></i> ZIP</a>
+ <a class="item" href="{{$.RepoLink}}/archive/{{EscapePound $.DefaultBranch}}.tar.gz"><i class="octicon octicon-file-zip"></i> TAR.GZ</a>
+ </div>
+ </div>
+ </td>
</tr>
</tbody>
</table>
@@ -50,7 +59,7 @@
<p class="info"><i class="octicon octicon-git-commit"></i><a href="{{$.RepoLink}}/commit/{{.Commit.ID.String}}">{{ShortSha .Commit.ID.String}}</a> · <span class="commit-message">{{RenderCommitMessage .Commit.CommitMessage $.RepoLink $.Repository.ComposeMetas}}</span> · {{$.i18n.Tr "org.repo_updated"}} {{TimeSince .Commit.Committer.When $.i18n.Lang}}</p>
{{end}}
</td>
- <td class="two wide ui">
+ <td class="three wide ui">
{{if not .IsDeleted}}
<div class="commit-divergence">
<div class="bar-group">
@@ -82,15 +91,24 @@
{{end}}
{{end}}
</td>
- {{if and $.IsWriter (not $.IsMirror)}}
- <td class="one wide right aligned">
- {{if and .IsDeleted (not .IsProtected)}}
- <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>
- {{else if (not .IsProtected)}}
- <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>
+ <td class="two wide right aligned overflow-visible">
+ {{if (not .IsDeleted)}}
+ <div class="ui basic jump dropdown icon button poping up" data-content="{{$.i18n.Tr "repo.branch.download" (.Name|EscapePound)}}" data-variation="tiny inverted" data-position="top right">
+ <i class="download icon"></i>
+ <div class="menu">
+ <a class="item" href="{{$.RepoLink}}/archive/{{EscapePound .Name}}.zip"><i class="octicon octicon-file-zip"></i> ZIP</a>
+ <a class="item" href="{{$.RepoLink}}/archive/{{EscapePound .Name}}.tar.gz"><i class="octicon octicon-file-zip"></i> TAR.GZ</a>
+ </div>
+ </div>
{{end}}
- </td>
- {{end}}
+ {{if and $.IsWriter (not $.IsMirror) (not .IsProtected)}}
+ {{if .IsDeleted}}
+ <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>
+ {{else}}
+ <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>
+ {{end}}
+ {{end}}
+ </td>
</tr>
{{end}}
{{end}}