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

sartak at bestpractical.com sartak at bestpractical.com
Tue Mar 31 20:10:10 EDT 2009


The branch, master has been updated
       via  6fb8c3733e003b2e53d0ac329a4e58254010dd15 (commit)
      from  c081d433491c935ada78a91e984f3ba2af7cf08f (commit)

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

- Log -----------------------------------------------------------------
commit 6fb8c3733e003b2e53d0ac329a4e58254010dd15
Author: Shawn M Moore <sartak at gmail.com>
Date:   Tue Mar 31 20:09:49 2009 -0400

    Tag CRUD for a changelog

diff --git a/lib/App/Changeloggr/View.pm b/lib/App/Changeloggr/View.pm
index d2efd93..7cfb1d1 100644
--- a/lib/App/Changeloggr/View.pm
+++ b/lib/App/Changeloggr/View.pm
@@ -74,6 +74,8 @@ template '/changelog/admin' => page {
 
     add_changes_to($changelog);
 
+    edit_tags($changelog);
+
     my $delete = $changelog->as_delete_action;
     form {
         render_action($delete);
@@ -130,5 +132,27 @@ sub show_vote_form {
     }
 }
 
+sub edit_tags {
+    my $changelog = shift;
+    my $tags = M("TagCollection", changelog => $changelog);
+
+    while (my $tag = $tags->next) {
+        form {
+            my $delete_tag = $tag->as_delete_action;
+            render_action $delete_tag;
+            form_submit(label => $tag->text);
+        }
+    }
+
+    form {
+        my $add_tag = new_action(
+            class     => "CreateTag",
+            arguments => { changelog => $changelog->id }
+        );
+        render_action $add_tag;
+        form_submit(label => 'Add Tag');
+    }
+}
+
 1;
 

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



More information about the Bps-public-commit mailing list