{"thread":{"id":"43354","subject":"[PATCH] gitweb: Make project description in projects list link to summary view","startedAt":"2006-11-26T01:18:26Z","lastAt":"2006-11-26T01:18:26Z","messageCount":1,"participants":["Jakub Narebski"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"294459","messageId":"1164503906220-git-send-email-jnareb@gmail.com","threadId":"43354","inReplyTo":null,"subject":"[PATCH] gitweb: Make project description in projects list link to summary view","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-11-26T01:18:26Z","receivedAt":"2006-11-26T01:18:26Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Make (shortened) project description in the \"projects list\" view\nhyperlink to the \"summary\" view of the project. Project names are\nsometimes short; having project description be hyperling gives larger\nare to click. While at it, display full description on mouseover via\n'title' attribute to introduced link.\n\nAdditionally, fix whitespace usage in modified git_project_list_body\nsubroutine: tabs are for indent, spaces are for align.\n\nSigned-off-by: Jakub Narebski <jnareb@gmail.com>\n---\n gitweb/gitweb.perl |   13 ++++++++-----\n 1 files changed, 8 insertions(+), 5 deletions(-)\n\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex fac7923..0477507 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -2441,6 +2441,7 @@ sub git_project_list_body {\n \t\t($pr->{'age'}, $pr->{'age_string'}) = @aa;\n \t\tif (!defined $pr->{'descr'}) {\n \t\t\tmy $descr = git_get_project_description($pr->{'path'}) || \"\";\n+\t\t\t$pr->{'descr_long'} = to_utf8($descr);\n \t\t\t$pr->{'descr'} = chop_str($descr, 25, 5);\n \t\t}\n \t\tif (!defined $pr->{'owner'}) {\n@@ -2476,7 +2477,7 @@ sub git_project_list_body {\n \t\t} else {\n \t\t\tprint \"<th>\" .\n \t\t\t      $cgi->a({-href => href(project=>undef, order=>'project'),\n-\t\t\t\t       -class => \"header\"}, \"Project\") .\n+\t\t\t               -class => \"header\"}, \"Project\") .\n \t\t\t      \"</th>\\n\";\n \t\t}\n \t\tif ($order eq \"descr\") {\n@@ -2485,7 +2486,7 @@ sub git_project_list_body {\n \t\t} else {\n \t\t\tprint \"<th>\" .\n \t\t\t      $cgi->a({-href => href(project=>undef, order=>'descr'),\n-\t\t\t\t       -class => \"header\"}, \"Description\") .\n+\t\t\t               -class => \"header\"}, \"Description\") .\n \t\t\t      \"</th>\\n\";\n \t\t}\n \t\tif ($order eq \"owner\") {\n@@ -2494,7 +2495,7 @@ sub git_project_list_body {\n \t\t} else {\n \t\t\tprint \"<th>\" .\n \t\t\t      $cgi->a({-href => href(project=>undef, order=>'owner'),\n-\t\t\t\t       -class => \"header\"}, \"Owner\") .\n+\t\t\t               -class => \"header\"}, \"Owner\") .\n \t\t\t      \"</th>\\n\";\n \t\t}\n \t\tif ($order eq \"age\") {\n@@ -2503,7 +2504,7 @@ sub git_project_list_body {\n \t\t} else {\n \t\t\tprint \"<th>\" .\n \t\t\t      $cgi->a({-href => href(project=>undef, order=>'age'),\n-\t\t\t\t       -class => \"header\"}, \"Last Change\") .\n+\t\t\t               -class => \"header\"}, \"Last Change\") .\n \t\t\t      \"</th>\\n\";\n \t\t}\n \t\tprint \"<th></th>\\n\" .\n@@ -2528,7 +2529,9 @@ sub git_project_list_body {\n \t\t}\n \t\tprint \"<td>\" . $cgi->a({-href => href(project=>$pr->{'path'}, action=>\"summary\"),\n \t\t                        -class => \"list\"}, esc_html($pr->{'path'})) . \"</td>\\n\" .\n-\t\t      \"<td>\" . esc_html($pr->{'descr'}) . \"</td>\\n\" .\n+\t\t      \"<td>\" . $cgi->a({-href => href(project=>$pr->{'path'}, action=>\"summary\"),\n+\t\t                        -class => \"list\", -title => $pr->{'descr_long'}},\n+\t\t                        esc_html($pr->{'descr'})) . \"</td>\\n\" .\n \t\t      \"<td><i>\" . chop_str($pr->{'owner'}, 15) . \"</i></td>\\n\";\n \t\tprint \"<td class=\\\"\". age_class($pr->{'age'}) . \"\\\">\" .\n \t\t      $pr->{'age_string'} . \"</td>\\n\" .\n-- \n1.4.4.1\n"}]}