From 1b31f74e2153d35013d833ea8d1d798341d81d44 Mon Sep 17 00:00:00 2001 From: marcus Date: Mon, 12 Nov 2007 21:44:47 +0000 Subject: [PATCH] Prepare for release --- Changes | 8 +++++++- META.yml | 2 +- lib/MojoMojo.pm | 4 ++-- lib/MojoMojo/Controller/Admin.pm | 11 +++++------ lib/MojoMojo/Controller/Gallery.pm | 2 +- lib/MojoMojo/View/TT.pm | 1 + root/base/admin/update_user.tt | 1 + root/base/{settings => admin}/user.tt | 6 ++++-- root/base/page/bottomnav.tt | 7 +------ 9 files changed, 23 insertions(+), 19 deletions(-) create mode 100644 root/base/admin/update_user.tt rename root/base/{settings => admin}/user.tt (71%) diff --git a/Changes b/Changes index df1ea0e8..7c15e674 100644 --- a/Changes +++ b/Changes @@ -1,7 +1,13 @@ -0.999006 2007-09-24 00:01:00 +0.999008 2007-11-12 22:43:00 + - Fix ajax for tagging + - Fix tag galleries + - Fix ajax for user activation. + +0.999007 2007-09-24 00:01:00 - Really fix deploy script for mysql - Fix deploy script for pg. - Refactor test data so it only exists once. + - Updated main class POD (removed developer docs and added to description) 0.999006 2007-09-23 12:12:00 - Fix deploy script to work with mysql constraints diff --git a/META.yml b/META.yml index d71ca42c..4b0e6b6e 100644 --- a/META.yml +++ b/META.yml @@ -69,4 +69,4 @@ requires: XML::Clean: 0 YAML: 0.36 tests: t/01app.t t/02pod.t t/03podcoverage.t t/formatter_comment.t t/formatter_irclog.t t/formatter_wiki.t t/schema_DBIC.t t/schema_DBIC_Attachment.t t/schema_DBIC_Content.t t/schema_DBIC_Page.t t/schema_DBIC_Person.t t/schema_DBIC_Tag.t t/c/attachment.t t/c/comment.t t/c/journal.t t/c/jsrpc.t t/c/page.t t/c/page_edit.t t/c/user.t -version: 0.999006 +version: 0.999007 diff --git a/lib/MojoMojo.pm b/lib/MojoMojo.pm index 04c5d641..91a3925c 100644 --- a/lib/MojoMojo.pm +++ b/lib/MojoMojo.pm @@ -6,7 +6,7 @@ use Path::Class 'file'; use Catalyst qw/ Authentication Cache::FileCache Email - FillInForm FormValidator + FillInForm FormValidator Session Session::Store::File Singleton Session::State::Cookie Static::Simple SubRequest @@ -21,7 +21,7 @@ use Module::Pluggable::Ordered except => qr/^MojoMojo::Plugin::/, require => 1; -our $VERSION='0.999007'; +our $VERSION='0.999008'; MojoMojo->config->{authentication}{dbic} = { user_class => 'DBIC::Person', diff --git a/lib/MojoMojo/Controller/Admin.pm b/lib/MojoMojo/Controller/Admin.pm index 6bb5d824..f3b932e1 100644 --- a/lib/MojoMojo/Controller/Admin.pm +++ b/lib/MojoMojo/Controller/Admin.pm @@ -99,8 +99,6 @@ User listing with pager, for enabling/disabling users. sub user : Local { my ( $self, $c, $user ) = @_; - $c->forward('update_user') if $user; - $c->stash->{template}='settings/user.tt'; my $iterator =$c->model("DBIC::Person")->search( {}, { page =>$c->req->param('page') || 1, @@ -117,13 +115,14 @@ Update user based on user listing. =cut -sub update_user : Private { - my ( $self, $c, $user, $action ) = @_; +sub update_user : Local { + my ( $self, $c, $user ) = @_; $user=$c->model("DBIC::Person")->find($user) || return; - if ($action eq 'active') { + # if ($action eq 'active') { $user->active(! $user->active); - } + # } $user->update; + $c->stash->{user}=$user; } =back diff --git a/lib/MojoMojo/Controller/Gallery.pm b/lib/MojoMojo/Controller/Gallery.pm index ca1cf2c0..8196e686 100644 --- a/lib/MojoMojo/Controller/Gallery.pm +++ b/lib/MojoMojo/Controller/Gallery.pm @@ -59,7 +59,7 @@ sub by_tag : Local { unless length($c->stash->{page}->path) == 1; # root $c->stash->{pictures} =$c->model("DBIC::Photo")->search( $conditions, { - join => [qw/attachment/], + join => [qw/attachment tags/], page => $page || 1, rows => 12, order_by => 'taken DESC' diff --git a/lib/MojoMojo/View/TT.pm b/lib/MojoMojo/View/TT.pm index 32b4b60b..26e44522 100644 --- a/lib/MojoMojo/View/TT.pm +++ b/lib/MojoMojo/View/TT.pm @@ -9,6 +9,7 @@ use Template::Constants qw( :debug ); __PACKAGE__->config->{PRE_CHOMP} = 2; __PACKAGE__->config->{POST_CHOMP} = 2; __PACKAGE__->config->{CONTEXT} = undef; +__PACKAGE__->config(TEMPLATE_EXTENSION => '.tt'); 1; diff --git a/root/base/admin/update_user.tt b/root/base/admin/update_user.tt new file mode 100644 index 00000000..7d42b00a --- /dev/null +++ b/root/base/admin/update_user.tt @@ -0,0 +1 @@ +[% user.active || '0' %] \ No newline at end of file diff --git a/root/base/settings/user.tt b/root/base/admin/user.tt similarity index 71% rename from root/base/settings/user.tt rename to root/base/admin/user.tt index 9c8c68c5..5c8bfa23 100644 --- a/root/base/settings/user.tt +++ b/root/base/admin/user.tt @@ -11,9 +11,11 @@ Activelogin nameemail [%WHILE (user=users.next) %] -[%activeurl=base _ "/.admin/user/" _ user.id _ "/active"%] +[%activeurl=base _ "/.admin/update_user/" _ user.id _ '/active' %] [%active=user.active || 0%] -[%c.prototype.link_to_remote(active ,{url=>activeurl,update=>"active$user"})%] + + + [%active%] [%user.login%]   [%user.name%] diff --git a/root/base/page/bottomnav.tt b/root/base/page/bottomnav.tt index 7b8119a5..166b429a 100644 --- a/root/base/page/bottomnav.tt +++ b/root/base/page/bottomnav.tt @@ -2,12 +2,7 @@ [% IF user %]
add tag