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

sartak at bestpractical.com sartak at bestpractical.com
Mon Mar 30 15:30:11 EDT 2009


The branch, master has been updated
       via  87f67e0c36f1c34dd5e9a85e224eb16998db1b95 (commit)
       via  8fefc302e4519e536ad4347b4b767e1bfd2ba9ca (commit)
      from  31f036518f28dbf040a04f74ad4b49468aaf984c (commit)

Summary of changes:
 lib/App/Changeloggr/Model/Vote.pm |    6 ++++--
 lib/App/Changeloggr/View.pm       |   11 +++++++++++
 2 files changed, 15 insertions(+), 2 deletions(-)

- Log -----------------------------------------------------------------
commit 8fefc302e4519e536ad4347b4b767e1bfd2ba9ca
Author: Shawn M Moore <sartak at gmail.com>
Date:   Mon Mar 30 15:29:38 2009 -0400

    Protect and hide some Vote columns

diff --git a/lib/App/Changeloggr/Model/Vote.pm b/lib/App/Changeloggr/Model/Vote.pm
index a30f2cc..5ddd105 100644
--- a/lib/App/Changeloggr/Model/Vote.pm
+++ b/lib/App/Changeloggr/Model/Vote.pm
@@ -6,10 +6,12 @@ use Jifty::DBI::Schema;
 
 use App::Changeloggr::Record schema {
     column change =>
-        refers_to App::Changeloggr::Model::Change;
+        refers_to App::Changeloggr::Model::Change,
+        is protected;
 
     column user_session_id =>
-        type is 'text';
+        type is 'text',
+        is private;
 
     column tag =>
         type is 'text';

commit 87f67e0c36f1c34dd5e9a85e224eb16998db1b95
Author: Shawn M Moore <sartak at gmail.com>
Date:   Mon Mar 30 15:29:49 2009 -0400

    Voting form

diff --git a/lib/App/Changeloggr/View.pm b/lib/App/Changeloggr/View.pm
index da95f9e..a62910a 100644
--- a/lib/App/Changeloggr/View.pm
+++ b/lib/App/Changeloggr/View.pm
@@ -51,6 +51,7 @@ template '/vote-on-change' => sub {
     my $change = $changelog->choose_change;
 
     show_change($change);
+    show_vote_form($change);
 };
 
 template '/changelog/admin' => page {
@@ -104,5 +105,15 @@ sub show_change {
     h3 { $change->message }
 }
 
+sub show_vote_form {
+    my $change = shift;
+
+    form {
+        my $vote = App::Changeloggr::Action::CreateVote->new;
+        render_action $vote;
+        form_submit(label => 'Vote');
+    }
+}
+
 1;
 

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



More information about the Bps-public-commit mailing list