• section_browse.msn

    521 522  
    11 11 });
    12 12 }
    13 13 % if ( @inline_pickups ) {
    14 $().ready(function() {
    14 $(document).ready(function() {
    15 15 % foreach my $pickup ( @inline_pickups ) {
    16 16 % my $lookup_opts = $pickup->{lookup_opts};
    17 17 % my $search_opts = join( '&', map { $_.'='.$lookup_opts->{$_} } keys %$lookup_opts );
     
    130 130 % my $name=$document->name ? $document->name : 'Безымянный документ N'.$document->id;
    131 131 % if ($document_access == 2) {
    132 132 %
    133 <a<% $document->contenido_status_style ? ' style="' . $document->contenido_status_style . '"' : '' %> href="document.html?id=<% $document->id %>&class=<% $document->class %><% $params_unclassed ? '&'.$params_unclassed : '' %>"><% $name | h %>&nbsp;</a>\
    133 <a<% $document->contenido_status_style ? ' style="' . $document->contenido_status_style . '"' : '' %> href="document.html?id=<% $document->id %>&class=<% $document->class %><% $params_unclassed ? '&'.$params_unclassed : '' %>"><% $name | h %></a>\
    134 134 %
    135 135 % } else {
    136 136 %
     
    157 157 % my $style = $col->{inline_style} ? $col->{inline_style} : ($col->{type} =~ /^(integer|float)$/ ? 'text-align:right; ' : '' );
    158 158 % $style .= $col->{inline_width} ? ' width:'.$col->{inline_width}.'px; ' : ' width:65px; ';
    159 159 <td><input type="text" name="<% 'update_'.$document->id.'_'.$attr %>" value="<% $document->$attr |h %>" style="<% $style %>">
    160 % } elsif ($col->{type} eq 'checkbox') {
    161 % my $checked = $document->$attr ? ' checked' : '';
    162 <td align="center"><input type="checkbox" class="<% $attr %>-check" name="<% 'update_'.$document->id.'_'.$attr %>"<% $checked %>>
    160 163 % } elsif ($col->{type} eq 'text') {
    161 164 % my $style = $col->{inline_style} ? $col->{inline_style} : '';
    162 165 % $style .= $col->{inline_width} ? ' width:'.$col->{inline_width}.'px; ' : ' width:100px; ';
     
    167 170 % s/>/&gt;/sgi;
    168 171 % }
    169 172 <td><textarea name="<% 'update_'.$document->id.'_'.$attr %>" style="<% $style %>"><% $value %></textarea>
    170 % } elsif ($col->{type} eq 'checkbox') {
    171 % my $checked = $document->$attr ? ' checked' : '';
    172 <td align="center"><input type="checkbox" class="<% $attr %>-check" name="<% 'update_'.$document->id.'_'.$attr %>"<% $checked %>>
    173 173 % } elsif ($col->{type} eq 'select') {
    174 174 % my $options = {};
    175 175 % if ($toopi && (ref($toopi) eq 'HASH') && (exists($toopi->{$document->class}))) {
     
    224 224 % }
    225 225 </select>
    226 226 % } else {
    227 <td><% $document->$attr %>\
    227 <td><% $document->$attr %><input type="hidden" name="<% 'update_'.$document->id.'_'.$attr %>" value="<% $document->$attr |h %>">\
    228 228 % }
    229 229 % } else {
    230 <td><input type="hidden" name="<% 'update_'.$document->id.'_'.$attr %>" value="<% $document->$attr |h %>">
    230 <td><% $document->$attr %><input type="hidden" name="<% 'update_'.$document->id.'_'.$attr %>" value="<% $document->$attr |h %>">\
    231 231 % }
    232 232 %
    233 233 % } elsif ($col->{attr} eq 'class') {
     
    317 317 <input type="hidden" name="<% $key %>" value="<% $value |h %>">
    318 318 % }
    319 319 % }
    320 % if ( $section->default_document_class || $section->default_table_class ) {
    321 <div style="display:inline-block; width:45%; margin:10px 0; min-height:80px; vertical-align:top;">
    322 <& /contenido/components/inputs/parent.msn, name => 'tree', check => $section->id, style => 'width:100%;' &>
    323 <div style="text-align:left; margin-top:5px;">
    324 <input type="submit" name="move" value="Перенести" class="input_btn"><input
    325 type="submit" name="link" value="Привязать" class="input_btn"><input
    326 type="submit" name="unlink" value="Отвязать от текущей" class="input_btn" onclick="return confirm('Объекты, не привязанные к другим секциям могут быть потеряны');">
    327 </div>
    328 </div>
    329 % }
    320 330 % if ( $inline_status || $delete_status ) {
    321 <div style="float:right; text-align:right; padding:5px 0 5px 10px; width:280px;">
    331 <div style="display:inline-block; width:45%; text-align:right; margin:5px; padding-top:29px; vertical-align:top;">
    322 332 % if ( $inline_status ) {
    323 <input type="submit" name="update" value="Сохранить изменения" class="input_btn">
    333 <input type="submit" name="update" value="Сохранить изменения" class="input_btn">\
    324 334 % }
    325 335 % if ( $delete_status ) {
    326 336 <input type="submit" name="delete" value="Удалить выбранные" class="input_btn" onclick="return confirm('Все отмеченные позиции будут удалены');">
    327 337 % }
    328 338 </div>
    329 339 % }
    330 % if ( $section->default_document_class || $section->default_table_class ) {
    331 <div style="float:left; width:450px; padding:5px 0;">
    332 <& /contenido/components/inputs/parent.msn, name => 'tree', check => $section->id &>
    333 <input type="submit" name="move" value="Перенести" class="input_btn"><input type="submit" name="link" value="Привязать" class="input_btn">
    334 </div>
    335 % }
    336 340 <br clear="all">
    337 341 </form>
    338 342 <%args>