Revision 187

Date:
2012/02/20 14:21:47
Author:
ahitrov
Revision Log:
source_field parameter in external link description
Files:

Legend:

 
Added
 
Removed
 
Modified
  • koi8/core/comps/contenido/components/pbase_links.msn

     
    35 35 </script>
    36 36 % if ( ref $links eq 'ARRAY' && scalar @$links ) {
    37 37 % my $deflink = $links->[0];
    38 % my $id = exists $deflink->{source_field} ? $deflink->{source_field} : 'id';
    38 39 % my $auto = '';
    39 40 % if ( exists $deflink->{auto} && ref $deflink->{auto} eq 'HASH' ) {
    40 41 % while ( my ($from, $to) = each %{ $deflink->{auto} } ) {
     
    46 47 <div style="border-bottom:2px solid gray; padding:1px 0 2px;">
    47 48 % my $i = 0;
    48 49 % foreach my $link ( @$links ) {
    50 % my $id = exists $link->{source_field} ? $link->{source_field} : 'id';
    49 51 % my $auto = '';
    50 52 % if ( exists $link->{auto} && ref $link->{auto} eq 'HASH' ) {
    51 53 % while ( my ($from, $to) = each %{ $link->{auto} } ) {
     
    53 55 % }
    54 56 % }
    55 57 <span id="tab_<% $i %>" class="tab<% $i ? 'i' : '' %>"><a onclick="SetActive('tab_<% $i %>')"
    56 href="document_filter_list.html?class=<% $link->{class} %>&filter=<% $link->{filter} %>&field=<% $link->{field} %><% $auto %>&id=<% $document->id %><% exists $link->{order_by} ? '&order_by='.$link->{order_by} : '' %>"
    58 href="document_filter_list.html?class=<% $link->{class} %>&filter=<% $link->{filter} %>&field=<% $link->{field} %><% $auto %>&id=<% $document->$id %><% exists $link->{order_by} ? '&order_by='.$link->{order_by} : '' %>"
    57 59 target="filtered"><% $link->{name} %></a></span>\
    58 60 % $i++;
    59 61 % }
    60 62 </div>
    61 <iframe id="filtered" name="filtered" src="document_filter_list.html?class=<% $deflink->{class} %>&filter=<% $deflink->{filter} %>&field=<% $deflink->{field} %><% $auto %>&id=<% $document->id %><% exists $deflink->{order_by} ? '&order_by='.$deflink->{order_by} : '' %>"
    63 <iframe id="filtered" name="filtered" src="document_filter_list.html?class=<% $deflink->{class} %>&filter=<% $deflink->{filter} %>&field=<% $deflink->{field} %><% $auto %>&id=<% $document->$id %><% exists $deflink->{order_by} ? '&order_by='.$deflink->{order_by} : '' %>"
    62 64 width="100%" height="470" frameborder="0"></iframe>
    63 65 </fieldset>
    64 66 % }