# HG changeset patch # User cin # Date 1392733040 -14400 # Node ID 2c14f66efa086c36373d125657b50e3581ede92f # Parent 69a1f1508696c7b7afa2b81de6dca01744782885 minor changes diff -r 69a1f1508696 -r 2c14f66efa08 Lib/IMPL/Web/Application/ResourceBase.pm --- a/Lib/IMPL/Web/Application/ResourceBase.pm Fri Feb 14 16:41:12 2014 +0400 +++ b/Lib/IMPL/Web/Application/ResourceBase.pm Tue Feb 18 18:17:20 2014 +0400 @@ -36,9 +36,9 @@ unless $args{request}; $this->request( $args{request} ); - $this->parent( $args{parent} ); - $this->model( $args{model} ); - $this->id( $args{id} ); + $this->parent( $args{parent} ) if $args{parent}; + $this->model( $args{model} ) if $args{model}; + $this->id( $args{id} ) if $args{id}; $this->application( $args{request}->application ); # если расположение явно не указано, то оно вычисляется автоматически, @@ -87,6 +87,10 @@ shift->request->security } +sub context { + shift->request->context +} + sub verbs { {} # возвращаем пстой список операций } diff -r 69a1f1508696 -r 2c14f66efa08 Lib/IMPL/Web/View/TTContext.pm --- a/Lib/IMPL/Web/View/TTContext.pm Fri Feb 14 16:41:12 2014 +0400 +++ b/Lib/IMPL/Web/View/TTContext.pm Tue Feb 18 18:17:20 2014 +0400 @@ -98,6 +98,8 @@ my $ext = $this->tt_ext || ""; + #warn "find: $name"; + my $file; foreach my $dir (@inc) { @@ -111,6 +113,8 @@ $file = $ext ? "$file.$ext" : $file; + #warn " file: $file"; + if (exists($this->modules->{$file})) { my $info = $this->modules->{$file}; return $cache->{$name} = $info @@ -298,7 +302,7 @@ initialized => 1 }; } - + return $this->invoke_environment( sub { my $ctx = shift;