Skip to content

Commit

Permalink
* Minor pod additions. removing unneeded wrappers
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://svn.bestpractical.com/svn/jifty.org/jifty/trunk@3945 e84bef0a-9b06-0410-84ba-c4c9edb13aeb
  • Loading branch information
obra committed Aug 23, 2007
1 parent 522b5ce commit 4e35149
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 2 deletions.
24 changes: 24 additions & 0 deletions lib/Jifty/Plugin/Userpic/Dispatcher.pm
Original file line number Diff line number Diff line change
@@ -1,7 +1,31 @@
use warnings;
use strict;

package Jifty::Plugin::Userpic::Dispatcher;


=head1 NAME
Jifty::Plugin::Userpic::Dispatcher
=head1 DESCRIPTION
The dispatcher for the Jifty Userpic plugin
=cut

use Jifty::Dispatcher -base;


=head1 RULES
=head2 on /=/plugin/userpic/*/#/*
When we're asked for a userpic for /recordclass/id/fieldname, set it up and call /userpic/image.
=cut


on '/=/plugin/userpic/*/#/*' => run {
my $class = $1;
my $id = $2;
Expand Down
19 changes: 19 additions & 0 deletions lib/Jifty/Plugin/Userpic/View.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,25 @@ package Jifty::Plugin::Userpic::View;

use Jifty::View::Declare -base;


=head1 NAME
Jifty::Plugin::Userpic::View
=head1 DESCRIPTION
A view package for the Userpic plugin.
=head1 TEMPLATES
=head2 userpic/image
Outputs the image stored in 'field' of 'item'. (Both of those are set by the dispatcher)
=cut

template 'userpic/image' => sub {
my ($item,$field) = get(qw(item field));
Jifty->handler->apache->content_type("image/jpeg");
Expand Down
2 changes: 0 additions & 2 deletions lib/Jifty/Plugin/Userpic/Widget.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ Jifty::Plugin::Userpic::Widget - google map widget for geolocation display and e
=cut

sub accessors { shift->SUPER::accessors() };

=head2 render_widget
Renders form fields as googlemap widget.
Expand Down

0 comments on commit 4e35149

Please sign in to comment.