Re: [PATCH 3/4] gitweb: omit the repository owner when it is unset

7 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH 3/4] gitweb: omit the repository owner when it is unset

From: Jakub Narębski <hidden>
Date: 2016-06-15 22:58:18

On Tue, Jul 2, 2013 at 6:24 PM, Tony Finch [off-list ref] wrote:
On the repository summary page, leave the whole owner line out if
the repo does not have an owner, rather than displaying a labelled
empty field..
Note that if $omit_owner is true, whole _column_ is skipped.

Is removing cell (instead of leaving it empty) and relying on browser
treating nonexistent cell correctly a good idea, that I do not know.
Does it looks better?  Does it looks better in all web browsers?
quoted hunk
Signed-off-by: Tony Finch <dot@dotat.at>
---
 gitweb/gitweb.perl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 8d69ada..c029b98 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -6463,7 +6463,7 @@ sub git_summary {
        print "<div class=\"title\">&nbsp;</div>\n";
        print "<table class=\"projects_list\">\n" .
              "<tr id=\"metadata_desc\"><td>description</td><td>" . esc_html($descr) . "</td></tr>\n";
-        unless ($omit_owner) {
+        if ($owner and not $omit_owner) {
                print  "<tr id=\"metadata_owner\"><td>owner</td><td>" . esc_html($owner) . "</td></tr>\n";
         }
        if (defined $cd{'rfc2822'}) {
--
1.8.3.1.605.g85318f5


-- 
Jakub Narebski

Re: [PATCH 3/4] gitweb: omit the repository owner when it is unset

From: Tony Finch <dot@dotat.at>
Date: 2016-06-15 22:58:18

Jakub Narębski [off-list ref] wrote:
On Tue, Jul 2, 2013 at 6:24 PM, Tony Finch [off-list ref] wrote:
quoted
On the repository summary page, leave the whole owner line out if
the repo does not have an owner, rather than displaying a labelled
empty field..
Note that if $omit_owner is true, whole _column_ is skipped.
There are two places where the owner is displayed: on the list of
projects, and on each project's summary page. This change affects the
summary page (where it removes a row, not a column) and it leaves the
projects list alone. I'll make that clearer in the commit message (and fix
the extraneous dot).

Tony.
-- 
f.anthony.n.finch  [off-list ref]  http://dotat.at/
Forties, Cromarty: East, veering southeast, 4 or 5, occasionally 6 at first.
Rough, becoming slight or moderate. Showers, rain at first. Moderate or good,
occasionally poor at first.

[PATCH v4 3/4] gitweb: omit the repository owner when it is unset

From: Tony Finch <dot@dotat.at>
Date: 2016-06-15 22:58:28

On the repository summary page, leave the owner line out if the
repo does not have an owner, rather than displaying a labelled empty
field. This does not affect the owner column in the projects list
page, which is present unless $omit_owner is true.

Signed-off-by: Tony Finch <dot@dotat.at>
---
 gitweb/gitweb.perl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 8d69ada..c029b98 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -6463,7 +6463,7 @@ sub git_summary {
 	print "<div class=\"title\">&nbsp;</div>\n";
 	print "<table class=\"projects_list\">\n" .
 	      "<tr id=\"metadata_desc\"><td>description</td><td>" . esc_html($descr) . "</td></tr>\n";
-        unless ($omit_owner) {
+        if ($owner and not $omit_owner) {
 	        print  "<tr id=\"metadata_owner\"><td>owner</td><td>" . esc_html($owner) . "</td></tr>\n";
         }
 	if (defined $cd{'rfc2822'}) {
-- 
1.8.3.1.605.g85318f5

[PATCH v4 4/4] gitweb: make search help link less ugly

From: Tony Finch <dot@dotat.at>
Date: 2016-06-15 22:58:28

The search help link was a superscript question mark right next to
a drop-down menu, which looks misaligned and is a cramped and
awkward click target. Remove the superscript tags and add some
spacing to fix these nits. Add a title attribute to provide an
explanatory mouseover.

Signed-off-by: Tony Finch <dot@dotat.at>
---
 gitweb/gitweb.perl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 8d69ada..59af7de 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -4030,8 +4030,8 @@ sub print_search_form {
 	      $cgi->input({-name=>"h", -value=>$search_hash, -type=>"hidden"}) . "\n" .
 	      $cgi->popup_menu(-name => 'st', -default => 'commit',
 	                       -values => ['commit', 'grep', 'author', 'committer', 'pickaxe']) .
-	      $cgi->sup($cgi->a({-href => href(action=>"search_help")}, "?")) .
-	      " search:\n",
+	      " " . $cgi->a({-href => href(action=>"search_help"),
+			     -title => "search help" }, "?") . " search:\n",
 	      $cgi->textfield(-name => "s", -value => $searchtext, -override => 1) . "\n" .
 	      "<span title=\"Extended regular expression\">" .
 	      $cgi->checkbox(-name => 'sr', -value => 1, -label => 're',
-- 
1.8.3.1.605.g85318f5

[PATCH v4 2/4] gitweb: vertically centre contents of page footer

From: Tony Finch <dot@dotat.at>
Date: 2016-06-15 22:58:28

Signed-off-by: Tony Finch <dot@dotat.at>
---
 gitweb/static/gitweb.css | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gitweb/static/gitweb.css b/gitweb/static/gitweb.css
index a869be1..3b4d833 100644
--- a/gitweb/static/gitweb.css
+++ b/gitweb/static/gitweb.css
@@ -68,12 +68,13 @@ div.page_path {
 }
 
 div.page_footer {
-	height: 17px;
+	height: 22px;
 	padding: 4px 8px;
 	background-color: #d9d8d1;
 }
 
 div.page_footer_text {
+	line-height: 22px;
 	float: left;
 	color: #555555;
 	font-style: italic;
-- 
1.8.3.1.605.g85318f5

[PATCH v4 1/4] gitweb: Ensure OPML text fits inside its box.

From: Tony Finch <dot@dotat.at>
Date: 2016-06-15 22:58:28

The rss_logo CSS style has a fixed width which is too narrow for
the string "OPML". Replace the fixed width with horizontal padding
so the text fits with nice margins.

Signed-off-by: Tony Finch <dot@dotat.at>
---
 gitweb/static/gitweb.css | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/gitweb/static/gitweb.css b/gitweb/static/gitweb.css
index cb86d2d..a869be1 100644
--- a/gitweb/static/gitweb.css
+++ b/gitweb/static/gitweb.css
@@ -548,8 +548,7 @@ a.linenr {
 
 a.rss_logo {
 	float: right;
-	padding: 3px 0px;
-	width: 35px;
+	padding: 3px 5px;
 	line-height: 10px;
 	border: 1px solid;
 	border-color: #fcc7a5 #7d3302 #3e1a01 #ff954e;
-- 
1.8.3.1.605.g85318f5

[PATCH v4 0/4] Four small gitweb tweaks

From: Tony Finch <dot@dotat.at>
Date: 2016-06-15 22:58:28

This is mostly just a repost to un-stall this topic.

I have fixed the tab damage problem spotted by Jakub in the search
help link patch, and I have improved the commit message for the
repository owner patch. No other changes.

Tony Finch (4):
  gitweb: Ensure OPML text fits inside its box.
  gitweb: vertically centre contents of page footer
  gitweb: omit the repository owner when it is unset
  gitweb: make search help link less ugly

 gitweb/gitweb.perl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
1.8.3.1.605.g85318f5
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help