Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dont merge] branch page some enhancements (-> PRs #7602 #7603 #7604) #7520

Closed
wants to merge 32 commits into from
Closed
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
5441182
add download butons (template from home.tmpl)
6543 Jul 18, 2019
d9fc4a2
add $
6543 Jul 18, 2019
b6b22d9
add download buton, when no user logon
6543 Jul 18, 2019
bce9f3a
fix download menue of default branch
6543 Jul 19, 2019
f524cd8
fix download menue (dont fly away)
6543 Jul 19, 2019
0e92e5f
mv download buton in extra colum
6543 Jul 19, 2019
27880b0
commit x/y diagram doesnt break
6543 Jul 19, 2019
c9d98c8
show protected symbol onece
6543 Jul 19, 2019
d75e2b4
add download colum
6543 Jul 19, 2019
8fba697
correct placement
6543 Jul 19, 2019
05463ca
switch colum download <-> delete
6543 Jul 19, 2019
1b9918f
found css style wich position the menue
6543 Jul 19, 2019
0e1405c
del useless inline css
6543 Jul 19, 2019
63a714f
add needet css to less file
6543 Jul 19, 2019
cae8ab5
update css with "make css"
6543 Jul 19, 2019
2337499
template: switch from inline css to less
6543 Jul 19, 2019
f5fb8c9
use wrong values because of browser caching
6543 Jul 19, 2019
fa1521e
all buttons with border
6543 Jul 22, 2019
f31cb05
add Translation for button Messages
6543 Jul 22, 2019
b934303
Add Message to Button
6543 Jul 22, 2019
dad98cf
delete table header because of overhead
6543 Jul 22, 2019
bcaea37
dont ned position absolute for download anymore
6543 Jul 22, 2019
ce87533
rm ugly css
6543 Jul 22, 2019
81a7a01
add css class download-column
6543 Jul 22, 2019
15eead7
use css class download-column
6543 Jul 22, 2019
33d54e1
follow Contirb guidlines
6543 Jul 22, 2019
e8c4217
name things corectly
6543 Jul 22, 2019
190ba85
Merge branch 'master' into wip-branch-page-add-download
6543 Jul 22, 2019
eac8103
also change info message on default branch
6543 Jul 23, 2019
a178dff
Merge remote-tracking branch 'main/master' into wip-branch-page-add-d…
6543 Jul 23, 2019
1d98e88
Apply suggestions from code review
6543 Jul 23, 2019
99470a8
remove diff for merge
6543 Jul 24, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions options/locale/locale_de-DE.ini
Original file line number Diff line number Diff line change
Expand Up @@ -1400,6 +1400,8 @@ branch.deleted_by=Von %s gelöscht
branch.restore_success=Branch „%s“ wurde wiederhergestellt.
branch.restore_failed=Wiederherstellung des Branches „%s“ fehlgeschlagen.
branch.protected_deletion_failed=Branch „%s“ ist geschützt und kann nicht gelöscht werden.
branch.download=Branch „%s“ herunterladen
6543 marked this conversation as resolved.
Show resolved Hide resolved
branch.restored=Branch „%s“ wiederherstellen

topic.manage_topics=Themen verwalten
topic.done=Fertig
Expand Down
2 changes: 2 additions & 0 deletions options/locale/locale_en-US.ini
Original file line number Diff line number Diff line change
Expand Up @@ -1407,6 +1407,8 @@ branch.deleted_by = Deleted by %s
branch.restore_success = Branch '%s' has been restored.
branch.restore_failed = Failed to restore branch '%s'.
branch.protected_deletion_failed = Branch '%s' is protected. It cannot be deleted.
branch.download=Download Branch „%s“
6543 marked this conversation as resolved.
Show resolved Hide resolved
branch.restored=Restore Branch „%s“

topic.manage_topics = Manage Topics
topic.done = Done
Expand Down
47 changes: 27 additions & 20 deletions templates/repo/branch/list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@
{{end}}
{{end}}
</td>
<td class="right aligned" style="overflow: visible;">
<div class="ui basic jump dropdown icon button poping up" data-content="{{$.i18n.Tr "repo.download_archive"}}" 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>
Expand All @@ -34,33 +43,20 @@
</h4>
<div class="ui attached table segment">
<table class="ui very basic striped fixed table single line">
<thead>
<tr>
<th class="six wide">{{.i18n.Tr "repo.branch.name"}}</th>
<th class="two wide"></th>
<th class="two wide"></th>
{{if and $.IsWriter (not $.IsMirror)}}
<th class="one wide right aligned">{{.i18n.Tr "repo.branch.delete_head"}}</th>
{{end}}
</tr>
</thead>
<tbody>
{{range $branch := .Branches}}
{{if ne .Name $.DefaultBranch}}
<tr>
<td>
<td class="six wide">
{{if .IsDeleted}}
<s><a href="{{$.RepoLink}}/src/branch/{{.Name | EscapePound}}">{{.Name}}</a></s>
<p class="info">{{$.i18n.Tr "repo.branch.deleted_by" .DeletedBranch.DeletedBy.Name}} {{TimeSinceUnix .DeletedBranch.DeletedUnix $.i18n.Lang}}</p>
{{else}}
{{if .IsProtected}}
6543 marked this conversation as resolved.
Show resolved Hide resolved
<i class="octicon octicon-shield"></i>
{{end}}
<a href="{{$.RepoLink}}/src/branch/{{.Name | EscapePound}}">{{.Name}}</a>
<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="ui">
<td class="ui three wide">
{{if not .IsDeleted}}
<div class="commit-divergence">
<div class="bar-group">
Expand All @@ -69,12 +65,12 @@
</div>
<div class="bar-group">
<div class="count count-ahead">{{.CommitsAhead}}</div>
<div class="bar bar-ahead" style="width: {{percentage .CommitsAhead .CommitsBehind .CommitsAhead}}%"></div>
<div class="bar bar-ahead" style="width: {{percentage .CommitsAhead .CommitsBehind .CommitsAhead}}%"></div>
</div>
</div>
{{end}}
</td>
<td class="right aligned">
<td class="right aligned two wide">
{{if not .LatestPullRequest}}
{{if and (not .IsDeleted) $.AllowsPulls}}
<a href="{{$.RepoLink}}/compare/{{$.DefaultBranch | EscapePound}}...{{if ne $.Repository.Owner.Name $.Owner.Name}}{{$.Owner.Name}}:{{end}}{{.Name | EscapePound}}">
Expand All @@ -92,14 +88,25 @@
{{end}}
{{end}}
</td>
<td class="right alinged one wide" style="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/{{.Name | EscapePound}}.zip"><i class="octicon octicon-file-zip"></i> ZIP</a>
<a class="item" href="{{$.RepoLink}}/archive/{{.Name | EscapePound}}.tar.gz"><i class="octicon octicon-file-zip"></i> TAR.GZ</a>
</div>
</div>
{{end}}
</td>
{{if and $.IsWriter (not $.IsMirror)}}
<td class="right aligned">
<td class="center aligned one wide">
{{if .IsProtected}}
<i class="octicon octicon-shield"></i>
{{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="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.restored" (.Name | EscapePound)}}" data-variation="tiny inverted" data-position="top right"><i class="octicon octicon-reply text blue"></i></a>
{{else}}
<a class="delete-branch-button" href data-url="{{$.Link}}/delete?name={{.Name | urlquery}}" data-name="{{.Name}}"><i class="trash icon text red"></i></a>
<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}}
</td>
{{end}}
Expand Down