Dotclear

Changeset 2354:d388f7fdcb4e for inc


Ignore:
Timestamp:
10/13/13 21:55:41 (12 years ago)
Author:
Denis Jean-Chirstian <contact@…>
Branch:
2.6
Message:

Move addtionnal info on plugins list from js to php, addresses #1771

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inc/admin/lib.moduleslist.php

    r2351 r2354  
    552552 
    553553          if (in_array('distrib', $cols)) { 
    554                echo '<th'.(in_array('desc', $cols) ? '' : ' class="maximal"').'></th>'; 
     554               echo  
     555               '<th'.(in_array('desc', $cols) ? '' : ' class="maximal"').'></th>'; 
    555556          } 
    556557 
     
    586587               echo  
    587588               '<tr class="line" id="'.html::escapeHTML($this->list_id).'_m_'.html::escapeHTML($id).'">'; 
     589                
     590               $tds = 0; 
    588591 
    589592               if (in_array('icon', $cols)) { 
     593                    $tds++; 
    590594                    echo  
    591595                    '<td class="module-icon nowrap">'.sprintf( 
     
    595599               } 
    596600 
    597                # Link to config file 
    598                $config = in_array('config', $cols) && !empty($module['root']) && file_exists(path::real($module['root'].'/_config.php')); 
    599  
     601               $tds++; 
    600602               echo  
    601                '<td class="module-name nowrap" scope="row">'.($config ?  
    602                     '<a href="'.$this->getURL('module='.$id.'&amp;conf=1').'" title"'.sprintf(__('Configure module "%s"'), html::escapeHTML($module['name'])).'">'.html::escapeHTML($module['name']).'</a>' :  
    603                     html::escapeHTML($module['name']) 
    604                ).'</td>'; 
     603               '<td class="module-name nowrap" scope="row">'.html::escapeHTML($module['name']).'</td>'; 
    605604 
    606605               # Display score only for debug purpose 
    607606               if (in_array('score', $cols) && $this->getSearch() !== null && defined('DC_DEBUG') && DC_DEBUG) { 
     607                    $tds++; 
    608608                    echo  
    609609                    '<td class="module-version nowrap count"><span class="debug">'.$module['score'].'</span></td>'; 
     
    611611 
    612612               if (in_array('version', $cols)) { 
     613                    $tds++; 
    613614                    echo  
    614615                    '<td class="module-version nowrap count">'.html::escapeHTML($module['version']).'</td>'; 
     
    616617 
    617618               if (in_array('current_version', $cols)) { 
     619                    $tds++; 
    618620                    echo  
    619621                    '<td class="module-current-version nowrap count">'.html::escapeHTML($module['current_version']).'</td>'; 
     
    621623 
    622624               if (in_array('desc', $cols)) { 
     625                    $tds++; 
    623626                    echo  
    624627                    '<td class="module-desc maximal">'.html::escapeHTML($module['desc']).'</td>'; 
     
    626629 
    627630               if (in_array('distrib', $cols)) { 
     631                    $tds++; 
    628632                    echo  
    629633                    '<td class="module-distrib">'.(self::isDistributedModule($id) ?  
     
    637641                    $buttons = $this->getActions($id, $module, $actions); 
    638642 
     643                    $tds++; 
    639644                    echo  
    640645                    '<td class="module-actions nowrap">'. 
     
    655660               echo  
    656661               '</tr>'; 
     662 
     663               # Other informations 
     664               if (in_array('expander', $cols)) { 
     665                    echo 
     666                    '<tr class="module-more"><td colspan="'.$tds.'" class="expand">'; 
     667 
     668                    if (!empty($module['author']) || !empty($module['details']) || !empty($module['support'])) { 
     669                         echo  
     670                         '<div><ul class="mod-more">'; 
     671 
     672                         if (!empty($module['author'])) { 
     673                              echo 
     674                              '<li class="module-author">'.__('Author:').' '.html::escapeHTML($module['author']).'</li>'; 
     675                         } 
     676 
     677                         $more = array(); 
     678                         if (!empty($module['details'])) { 
     679                              $more[] = '<a class="module-details" href="'.$module['details'].'">'.__('Details').'</a>'; 
     680                         } 
     681 
     682                         if (!empty($module['support'])) { 
     683                              $more[] = '<a class="module-support" href="'.$module['support'].'">'.__('Support').'</a>'; 
     684                         } 
     685                          
     686                         if (!empty($more)) { 
     687                              echo 
     688                              '<li>'.implode(' - ', $more).'</li>'; 
     689                         } 
     690 
     691                         echo 
     692                         '</ul></div>'; 
     693                    } 
     694 
     695                    $config = !empty($module['root']) && file_exists(path::real($module['root'].'/_config.php')); 
     696 
     697                    if ($config || !empty($module['section']) || !empty($module['section'])) { 
     698                         echo  
     699                         '<div><ul class="mod-more">'; 
     700 
     701                         if ($config) { 
     702                              echo 
     703                              '<li><a class="module-config" href="'.$this->getURL('module='.$id.'&amp;conf=1').'">'.__('Configure plugin').'</a></li>'; 
     704                         } 
     705 
     706                         if (!empty($module['section'])) { 
     707                              echo 
     708                              '<li class="module-section">'.__('Section:').' '.html::escapeHTML($module['section']).'</li>'; 
     709                         } 
     710 
     711                         if (!empty($module['section'])) { 
     712                              echo 
     713                              '<li class="module-tags">'.__('Tags:').' '.html::escapeHTML($module['tags']).'</li>'; 
     714                         } 
     715 
     716                         echo 
     717                         '</ul></div>'; 
     718                    } 
     719 
     720                    echo 
     721                    '</td></tr>'; 
     722               } 
    657723 
    658724               $count++; 
Note: See TracChangeset for help on using the changeset viewer.

Sites map