[Bps-public-commit] App-Changeloggr branch, master, updated. dea293569e21644f5d0f319cee2acbd31094fa65

sartak at bestpractical.com sartak at bestpractical.com
Wed May 27 13:03:20 EDT 2009


The branch, master has been updated
       via  dea293569e21644f5d0f319cee2acbd31094fa65 (commit)
      from  bb42e1d6ebef0171c5215851058ab97c776c06b4 (commit)

Summary of changes:
 lib/App/Changeloggr/View.pm |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

- Log -----------------------------------------------------------------
commit dea293569e21644f5d0f319cee2acbd31094fa65
Author: Shawn M Moore <sartak at gmail.com>
Date:   Wed May 27 13:03:05 2009 -0400

    Add a newline between tags that have been selected for this change and
    those that haven't

diff --git a/lib/App/Changeloggr/View.pm b/lib/App/Changeloggr/View.pm
index dcb90c8..4b24b24 100644
--- a/lib/App/Changeloggr/View.pm
+++ b/lib/App/Changeloggr/View.pm
@@ -237,15 +237,25 @@ sub show_vote_form {
         }
 
         if ($valid_tags->count) {
+            my $tag_number = 0;
+            my $voted_cusp = 0;
             while (my $valid_tag = $valid_tags->next) {
                 my $label;
                 # This is actually checking count+1, not id. It's count+1
                 # because id 0 (aka count 0) records are not loaded. :/
+                ++$tag_number;
                 if ($valid_tag->id - 1 > 0) {
                     $label = _('%1 (%2)', $valid_tag->text, $valid_tag->id - 1);
                 }
                 else {
                     $label = $valid_tag->text;
+
+                    # Add a newline between tags that have been selected for
+                    # this change and tags that haven't
+                    if (!$voted_cusp) {
+                        $voted_cusp = 1;
+                        br {} unless $tag_number == 1;
+                    }
                 }
 
                 $vote->button(

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list