/[Arh]/lib/Arh/View.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

Diff of /lib/Arh/View.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 27 by dpavlin, Fri Nov 30 23:23:14 2007 UTC revision 28 by dpavlin, Mon Dec 10 14:56:12 2007 UTC
# Line 7  use Jifty::View::Declare -base; Line 7  use Jifty::View::Declare -base;
7    
8  use Data::Dump qw/dump/;  use Data::Dump qw/dump/;
9    
10  template '/pictures' => page {  template 'pictures' => page {
11          my $fc = Arh::Model::PictureCollection->new;          my $fc = Arh::Model::PictureCollection->new;
12          $fc->unlimit;          $fc->unlimit;
13          my $present;          my $present;
# Line 25  template '/pictures' => page { Line 25  template '/pictures' => page {
25                                  row {                                  row {
26                                          cell {                                          cell {
27                                                  attr { class => 'picture' };                                                  attr { class => 'picture' };
28                                                  img { attr { src => "static/pics/" . $f->filename } }                                                  img { attr { src => "/static/pics/" . $f->filename } }
29                                                  div { tt{ $f->filename } }                                                  div { tt{ $f->filename } }
30                                          }                                          }
31                                          cell {                                          cell {
# Line 36  template '/pictures' => page { Line 36  template '/pictures' => page {
36                                                          div {                                                          div {
37                                                                  $delete->button(                                                                  $delete->button(
38                                                                          submit => $delete,                                                                          submit => $delete,
39                                                                          label => _('Delete'),                                                                          label => _('Delete picture'),
40                                                                          arguments => {                                                                          arguments => {
41                                                                                  id => $f->id,                                                                                  id => $f->id,
42                                                                          }                                                                          }
# Line 58  template '/pictures' => page { Line 58  template '/pictures' => page {
58                                          row {                                          row {
59                                                  cell {                                                  cell {
60                                                          attr { class => 'picture' };                                                          attr { class => 'picture' };
61                                                          img { attr { src => "static/pics/$f" } }                                                          img { attr { src => "/static/pics/$f" } }
62                                                          div { tt{ $f } }                                                          div { tt{ $f } }
63                                                  }                                                  }
64                                                  cell {                                                  cell {
# Line 83  template '/pictures' => page { Line 83  template '/pictures' => page {
83    
84  use Jifty::View::Declare::CRUD;  use Jifty::View::Declare::CRUD;
85  Jifty::View::Declare::CRUD->mount_view('materials');  Jifty::View::Declare::CRUD->mount_view('materials');
86    Jifty::View::Declare::CRUD->mount_view('UnitPictures');
 use Jifty::View::Declare::CRUD;  
87  Jifty::View::Declare::CRUD->mount_view('units');  Jifty::View::Declare::CRUD->mount_view('units');
88    Jifty::View::Declare::CRUD->mount_view('locations');
89    
90  template '/units' => page {  template '/units' => page {
91          h1 { _("Units available in system") };          h1 { _("Units available in system") };

Legend:
Removed from v.27  
changed lines
  Added in v.28

  ViewVC Help
Powered by ViewVC 1.1.26