From 5441182e2f7d73a10771a7c960da12ea6b4e014e Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Thu, 18 Jul 2019 19:05:26 +0200 Subject: [PATCH 01/30] add download butons (template from home.tmpl) maybe use a template vor all download butons in future? --- templates/repo/branch/list.tmpl | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/templates/repo/branch/list.tmpl b/templates/repo/branch/list.tmpl index 7963f8877ff7..fdd46aba96d9 100644 --- a/templates/repo/branch/list.tmpl +++ b/templates/repo/branch/list.tmpl @@ -23,6 +23,15 @@ {{end}} {{end}} +
{{$.i18n.Tr "repo.branch.deleted_by" .DeletedBranch.DeletedBy.Name}} {{TimeSinceUnix .DeletedBranch.DeletedUnix $.i18n.Lang}}
{{else}} - {{if .IsProtected}} - - {{end}} {{.Name}}{{ShortSha .Commit.ID.String}} · {{RenderCommitMessage .Commit.CommitMessage $.RepoLink $.Repository.ComposeMetas}} · {{$.i18n.Tr "org.repo_updated"}} {{TimeSince .Commit.Committer.When $.i18n.Lang}}
{{end}} From d75e2b477dbb0fd021207a23fb82bfdf6f24b833 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Fri, 19 Jul 2019 19:19:23 +0200 Subject: [PATCH 09/30] add download colum --- templates/repo/branch/list.tmpl | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/templates/repo/branch/list.tmpl b/templates/repo/branch/list.tmpl index bc4aefdd73d7..c0756dd8b3db 100644 --- a/templates/repo/branch/list.tmpl +++ b/templates/repo/branch/list.tmpl @@ -109,17 +109,18 @@ {{end}} - {{else}} -{{.i18n.Tr "repo.branch.name"}} | -- | - | - {{if and $.IsWriter (not $.IsMirror)}} - | {{.i18n.Tr "repo.branch.delete_head"}} | - {{end}} -||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
+ |
{{if .IsDeleted}}
{{$.i18n.Tr "repo.branch.deleted_by" .DeletedBranch.DeletedBy.Name}} {{TimeSinceUnix .DeletedBranch.DeletedUnix $.i18n.Lang}} @@ -67,7 +56,7 @@{{ShortSha .Commit.ID.String}} · {{RenderCommitMessage .Commit.CommitMessage $.RepoLink $.Repository.ComposeMetas}} · {{$.i18n.Tr "org.repo_updated"}} {{TimeSince .Commit.Committer.When $.i18n.Lang}} {{end}} |
- + |
{{if not .IsDeleted}}
@@ -81,7 +70,7 @@
{{end}}
|
- + | {{if not .LatestPullRequest}} {{if and (not .IsDeleted) $.AllowsPulls}} @@ -99,7 +88,7 @@ {{end}} {{end}} | -+ |
{{if not .IsDeleted}}
@@ -111,7 +100,7 @@
{{end}}
|
{{if and $.IsWriter (not $.IsMirror)}}
- + | {{if .IsProtected}} {{else if .IsDeleted}} From bcaea3733a0ce2a31792dc92980e506dc5d68597 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Mon, 22 Jul 2019 23:09:15 +0200 Subject: [PATCH 22/30] dont ned position absolute for download anymore ( table hast property "overflow: hidden;" wich hiddes the menue ) solution -> instead of set button lot of css - change table property --- templates/repo/branch/list.tmpl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/templates/repo/branch/list.tmpl b/templates/repo/branch/list.tmpl index 0096a36906c9..379308a4cbb8 100644 --- a/templates/repo/branch/list.tmpl +++ b/templates/repo/branch/list.tmpl @@ -23,8 +23,8 @@ {{end}} {{end}} | -
-
+
+ |
-
ZIP
@@ -88,9 +88,9 @@
{{end}}
{{end}}
+ |
{{if not .IsDeleted}}
- |
-
+
ZIP
From ce87533532d15ca1a5224c05f05f70f821b7985b Mon Sep 17 00:00:00 2001
From: 6543 <6543@obermui.de>
Date: Mon, 22 Jul 2019 23:29:33 +0200
Subject: [PATCH 23/30] rm ugly css
---
public/css/index.css | 1 -
public/less/_repository.less | 5 -----
2 files changed, 6 deletions(-)
diff --git a/public/css/index.css b/public/css/index.css
index b7e2461a3c1f..4a7dfb2824bf 100644
--- a/public/css/index.css
+++ b/public/css/index.css
@@ -626,7 +626,6 @@ footer .ui.left,footer .ui.right{line-height:40px}
.repository.branches .commit-divergence .bar{height:4px;position:absolute;background-color:#d4d4d5}
.repository.branches .commit-divergence .bar.bar-behind{right:0}
.repository.branches .commit-divergence .bar.bar-ahead{left:0}
-.repository.branches .dlmenu{position:absolute;margin-left:-38px;margin-top:-18px}
.repository.commits .header .search input{font-weight:400;padding:5px 10px}
.repository #commits-table thead th:first-of-type{padding-left:15px}
.repository #commits-table thead .sha{width:140px}
diff --git a/public/less/_repository.less b/public/less/_repository.less
index fd05e9447aab..21aeea81e767 100644
--- a/public/less/_repository.less
+++ b/public/less/_repository.less
@@ -1233,11 +1233,6 @@
}
}
}
- .dlmenu {
- position: absolute;
- margin-left: -38px;
- margin-top: -18px;
- }
}
&.commits {
From 81a7a016580c24678da073a828b3cc368ab4478c Mon Sep 17 00:00:00 2001
From: 6543 <6543@obermui.de>
Date: Tue, 23 Jul 2019 00:41:12 +0200
Subject: [PATCH 24/30] add css class download-column
---
public/css/index.css | 1 +
public/less/_explore.less | 4 ++++
2 files changed, 5 insertions(+)
diff --git a/public/css/index.css b/public/css/index.css
index 4a7dfb2824bf..1c9dd3927c40 100644
--- a/public/css/index.css
+++ b/public/css/index.css
@@ -984,6 +984,7 @@ tbody.commit-list{vertical-align:baseline}
.ui.repository.list .item .ui.avatar.image{width:24px;height:24px}
.ui.repository.branches .info{font-size:12px;color:grey;display:flex;white-space:pre}
.ui.repository.branches .info .commit-message{max-width:72em;overflow:hidden;text-overflow:ellipsis}
+.ui.repository.branches .download-column{overflow:visible;text-align:right}
.ui.user.list .item{padding-bottom:25px}
.ui.user.list .item:not(:first-child){border-top:1px solid #eee;padding-top:25px}
.ui.user.list .item .ui.avatar.image{width:40px;height:40px}
diff --git a/public/less/_explore.less b/public/less/_explore.less
index 11dacb7285b9..8534146314d0 100644
--- a/public/less/_explore.less
+++ b/public/less/_explore.less
@@ -73,6 +73,10 @@
text-overflow: ellipsis;
}
}
+ .download-column {
+ overflow: visible;
+ text-align: right;
+ }
}
.ui.user.list {
From 15eead7936cd7ae43b3b699217fc11bd3a82f238 Mon Sep 17 00:00:00 2001
From: 6543 <6543@obermui.de>
Date: Tue, 23 Jul 2019 00:41:35 +0200
Subject: [PATCH 25/30] use css class download-column
---
templates/repo/branch/list.tmpl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/templates/repo/branch/list.tmpl b/templates/repo/branch/list.tmpl
index 379308a4cbb8..a800dd3f1580 100644
--- a/templates/repo/branch/list.tmpl
+++ b/templates/repo/branch/list.tmpl
@@ -23,7 +23,7 @@
{{end}}
{{end}}
+ |
|
-
@@ -88,7 +88,7 @@
{{end}}
{{end}}
+ |
{{if not .IsDeleted}}
|
From 33d54e1bd06d6179c4eef48ea657517a3155264a Mon Sep 17 00:00:00 2001
From: 6543 <6543@obermui.de>
Date: Tue, 23 Jul 2019 01:05:40 +0200
Subject: [PATCH 26/30] follow Contirb guidlines sory missed that
---
options/locale/locale_de-DE.ini | 2 --
1 file changed, 2 deletions(-)
diff --git a/options/locale/locale_de-DE.ini b/options/locale/locale_de-DE.ini
index bc350ce32724..d6ee0d212635 100644
--- a/options/locale/locale_de-DE.ini
+++ b/options/locale/locale_de-DE.ini
@@ -1400,8 +1400,6 @@ 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
-branch.restored=Branch „%s“ wiederherstellen
topic.manage_topics=Themen verwalten
topic.done=Fertig
From e8c42177fee04da6d7f2c48a659a4f34d2bc2857 Mon Sep 17 00:00:00 2001
From: 6543 <6543@obermui.de>
Date: Tue, 23 Jul 2019 01:08:10 +0200
Subject: [PATCH 27/30] name things corectly
---
options/locale/locale_en-US.ini | 2 +-
templates/repo/branch/list.tmpl | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini
index beaf24e5e062..6c35a772bfbc 100644
--- a/options/locale/locale_en-US.ini
+++ b/options/locale/locale_en-US.ini
@@ -1408,7 +1408,7 @@ 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“
-branch.restored=Restore Branch „%s“
+branch.restore=Restore Branch „%s“
topic.manage_topics = Manage Topics
topic.done = Done
diff --git a/templates/repo/branch/list.tmpl b/templates/repo/branch/list.tmpl
index a800dd3f1580..a94b235c86af 100644
--- a/templates/repo/branch/list.tmpl
+++ b/templates/repo/branch/list.tmpl
@@ -104,7 +104,7 @@
{{if .IsProtected}}
{{else if .IsDeleted}}
-
+
{{else}}
{{end}}
From eac8103ab44af88e5e28e68c01b18e72d1a32f7b Mon Sep 17 00:00:00 2001
From: 6543 <6543@obermui.de>
Date: Tue, 23 Jul 2019 02:00:49 +0200
Subject: [PATCH 28/30] also change info message on default branch
---
templates/repo/branch/list.tmpl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/templates/repo/branch/list.tmpl b/templates/repo/branch/list.tmpl
index a94b235c86af..7fee444a88d2 100644
--- a/templates/repo/branch/list.tmpl
+++ b/templates/repo/branch/list.tmpl
@@ -24,7 +24,7 @@
{{end}}
- |
+
ZIP
From 1d98e88cadc6340a3d5181c3174ffbed283ec223 Mon Sep 17 00:00:00 2001
From: 6543 <24977596+6543@users.noreply.github.com>
Date: Tue, 23 Jul 2019 04:45:26 +0200
Subject: [PATCH 29/30] Apply suggestions from code review
thx @gary-kim
Co-Authored-By: Gary Kim {{$.i18n.Tr "repo.branch.deleted_by" .DeletedBranch.DeletedBy.Name}} {{TimeSinceUnix .DeletedBranch.DeletedUnix $.i18n.Lang}} {{else}} + {{if .IsProtected}} + + {{end}} {{.Name}}{{ShortSha .Commit.ID.String}} · {{RenderCommitMessage .Commit.CommitMessage $.RepoLink $.Repository.ComposeMetas}} · {{$.i18n.Tr "org.repo_updated"}} {{TimeSince .Commit.Committer.When $.i18n.Lang}} {{end}} |