/[Frey]/trunk/lib/Frey/View/Exhibit.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /trunk/lib/Frey/View/Exhibit.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 946 - (show annotations)
Tue Jan 6 15:26:41 2009 UTC (15 years, 3 months ago) by dpavlin
File size: 995 byte(s)
Frey::View::Exhibit now has configurable Frey::Pipe source
split JSON encoder for exhibit into Frey::View::Exhibit::JSON
1 package Frey::View::Exhibit;
2 use Moose;
3
4 extends 'Frey';
5 with 'Frey::Web';
6
7 use Data::Dump qw/dump/;
8
9 =head1 DESCRIPTION
10
11 present C<sponge> as Exhibit from L<http://simile.mit.edu/exhibit/>
12
13 =head1 SEE ALSO
14
15 L<Frey::View::Exhibit::JSON>
16
17 =cut
18
19 has pipe => (
20 is => 'rw',
21 isa => 'Str',
22 required => 1,
23 default => 'Frey::DelIcioUs/as_sponge|Frey::View::Exhibit::JSON/as_markup',
24 );
25
26 sub depends {
27 my ($self) = @_;
28 my $pipe = $self->url_escape( $self->pipe );
29 $self->add_head(qq|
30 <link href="/Frey::Pipe/as_markup?pipe=$pipe" type="application/json" rel="exhibit/data" />
31 |);
32 $self->add_head(qq|
33 <script src="http://static.simile.mit.edu/exhibit/api-2.0/exhibit-api.js"
34 type="text/javascript"></script>
35 |);
36 warn "# depends";
37 }
38
39 sub as_markup {
40 my ($self) = @_;
41
42 return qq|
43 <table width="100%">
44 <tr valign="top">
45 <td ex:role="viewPanel">
46 <div ex:role="view"></div>
47 </td>
48 <td width="25%">
49 browsing controls here...
50 </td>
51 </tr>
52 </table>
53 |;
54 }
55
56 1;

  ViewVC Help
Powered by ViewVC 1.1.26