Re: [PATCH 5/7] gitweb: auxiliary functions to group data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 16, 2010 at 09:31, Giuseppe Bilotta
<giuseppe.bilotta@xxxxxxxxx> wrote:
> Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@xxxxxxxxx>
> ---
>  gitweb/gitweb.perl |   15 +++++++++++++++
>  1 files changed, 15 insertions(+), 0 deletions(-)
>
> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
> index 6138c6e..92551e4 100755
> --- a/gitweb/gitweb.perl
> +++ b/gitweb/gitweb.perl
> @@ -3765,6 +3765,21 @@ sub git_print_header_div {
>              "\n</div>\n";
>  }
>
> +sub git_begin_group {
> +       my ($class, $id, @rest) = @_;
> +
> +       $class = ' class="' . join(' ', 'group', $class) . '"';
> +
> +       $id = ' id="' . $id . '"' if $id;
> +
> +       print "<div$class$id>\n";

Hrm, this would be better:

     $cgi->div( { class => "group $class", $id ? (id => $id) : () } )

> +       git_print_header_div(@rest);
> +}
> +
> +sub git_end_group {
> +       print "</div>\n"
> +}
> +

But obviously that won't fit if the closing element is being printed
separately.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]