Dotclear

Changeset 2487:53510da55dc5


Ignore:
Timestamp:
10/24/13 11:14:03 (12 years ago)
Author:
Denis Jean-Chirstian <contact@…>
Branch:
2.6
Message:

Add actions batch (and checkboxes) to modules list.

Files:
8 edited

Legend:

Unmodified
Added
Removed
  • admin/blog_theme.php

    r2377 r2487  
    125125               ->setModules($modules) 
    126126               ->displayModules( 
    127                     /*cols */      array('sshot', 'name', 'desc', 'author', 'version', 'current_version', 'parent'), 
     127                    /*cols */      array('checkbox', 'name', 'sshot', 'desc', 'author', 'version', 'current_version', 'parent'), 
    128128                    /* actions */  array('update', 'delete') 
    129129               ); 
  • admin/js/_blog_theme.js

    r2290 r2487  
    1616     }); 
    1717 
    18      // confirm module deletion 
    19      $('div.module-actions form input[type=submit][name=delete]').click(function() { 
    20           var module_id = $('input[name=module]',$(this).parent()).val(); 
    21           return window.confirm(dotclear.msg.confirm_delete_theme.replace('%s',module_id)); 
    22      }); 
    23  
    2418     // dirty short search blocker 
    2519     $('div.modules-search form input[type=submit]').click(function(){ 
     
    2721          if (mlen.length > 2){return true;}else{return false;} 
    2822     }); 
     23 
     24     // checkboxes selection 
     25     $('.checkboxes-helpers').each(function() { 
     26          dotclear.checkboxesHelpers(this); 
     27     }); 
     28 
     29     // actions tests 
     30     $('.modules-form-actions').each(function(){ 
     31          var rxActionType = /^[^\[]+/; 
     32          var rxActionValue = /([^\[]+)\]$/; 
     33          var checkboxes = $(this).find('input[type=checkbox]'); 
     34 
     35          // check if submit is a global action or one line action 
     36          $("input[type=submit]",this).click(function() { 
     37               var keyword = $(this).attr('name'); 
     38               var maction = keyword.match(rxActionType); 
     39               var action = maction[0]; 
     40               var mvalues = keyword.match(rxActionValue); 
     41 
     42               // action on multiple modules 
     43               if (!mvalues) { 
     44                    var checked = false; 
     45 
     46                    // check if there is checkboxes in form 
     47                    if(checkboxes.length > 0) { 
     48                         // check if there is at least one checkbox checked 
     49                         $(checkboxes).each(function() { 
     50                              if (this.checked) { 
     51                                   checked = true; 
     52                              } 
     53                         }); 
     54                         if (!checked) { 
     55                              //alert(dotclear.msg.no_selection); 
     56                              return false; 
     57                         } 
     58                    } 
     59 
     60                    // confirm delete 
     61                    if (action == 'delete') { 
     62                         return window.confirm(dotclear.msg.confirm_delete_themes); 
     63                    } 
     64 
     65               // action on one module 
     66               }else { 
     67                    var module = mvalues[1]; 
     68 
     69                    // confirm delete 
     70                    if (action == 'delete') { 
     71                         return window.confirm(dotclear.msg.confirm_delete_theme.replace('%s',module)); 
     72                    } 
     73               } 
     74 
     75               return true; 
     76          }); 
     77     }); 
    2978}); 
  • admin/js/_plugins.js

    r2354 r2487  
    1111     }); 
    1212 
    13      // confirm module deletion 
    14      $('td.module-actions form input[type=submit][name=delete]').click(function() { 
    15           var module_id = $('input[name=module]',$(this).parent()).val(); 
    16           return window.confirm(dotclear.msg.confirm_delete_plugin.replace('%s',module_id)); 
     13     // checkboxes selection 
     14     $('.checkboxes-helpers').each(function() { 
     15          dotclear.checkboxesHelpers(this); 
     16     }); 
     17 
     18     // actions tests 
     19     $('.modules-form-actions').each(function(){ 
     20          var rxActionType = /^[^\[]+/; 
     21          var rxActionValue = /([^\[]+)\]$/; 
     22          var checkboxes = $(this).find('input[type=checkbox]'); 
     23 
     24          // check if submit is a global action or one line action 
     25          $("input[type=submit]",this).click(function() { 
     26               var keyword = $(this).attr('name'); 
     27               var maction = keyword.match(rxActionType); 
     28               var action = maction[0]; 
     29               var mvalues = keyword.match(rxActionValue); 
     30 
     31               // action on multiple modules 
     32               if (!mvalues) { 
     33                    var checked = false; 
     34 
     35                    // check if there is checkboxes in form 
     36                    if(checkboxes.length > 0) { 
     37                         // check if there is at least one checkbox checked 
     38                         $(checkboxes).each(function() { 
     39                              if (this.checked) { 
     40                                   checked = true; 
     41                              } 
     42                         }); 
     43                         if (!checked) { 
     44                              //alert(dotclear.msg.no_selection); 
     45                              return false; 
     46                         } 
     47                    } 
     48 
     49                    // confirm delete 
     50                    if (action == 'delete') { 
     51                         return window.confirm(dotclear.msg.confirm_delete_plugins); 
     52                    } 
     53 
     54               // action on one module 
     55               }else { 
     56                    var module = mvalues[1]; 
     57 
     58                    // confirm delete 
     59                    if (action == 'delete') { 
     60                         return window.confirm(dotclear.msg.confirm_delete_plugin.replace('%s',module)); 
     61                    } 
     62               } 
     63 
     64               return true; 
     65          }); 
    1766     }); 
    1867}); 
  • admin/plugins.php

    r2377 r2487  
    131131               ->setModules($modules) 
    132132               ->displayModules( 
    133                     /*cols */      array('icon', 'name', 'version', 'current_version', 'desc'), 
     133                    /*cols */      array('checkbox', 'icon', 'name', 'version', 'current_version', 'desc'), 
    134134                    /* actions */  array('update') 
    135135               ); 
  • inc/admin/lib.dc.page.php

    r2328 r2487  
    665665          self::jsVar('dotclear.msg.confirm_delete_plugin', 
    666666               __('Are you sure you want to delete "%s" plugin?')). 
     667          self::jsVar('dotclear.msg.confirm_delete_plugins', 
     668               __('Are you sure you want to delete selected plugins?')). 
    667669          self::jsVar('dotclear.msg.use_this_theme', 
    668670               __('Use this theme')). 
     
    671673          self::jsVar('dotclear.msg.confirm_delete_theme', 
    672674               __('Are you sure you want to delete "%s" theme?')). 
     675          self::jsVar('dotclear.msg.confirm_delete_themes', 
     676               __('Are you sure you want to delete selected themes?')). 
    673677          self::jsVar('dotclear.msg.confirm_delete_backup', 
    674678               __('Are you sure you want to delete this backup?')). 
  • inc/admin/lib.moduleslist.php

    r2469 r2487  
    522522     { 
    523523          echo 
     524          '<form action="'.$this->getURL().'" method="post" class="modules-form-actions">'. 
    524525          '<div class="table-outer">'. 
    525526          '<table id="'.html::escapeHTML($this->list_id).'" class="modules'.(in_array('expander', $cols) ? ' expandable' : '').'">'. 
     
    527528 
    528529          if (in_array('name', $cols)) { 
     530               $colspan = 1; 
     531               if (in_array('checkbox', $cols)) { 
     532                    $colspan++; 
     533               } 
     534               if (in_array('icon', $cols)) { 
     535                    $colspan++; 
     536               } 
    529537               echo 
    530                '<th class="first nowrap"'.(in_array('icon', $cols) ? ' colspan="2"' : '').'>'.__('Name').'</th>'; 
     538               '<th class="first nowrap"'.($colspan > 1 ? ' colspan="'.$colspan.'"' : '').'>'.__('Name').'</th>'; 
    531539          } 
    532540 
     
    590598               $tds = 0; 
    591599 
     600               if (in_array('checkbox', $cols)) { 
     601                    $tds++; 
     602                    echo 
     603                    '<td class="module-icon nowrap">'. 
     604                    form::checkbox(array('modules['.$count.']', html::escapeHTML($this->list_id).'_modules_'.html::escapeHTML($id)), html::escapeHTML($id)). 
     605                    '</td>'; 
     606               } 
     607 
    592608               if (in_array('icon', $cols)) { 
    593609                    $tds++; 
     
    601617               $tds++; 
    602618               echo 
    603                '<td class="module-name nowrap" scope="row">'.html::escapeHTML($module['name']).'</td>'; 
     619               '<td class="module-name nowrap" scope="row">'; 
     620               if (in_array('checkbox', $cols)) { 
     621                    if (in_array('expander', $cols)) { 
     622                         echo 
     623                         html::escapeHTML($module['name']); 
     624                    } 
     625                    else { 
     626                         echo 
     627                         '<label for="'.html::escapeHTML($this->list_id).'_modules_'.html::escapeHTML($id).'">'. 
     628                         html::escapeHTML($module['name']). 
     629                         '</label>'; 
     630                    } 
     631               } 
     632               else { 
     633                    echo 
     634                    html::escapeHTML($module['name']). 
     635                    form::hidden(array('modules['.$count.']'), html::escapeHTML($id)); 
     636               } 
     637               echo 
     638               $this->core->formNonce(). 
     639               '</td>'; 
    604640 
    605641               # Display score only for debug purpose 
     
    645681                    '<td class="module-actions nowrap">'. 
    646682 
    647                     '<form action="'.$this->getURL().'" method="post">'. 
    648                     '<div>'. 
    649                     $this->core->formNonce(). 
    650                     form::hidden(array('module'), html::escapeHTML($id)). 
    651  
    652                     implode(' ', $buttons). 
    653  
    654                     '</div>'. 
    655                     '</form>'. 
     683                    '<div>'.implode(' ', $buttons).'</div>'. 
    656684 
    657685                    '</td>'; 
     
    732760          } 
    733761 
    734           if ($count > 1 && !empty($actions) && $this->core->auth->isSuperAdmin()) { 
    735                $buttons = $this->getGlobalActions($actions); 
    736  
    737                echo 
    738                '<form action="'.$this->getURL().'" method="post" class="global-actions-buttons">'. 
    739                '<div>'. 
    740                $this->core->formNonce(). 
    741                form::hidden(array('modules'), '1'). 
    742  
    743                implode(' ', $buttons). 
    744  
    745                '</div>'. 
    746                '</form>'; 
    747           } 
     762          elseif ((in_array('checkbox', $cols) || $count > 1) && !empty($actions) && $this->core->auth->isSuperAdmin()) { 
     763               $buttons = $this->getGlobalActions($actions, in_array('checkbox', $cols)); 
     764 
     765               if (!empty($buttons)) { 
     766                    if (in_array('checkbox', $cols)) { 
     767                         echo  
     768                         '<p class="checkboxes-helpers"></p>'; 
     769                    } 
     770                    echo 
     771                    '<div>'.implode(' ', $buttons).'</div>'; 
     772               } 
     773          } 
     774          echo  
     775          '</form>'; 
    748776 
    749777          return $this; 
     
    769797                    case 'activate': if ($module['root_writable']) { 
    770798                         $submits[] = 
    771                          '<input type="submit" name="activate" value="'.__('Activate').'" />'; 
     799                         '<input type="submit" name="activate['.html::escapeHTML($id).']" value="'.__('Activate').'" />'; 
    772800                    } break; 
    773801 
     
    775803                    case 'deactivate': if ($module['root_writable']) { 
    776804                         $submits[] = 
    777                          '<input type="submit" name="deactivate" value="'.__('Deactivate').'" class="reset" />'; 
     805                         '<input type="submit" name="deactivate['.html::escapeHTML($id).']" value="'.__('Deactivate').'" class="reset" />'; 
    778806                    } break; 
    779807 
     
    782810                         $dev = !preg_match('!^'.$this->path_pattern.'!', $module['root']) && defined('DC_DEV') && DC_DEV ? ' debug' : ''; 
    783811                         $submits[] = 
    784                          '<input type="submit" class="delete '.$dev.'" name="delete" value="'.__('Delete').'" />'; 
     812                         '<input type="submit" class="delete '.$dev.'" name="delete['.html::escapeHTML($id).']" value="'.__('Delete').'" />'; 
    785813                    } break; 
    786814 
     
    788816                    case 'install': if ($this->path_writable) { 
    789817                         $submits[] = 
    790                          '<input type="submit" name="install" value="'.__('Install').'" />'; 
     818                         '<input type="submit" name="install['.html::escapeHTML($id).']" value="'.__('Install').'" />'; 
    791819                    } break; 
    792820 
     
    794822                    case 'update': if ($this->path_writable) { 
    795823                         $submits[] = 
    796                          '<input type="submit" name="update" value="'.__('Update').'" />'; 
     824                         '<input type="submit" name="update['.html::escapeHTML($id).']" value="'.__('Update').'" />'; 
    797825                    } break; 
    798826 
     
    816844      * Get global action buttons to add to modules list. 
    817845      * 
    818       * @param array     $actions  Actions keys 
     846      * @param array     $actions        Actions keys 
     847      * @param boolean   $with_selection Limit action to selected modules 
    819848      * @return     Array of actions buttons 
    820849      */ 
    821      protected function getGlobalActions($actions) 
     850     protected function getGlobalActions($actions, $with_selection=false) 
    822851     { 
    823852          $submits = array(); 
     
    830859                    case 'activate': if ($this->path_writable) { 
    831860                         $submits[] = 
    832                          '<input type="submit" name="activate" value="'.__('Activate all plugins from this list').'" />'; 
     861                         '<input type="submit" name="activate" value="'.($with_selection ? 
     862                              __('Activate selected plugins') : 
     863                              __('Activate all plugins from this list') 
     864                         ).'" />'; 
    833865                    } break; 
    834866 
     
    836868                    case 'deactivate': if ($this->path_writable) { 
    837869                         $submits[] = 
    838                          '<input type="submit" name="deactivate" value="'.__('Deactivate all plugins from this list').'" class="reset" />'; 
     870                         '<input type="submit" name="deactivate" value="'.($with_selection ? 
     871                              __('Deactivate selected plugins') : 
     872                              __('Deactivate all plugins from this list') 
     873                         ).'" />'; 
    839874                    } break; 
    840875 
     
    842877                    case 'update': if ($this->path_writable) { 
    843878                         $submits[] = 
    844                          '<input type="submit" name="update" value="'.__('Update all plugins from this list').'" />'; 
     879                         '<input type="submit" name="update" value="'.($with_selection ? 
     880                              __('Update selected plugins') : 
     881                              __('Update all plugins from this list') 
     882                         ).'" />'; 
    845883                    } break; 
    846884 
     
    849887 
    850888                         # --BEHAVIOR-- adminModulesListGetGlobalActions 
    851                          $tmp = $this->core->callBehavior('adminModulesListGetGlobalActions', $this); 
     889                         $tmp = $this->core->callBehavior('adminModulesListGetGlobalActions', $this, $with_selection); 
    852890 
    853891                         if (!empty($tmp)) { 
     
    875913          } 
    876914 
    877           # Actions per module 
    878           if (!empty($_POST['module'])) { 
    879  
    880                $id = $_POST['module']; 
    881  
    882                if (!empty($_POST['activate'])) { 
    883  
    884                     $enabled = $this->modules->getDisabledModules(); 
    885                     if (!isset($enabled[$id])) { 
    886                          throw new Exception(__('No such plugin.')); 
    887                     } 
    888  
    889                     # --BEHAVIOR-- moduleBeforeActivate 
    890                     $this->core->callBehavior('pluginBeforeActivate', $id); 
    891  
    892                     $this->modules->activateModule($id); 
    893  
    894                     # --BEHAVIOR-- moduleAfterActivate 
    895                     $this->core->callBehavior('pluginAfterActivate', $id); 
    896  
    897                     dcPage::addSuccessNotice(__('Plugin has been successfully activated.')); 
    898                     http::redirect($this->getURL()); 
    899                } 
    900  
    901                elseif (!empty($_POST['deactivate'])) { 
    902  
    903                     if (!$this->modules->moduleExists($id)) { 
    904                          throw new Exception(__('No such plugin.')); 
    905                     } 
    906  
    907                     $module = $this->modules->getModules($id); 
    908                     $module['id'] = $id; 
    909  
    910                     if (!$module['root_writable']) { 
    911                          throw new Exception(__('You don\'t have permissions to deactivate this plugin.')); 
    912                     } 
    913  
    914                     # --BEHAVIOR-- moduleBeforeDeactivate 
    915                     $this->core->callBehavior('pluginBeforeDeactivate', $module); 
    916  
    917                     $this->modules->deactivateModule($id); 
    918  
    919                     # --BEHAVIOR-- moduleAfterDeactivate 
    920                     $this->core->callBehavior('pluginAfterDeactivate', $module); 
    921  
    922                     dcPage::addSuccessNotice(__('Plugin has been successfully deactivated.')); 
    923                     http::redirect($this->getURL()); 
    924                } 
    925  
    926                elseif (!empty($_POST['delete'])) { 
    927  
    928                     $disabled = $this->modules->getDisabledModules(); 
    929                     if (!isset($disabled[$id])) { 
     915          $modules = !empty($_POST['modules']) && is_array($_POST['modules']) ? array_values($_POST['modules']) : array(); 
     916 
     917          if (!empty($_POST['delete'])) { 
     918 
     919               if (is_array($_POST['delete'])) { 
     920                    $modules = array_keys($_POST['delete']); 
     921               } 
     922 
     923               $list = $this->modules->getDisabledModules(); 
     924 
     925               $failed = false; 
     926               $count = 0; 
     927               foreach($modules as $id) 
     928               { 
     929                    if (!isset($list[$id])) { 
    930930 
    931931                         if (!$this->modules->moduleExists($id)) { 
     
    937937 
    938938                         if (!$this->isDeletablePath($module['root'])) { 
    939                               throw new Exception(__("You don't have permissions to delete this plugin.")); 
     939                              $failed = true; 
     940                              continue; 
    940941                         } 
    941942 
     
    952953                    } 
    953954 
    954                     dcPage::addSuccessNotice(__('Plugin has been successfully deleted.')); 
    955                     http::redirect($this->getURL()); 
    956                } 
    957                elseif (!empty($_POST['install'])) { 
    958  
    959                     $updated = $this->store->get(); 
    960                     if (!isset($updated[$id])) { 
    961                          throw new Exception(__('No such plugin.')); 
    962                     } 
    963  
    964                     $module = $updated[$id]; 
    965                     $module['id'] = $id; 
     955                    $count++; 
     956               } 
     957 
     958               if (!$count && $failed) { 
     959                    throw new Exception(__("You don't have permissions to delete this plugin.")); 
     960               } 
     961               elseif ($failed) { 
     962                    dcPage::addWarningNotice(__('Some plugins have not been delete.')); 
     963               } 
     964               else { 
     965                    dcPage::addSuccessNotice( 
     966                         __('Plugin has been successfully deleted.', 'Plugins have been successuflly deleted.', $count) 
     967                    ); 
     968               } 
     969               http::redirect($this->getURL()); 
     970          } 
     971 
     972          elseif (!empty($_POST['install'])) { 
     973 
     974               if (is_array($_POST['install'])) { 
     975                    $modules = array_keys($_POST['install']); 
     976               } 
     977 
     978               $list = $this->store->get(); 
     979 
     980               if (empty($list)) { 
     981                    throw new Exception(__('No such plugin.')); 
     982               } 
     983 
     984               $count = 0; 
     985               foreach($list as $id => $module) { 
     986 
     987                    if (!in_array($id, $modules)) { 
     988                         continue; 
     989                    } 
    966990 
    967991                    $dest = $this->getPath().'/'.basename($module['file']); 
     
    970994                    $this->core->callBehavior('pluginBeforeAdd', $module); 
    971995 
    972                     $ret_code = $this->store->process($module['file'], $dest); 
     996                    $this->store->process($module['file'], $dest); 
    973997 
    974998                    # --BEHAVIOR-- moduleAfterAdd 
    975999                    $this->core->callBehavior('pluginAfterAdd', $module); 
    9761000 
    977                     dcPage::addSuccessNotice($ret_code == 2 ? 
    978                          __('Plugin has been successfully updated.') : 
    979                          __('Plugin has been successfully installed.') 
     1001                    $count++; 
     1002               } 
     1003 
     1004               dcPage::addSuccessNotice( 
     1005                    __('Plugin has been successfully installed.', 'Plugins have been successuflly installed.', $count) 
     1006               ); 
     1007               http::redirect($this->getURL()); 
     1008          } 
     1009 
     1010          elseif (!empty($_POST['activate'])) { 
     1011 
     1012               if (is_array($_POST['activate'])) { 
     1013                    $modules = array_keys($_POST['activate']); 
     1014               } 
     1015 
     1016               $list = $this->modules->getDisabledModules(); 
     1017               if (empty($list)) { 
     1018                    throw new Exception(__('No such plugin.')); 
     1019               } 
     1020 
     1021               $count = 0; 
     1022               foreach($list as $id => $module) { 
     1023 
     1024                    if (!in_array($id, $modules)) { 
     1025                         continue; 
     1026                    } 
     1027 
     1028                    # --BEHAVIOR-- moduleBeforeActivate 
     1029                    $this->core->callBehavior('pluginBeforeActivate', $id); 
     1030 
     1031                    $this->modules->activateModule($id); 
     1032 
     1033                    # --BEHAVIOR-- moduleAfterActivate 
     1034                    $this->core->callBehavior('pluginAfterActivate', $id); 
     1035 
     1036                    $count++; 
     1037               } 
     1038 
     1039               dcPage::addSuccessNotice( 
     1040                    __('Plugin has been successfully activated.', 'Plugins have been successuflly activated.', $count) 
     1041               ); 
     1042               http::redirect($this->getURL()); 
     1043          } 
     1044 
     1045          elseif (!empty($_POST['deactivate'])) { 
     1046 
     1047               if (is_array($_POST['deactivate'])) { 
     1048                    $modules = array_keys($_POST['deactivate']); 
     1049               } 
     1050 
     1051               $list = $this->modules->getModules(); 
     1052               if (empty($list)) { 
     1053                    throw new Exception(__('No such plugin.')); 
     1054               } 
     1055 
     1056               $failed = false; 
     1057               $count = 0; 
     1058               foreach($list as $id => $module) { 
     1059 
     1060                    if (!in_array($id, $modules)) { 
     1061                         continue; 
     1062                    } 
     1063 
     1064                    if (!$module['root_writable']) { 
     1065                         $failed = true; 
     1066                         continue; 
     1067                    } 
     1068 
     1069                    $module[$id] = $id; 
     1070 
     1071                    # --BEHAVIOR-- moduleBeforeDeactivate 
     1072                    $this->core->callBehavior('pluginBeforeDeactivate', $module); 
     1073 
     1074                    $this->modules->deactivateModule($id); 
     1075 
     1076                    # --BEHAVIOR-- moduleAfterDeactivate 
     1077                    $this->core->callBehavior('pluginAfterDeactivate', $module); 
     1078 
     1079                    $count++; 
     1080               } 
     1081 
     1082               if ($failed) { 
     1083                    dcPage::addWarningNotice(__('Some plugins have not been deactivated.')); 
     1084               } 
     1085               else { 
     1086                    dcPage::addSuccessNotice( 
     1087                         __('Plugin has been successfully deactivated.', 'Plugins have been successuflly deactivated.', $count) 
    9801088                    ); 
    981                     http::redirect($this->getURL()); 
    982                } 
    983  
    984                elseif (!empty($_POST['update'])) { 
    985  
    986                     $updated = $this->store->get(true); 
    987                     if (!isset($updated[$id])) { 
    988                          throw new Exception(__('No such plugin.')); 
    989                     } 
    990  
    991                     if (!$this->modules->moduleExists($id)) { 
    992                          throw new Exception(__('No such plugin.')); 
    993                     } 
    994  
    995                     $tab = count($updated) > 1 ? '' : '#plugins'; 
    996  
    997                     $module = $updated[$id]; 
    998                     $module['id'] = $id; 
     1089               } 
     1090               http::redirect($this->getURL()); 
     1091          } 
     1092 
     1093          elseif (!empty($_POST['update'])) { 
     1094 
     1095               if (is_array($_POST['update'])) { 
     1096                    $modules = array_keys($_POST['update']); 
     1097               } 
     1098 
     1099               $list = $this->store->get(true); 
     1100               if (empty($list)) { 
     1101                    throw new Exception(__('No such plugin.')); 
     1102               } 
     1103 
     1104               $count = 0; 
     1105               foreach($list as $module) { 
     1106 
     1107                    if (!in_array($module['id'], $modules)) { 
     1108                         continue; 
     1109                    } 
    9991110 
    10001111                    if (!self::$allow_multi_install) { 
     
    10161127                    $this->core->callBehavior('pluginAfterUpdate', $module); 
    10171128 
    1018                     dcPage::addSuccessNotice(__('Plugin has been successfully updated.')); 
    1019                     http::redirect($this->getURL().$tab); 
    1020                } 
    1021                else { 
    1022  
    1023                     # --BEHAVIOR-- adminModulesListDoActions 
    1024                     $this->core->callBehavior('adminModulesListDoActions', $this, $id, 'plugin'); 
    1025  
    1026                } 
    1027           } 
    1028           # Global actions 
    1029           elseif (!empty($_POST['modules'])) { 
    1030  
    1031                if (!empty($_POST['activate'])) { 
    1032  
    1033                     $modules = $this->modules->getDisabledModules(); 
    1034                     if (empty($modules)) { 
    1035                          throw new Exception(__('No such plugin.')); 
    1036                     } 
    1037  
    1038                     foreach($modules as $id => $module) { 
    1039  
    1040                          # --BEHAVIOR-- moduleBeforeActivate 
    1041                          $this->core->callBehavior('pluginBeforeActivate', $id); 
    1042  
    1043                          $this->modules->activateModule($id); 
    1044  
    1045                          # --BEHAVIOR-- moduleAfterActivate 
    1046                          $this->core->callBehavior('pluginAfterActivate', $id); 
    1047  
    1048                     } 
    1049  
    1050                     dcPage::addSuccessNotice(__('Plugins have been successfully activated.')); 
    1051                     http::redirect($this->getURL()); 
    1052                } 
    1053  
    1054                elseif (!empty($_POST['deactivate'])) { 
    1055  
    1056                     $modules = $this->modules->getModules(); 
    1057                     if (empty($modules)) { 
    1058                          throw new Exception(__('No such plugin.')); 
    1059                     } 
    1060  
    1061                     $failed = false; 
    1062                     foreach($modules as $id => $module) { 
    1063                          $module[$id] = $id; 
    1064  
    1065                          if (!$module['root_writable']) { 
    1066                               $failed = true; 
    1067                               continue; 
    1068                          } 
    1069  
    1070                          # --BEHAVIOR-- moduleBeforeDeactivate 
    1071                          $this->core->callBehavior('pluginBeforeDeactivate', $module); 
    1072  
    1073                          $this->modules->deactivateModule($id); 
    1074  
    1075                          # --BEHAVIOR-- moduleAfterDeactivate 
    1076                          $this->core->callBehavior('pluginAfterDeactivate', $module); 
    1077                     } 
    1078  
    1079                     if ($failed) { 
    1080                          dcPage::addWarningNotice(__('Some plugins have not been deactivated.')); 
    1081                     } 
    1082                     else { 
    1083                          dcPage::addSuccessNotice(__('Plugins have been successfully deactivated.')); 
    1084                     } 
    1085                     http::redirect($this->getURL()); 
    1086                } 
    1087  
    1088                elseif (!empty($_POST['update'])) { 
    1089  
    1090                     $updated = $this->store->get(true); 
    1091                     if (empty($updated)) { 
    1092                          throw new Exception(__('No such plugin.')); 
    1093                     } 
    1094  
    1095                     foreach($updated as $module) { 
    1096  
    1097                          if (!self::$allow_multi_install) { 
    1098                               $dest = $module['root'].'/../'.basename($module['file']); 
    1099                          } 
    1100                          else { 
    1101                               $dest = $this->getPath().'/'.basename($module['file']); 
    1102                               if ($module['root'] != $dest) { 
    1103                                    @file_put_contents($module['root'].'/_disabled', ''); 
    1104                               } 
    1105                          } 
    1106  
    1107                          # --BEHAVIOR-- moduleBeforeUpdate 
    1108                          $this->core->callBehavior('pluginBeforeUpdate', $module); 
    1109  
    1110                          $this->store->process($module['file'], $dest); 
    1111  
    1112                          # --BEHAVIOR-- moduleAfterUpdate 
    1113                          $this->core->callBehavior('pluginAfterUpdate', $module); 
    1114                     } 
    1115  
    1116                     dcPage::addSuccessNotice(__('Plugins have been successfully updated.')); 
    1117                     http::redirect($this->getURL().'#plugins'); 
    1118                } 
    1119           } 
     1129                    $count++; 
     1130               } 
     1131 
     1132               $tab = $count && $count == count($list) ? '#plugins' : '#update'; 
     1133 
     1134               dcPage::addSuccessNotice( 
     1135                    __('Plugin has been successfully updated.', 'Plugins have been successuflly updated.', $count) 
     1136               ); 
     1137               http::redirect($this->getURL().$tab); 
     1138          } 
     1139 
    11201140          # Manual actions 
    11211141          elseif (!empty($_POST['upload_pkg']) && !empty($_FILES['pkg_file']) 
     
    11531173               ); 
    11541174               http::redirect($this->getURL().'#plugins'); 
     1175          } 
     1176 
     1177          else { 
     1178 
     1179               # --BEHAVIOR-- adminModulesListDoActions 
     1180               $this->core->callBehavior('adminModulesListDoActions', $this, $modules, 'plugin'); 
     1181 
    11551182          } 
    11561183 
     
    13441371     { 
    13451372          echo 
     1373          '<form action="'.$this->getURL().'" method="post" class="modules-form-actions">'. 
    13461374          '<div id="'.html::escapeHTML($this->list_id).'" class="modules'.(in_array('expander', $cols) ? ' expandable' : '').' one-box">'; 
    13471375 
     
    13761404               if (in_array('name', $cols) && !$current) { 
    13771405                    $line .= 
    1378                     '<h4 class="module-name">'.html::escapeHTML($module['name']).'</h4>'; 
     1406                    '<h4 class="module-name">'; 
     1407 
     1408                    if (in_array('checkbox', $cols)) { 
     1409                         $line .= 
     1410                         '<label for="'.html::escapeHTML($this->list_id).'_modules_'.html::escapeHTML($id).'">'. 
     1411                         form::checkbox(array('modules['.$count.']', html::escapeHTML($this->list_id).'_modules_'.html::escapeHTML($id)), html::escapeHTML($id)). 
     1412                         html::escapeHTML($module['name']). 
     1413                         '</label>'; 
     1414 
     1415                    } 
     1416                    else { 
     1417                         $line .= 
     1418                         form::hidden(array('modules['.$count.']'), html::escapeHTML($id)). 
     1419                         html::escapeHTML($module['name']); 
     1420                    } 
     1421 
     1422                    $line .= 
     1423                    $this->core->formNonce(). 
     1424                    '</h4>'; 
    13791425               } 
    13801426 
     
    14091455               if (in_array('name', $cols) && $current) { 
    14101456                    $line .= 
    1411                     '<h4 class="module-name">'.html::escapeHTML($module['name']).'</h4>'; 
     1457                    '<h4 class="module-name">'; 
     1458 
     1459                    if (in_array('checkbox', $cols)) { 
     1460                         $line .= 
     1461                         '<label for="'.html::escapeHTML($this->list_id).'_modules_'.html::escapeHTML($id).'">'. 
     1462                         form::checkbox(array('modules['.$count.']', html::escapeHTML($this->list_id).'_modules_'.html::escapeHTML($id)), html::escapeHTML($id)). 
     1463                         html::escapeHTML($module['name']). 
     1464                         '</label>'; 
     1465                    } 
     1466                    else { 
     1467                         $line .= 
     1468                         form::hidden(array('modules['.$count.']'), html::escapeHTML($id)). 
     1469                         html::escapeHTML($module['name']); 
     1470                    } 
     1471 
     1472                    $line .= 
     1473                    '</h4>'; 
    14121474               } 
    14131475 
     
    15021564               if (!empty($actions)) { 
    15031565                    $line .= 
    1504                     '<form action="'.$this->getURL().'" method="post" class="actions-buttons">'. 
    1505                     '<p>'. 
    1506                     $this->core->formNonce(). 
    1507                     form::hidden(array('module'), html::escapeHTML($id)). 
    1508  
    1509                     implode(' ', $this->getActions($id, $module, $actions)). 
    1510  
    1511                     '</p>'. 
    1512                     '</form>'; 
     1566                    '<p>'.implode(' ', $this->getActions($id, $module, $actions)).'</p>'; 
    15131567               } 
    15141568 
     
    15231577               $res = $current ? $line.$res : $res.$line; 
    15241578          } 
     1579 
    15251580          echo 
    15261581          $res. 
     
    15321587          } 
    15331588 
    1534           if ($count > 1 && !empty($actions) && $this->core->auth->isSuperAdmin()) { 
    1535                $buttons = $this->getGlobalActions($actions); 
    1536  
    1537                echo 
    1538                '<form action="'.$this->getURL().'" method="post" class="global-actions-buttons">'. 
    1539                '<div>'. 
    1540                $this->core->formNonce(). 
    1541                form::hidden(array('modules'), '1'). 
    1542  
    1543                implode(' ', $buttons). 
    1544  
    1545                '</div>'. 
    1546                '</form>'; 
    1547           } 
     1589          elseif ((in_array('checkbox', $cols) || $count > 1) && !empty($actions) && $this->core->auth->isSuperAdmin()) { 
     1590               $buttons = $this->getGlobalActions($actions, in_array('checkbox', $cols)); 
     1591 
     1592               if (!empty($buttons)) { 
     1593                    echo '<div>'.implode(' ', $buttons).'</div>'; 
     1594               } 
     1595          } 
     1596 
     1597          echo 
     1598          '</form>'; 
     1599 
     1600          return $this; 
    15481601     } 
    15491602 
     
    15581611               if (in_array('select', $actions) && $this->path_writable) { 
    15591612                    $submits[] = 
    1560                     '<input type="submit" name="select" value="'.__('Use this one').'" />'; 
     1613                    '<input type="submit" name="select['.html::escapeHTML($id).']" value="'.__('Use this one').'" />'; 
    15611614               } 
    15621615          } 
     
    15681621     } 
    15691622 
    1570      protected function getGlobalActions($actions) 
     1623     protected function getGlobalActions($actions, $with_selection=false) 
    15711624     { 
    15721625          $submits = array(); 
     
    15741627          foreach($actions as $action) { 
    15751628               switch($action) { 
    1576  
    15771629 
    15781630                    # Update (from store) 
    15791631                    case 'update': if ($this->path_writable) { 
    15801632                         $submits[] = 
    1581                          '<input type="submit" name="update" value="'.__('Update all themes from this list').'" />'; 
     1633                         '<input type="submit" name="update" value="'.($with_selection ? 
     1634                              __('Update selected themes') : 
     1635                              __('Update all themes from this list') 
     1636                         ).'" />'; 
    15821637                    } break; 
    15831638 
     
    16051660          } 
    16061661 
    1607           # List actions 
    1608           if (!empty($_POST['module'])) { 
    1609  
    1610                $id = $_POST['module']; 
    1611  
    1612                if (!empty($_POST['select'])) { 
     1662          $modules = !empty($_POST['modules']) && is_array($_POST['modules']) ? array_values($_POST['modules']) : array(); 
     1663 
     1664          if (!empty($_POST['select'])) { 
     1665 
     1666               # Can select only one theme at a time! 
     1667               if (is_array($_POST['select'])) { 
     1668                    $modules = array_keys($_POST['select']); 
     1669                    $id = $modules[0]; 
    16131670 
    16141671                    if (!$this->modules->moduleExists($id)) { 
     
    16231680                    http::redirect($this->getURL().'#themes'); 
    16241681               } 
    1625                elseif (!empty($_POST['activate'])) { 
    1626  
    1627                     $enabled = $this->modules->getDisabledModules(); 
    1628                     if (!isset($enabled[$id])) { 
    1629                          throw new Exception(__('No such theme.')); 
     1682          } 
     1683 
     1684          elseif (!empty($_POST['activate'])) { 
     1685 
     1686               if (is_array($_POST['activate'])) { 
     1687                    $modules = array_keys($_POST['activate']); 
     1688               } 
     1689 
     1690               $list = $this->modules->getDisabledModules(); 
     1691               if (empty($list)) { 
     1692                    throw new Exception(__('No such theme.')); 
     1693               } 
     1694 
     1695               $count = 0; 
     1696               foreach($list as $id => $module) { 
     1697 
     1698                    if (!in_array($id, $modules)) { 
     1699                         continue; 
    16301700                    } 
    16311701 
     
    16381708                    $this->core->callBehavior('themeAfterActivate', $id); 
    16391709 
    1640                     dcPage::addSuccessNotice(__('Theme has been successfully activated.')); 
    1641                     http::redirect($this->getURL()); 
    1642                } 
    1643  
    1644                elseif (!empty($_POST['deactivate'])) { 
    1645  
    1646                     if (!$this->modules->moduleExists($id)) { 
    1647                          throw new Exception(__('No such theme.')); 
    1648                     } 
    1649  
    1650                     $module = $this->modules->getModules($id); 
    1651                     $module['id'] = $id; 
     1710                    $count++; 
     1711               } 
     1712 
     1713               dcPage::addSuccessNotice( 
     1714                    __('Theme has been successfully activated.', 'Themes have been successuflly activated.', $count) 
     1715               ); 
     1716               http::redirect($this->getURL()); 
     1717          } 
     1718 
     1719          elseif (!empty($_POST['deactivate'])) { 
     1720 
     1721               if (is_array($_POST['deactivate'])) { 
     1722                    $modules = array_keys($_POST['deactivate']); 
     1723               } 
     1724 
     1725               $list = $this->modules->getModules(); 
     1726               if (empty($list)) { 
     1727                    throw new Exception(__('No such theme.')); 
     1728               } 
     1729 
     1730               $failed = false; 
     1731               $count = 0; 
     1732               foreach($list as $id => $module) { 
     1733 
     1734                    if (!in_array($id, $modules)) { 
     1735                         continue; 
     1736                    } 
    16521737 
    16531738                    if (!$module['root_writable']) { 
    1654                          throw new Exception(__('You don\'t have permissions to deactivate this theme.')); 
    1655                     } 
     1739                         $failed = true; 
     1740                         continue; 
     1741                    } 
     1742 
     1743                    $module[$id] = $id; 
    16561744 
    16571745                    # --BEHAVIOR-- themeBeforeDeactivate 
     
    16631751                    $this->core->callBehavior('themeAfterDeactivate', $module); 
    16641752 
    1665                     dcPage::addSuccessNotice(__('Theme has been successfully deactivated.')); 
    1666                     http::redirect($this->getURL()); 
    1667                } 
    1668  
    1669                elseif (!empty($_POST['delete'])) { 
    1670  
    1671                     $disabled = $this->modules->getDisabledModules(); 
    1672                     if (!isset($disabled[$id])) { 
     1753                    $count++; 
     1754               } 
     1755 
     1756               if ($failed) { 
     1757                    dcPage::addWarningNotice(__('Some themes have not been deactivated.')); 
     1758               } 
     1759               else { 
     1760                    dcPage::addSuccessNotice( 
     1761                         __('Theme has been successfully deactivated.', 'Themes have been successuflly deactivated.', $count) 
     1762                    ); 
     1763               } 
     1764               http::redirect($this->getURL()); 
     1765          } 
     1766 
     1767          elseif (!empty($_POST['delete'])) { 
     1768 
     1769               if (is_array($_POST['delete'])) { 
     1770                    $modules = array_keys($_POST['delete']); 
     1771               } 
     1772 
     1773               $list = $this->modules->getDisabledModules(); 
     1774 
     1775               $failed = false; 
     1776               $count = 0; 
     1777               foreach($modules as $id) 
     1778               { 
     1779                    if (!isset($list[$id])) { 
    16731780 
    16741781                         if (!$this->modules->moduleExists($id)) { 
    1675                               throw new Exception(__('No such module.')); 
     1782                              throw new Exception(__('No such theme.')); 
    16761783                         } 
    16771784 
     
    16801787 
    16811788                         if (!$this->isDeletablePath($module['root'])) { 
    1682                               throw new Exception(__("You don't have permissions to delete this theme.")); 
     1789                              $failed = true; 
     1790                              continue; 
    16831791                         } 
    16841792 
     
    16951803                    } 
    16961804 
    1697                     dcPage::addSuccessNotice(__('Theme has been successfully deleted.')); 
    1698                     http::redirect($this->getURL()); 
    1699                } 
    1700  
    1701                elseif (!empty($_POST['install'])) { 
    1702  
    1703                     $updated = $this->store->get(); 
    1704                     if (!isset($updated[$id])) { 
    1705                          throw new Exception(__('No such theme.')); 
    1706                     } 
    1707  
    1708                     $module = $updated[$id]; 
    1709                     $module['id'] = $id; 
     1805                    $count++; 
     1806               } 
     1807 
     1808               if (!$count && $failed) { 
     1809                    throw new Exception(__("You don't have permissions to delete this theme.")); 
     1810               } 
     1811               elseif ($failed) { 
     1812                    dcPage::addWarningNotice(__('Some themes have not been delete.')); 
     1813               } 
     1814               else { 
     1815                    dcPage::addSuccessNotice( 
     1816                         __('Theme has been successfully deleted.', 'Themes have been successuflly deleted.', $count) 
     1817                    ); 
     1818               } 
     1819               http::redirect($this->getURL()); 
     1820          } 
     1821 
     1822          elseif (!empty($_POST['install'])) { 
     1823 
     1824               if (is_array($_POST['install'])) { 
     1825                    $modules = array_keys($_POST['install']); 
     1826               } 
     1827 
     1828               $list = $this->store->get(); 
     1829 
     1830               if (empty($list)) { 
     1831                    throw new Exception(__('No such theme.')); 
     1832               } 
     1833 
     1834               $count = 0; 
     1835               foreach($list as $id => $module) { 
     1836 
     1837                    if (!in_array($id, $modules)) { 
     1838                         continue; 
     1839                    } 
    17101840 
    17111841                    $dest = $this->getPath().'/'.basename($module['file']); 
     
    17141844                    $this->core->callBehavior('themeBeforeAdd', $module); 
    17151845 
    1716                     $ret_code = $this->store->process($module['file'], $dest); 
     1846                    $this->store->process($module['file'], $dest); 
    17171847 
    17181848                    # --BEHAVIOR-- themeAfterAdd 
    17191849                    $this->core->callBehavior('themeAfterAdd', $module); 
    17201850 
    1721                     dcPage::addSuccessNotice($ret_code == 2 ? 
    1722                          __('Theme has been successfully updated.') : 
    1723                          __('Theme has been successfully installed.') 
    1724                     ); 
    1725                     http::redirect($this->getURL()); 
    1726                } 
    1727  
    1728                elseif (!empty($_POST['update'])) { 
    1729  
    1730                     $updated = $this->store->get(true); 
    1731                     if (!isset($updated[$id])) { 
    1732                          throw new Exception(__('No such theme.')); 
    1733                     } 
    1734  
    1735                     if (!$this->modules->moduleExists($id)) { 
    1736                          throw new Exception(__('No such theme.')); 
    1737                     } 
    1738  
    1739                     $tab = count($updated) > 1 ? '' : '#themes'; 
    1740  
    1741                     $module = $updated[$id]; 
    1742                     $module['id'] = $id; 
    1743  
    1744                     if (!self::$allow_multi_install) { 
    1745                          $dest = $module['root'].'/../'.basename($module['file']); 
    1746                     } 
    1747                     else { 
    1748                          $dest = $this->getPath().'/'.basename($module['file']); 
    1749                          if ($module['root'] != $dest) { 
    1750                               @file_put_contents($module['root'].'/_disabled', ''); 
    1751                          } 
    1752                     } 
     1851                    $count++; 
     1852               } 
     1853 
     1854               dcPage::addSuccessNotice( 
     1855                    __('Theme has been successfully installed.', 'Themes have been successuflly installed.', $count) 
     1856               ); 
     1857               http::redirect($this->getURL()); 
     1858          } 
     1859 
     1860          elseif (!empty($_POST['update'])) { 
     1861 
     1862               if (is_array($_POST['update'])) { 
     1863                    $modules = array_keys($_POST['update']); 
     1864               } 
     1865 
     1866               $list = $this->store->get(true); 
     1867               if (empty($list)) { 
     1868                    throw new Exception(__('No such theme.')); 
     1869               } 
     1870 
     1871               $count = 0; 
     1872               foreach($list as $module) { 
     1873 
     1874                    if (!in_array($module['id'], $modules)) { 
     1875                         continue; 
     1876                    } 
     1877 
     1878                    $dest = $module['root'].'/../'.basename($module['file']); 
    17531879 
    17541880                    # --BEHAVIOR-- themeBeforeUpdate 
     
    17601886                    $this->core->callBehavior('themeAfterUpdate', $module); 
    17611887 
    1762                     dcPage::addSuccessNotice(__('Theme has been successfully updated.')); 
    1763                     http::redirect($this->getURL().$tab); 
    1764                } 
    1765                else { 
    1766  
    1767                     # --BEHAVIOR-- adminModulesListDoActions 
    1768                     $this->core->callBehavior('adminModulesListDoActions', $this, $id, 'theme'); 
    1769  
    1770                } 
    1771           } 
    1772           # Global actions 
    1773           elseif (!empty($_POST['modules'])) { 
    1774  
    1775                if (!empty($_POST['update'])) { 
    1776  
    1777                     $updated = $this->store->get(true); 
    1778                     if (empty($updated)) { 
    1779                          throw new Exception(__('No such theme.')); 
    1780                     } 
    1781  
    1782                     foreach($updated as $module) { 
    1783  
    1784                          if (!self::$allow_multi_install) { 
    1785                               $dest = $module['root'].'/../'.basename($module['file']); 
    1786                          } 
    1787                          else { 
    1788                               $dest = $this->getPath().'/'.basename($module['file']); 
    1789                               if ($module['root'] != $dest) { 
    1790                                    @file_put_contents($module['root'].'/_disabled', ''); 
    1791                               } 
    1792                          } 
    1793  
    1794                          # --BEHAVIOR-- moduleBeforeUpdate 
    1795                          $this->core->callBehavior('themesBeforeUpdate', $module); 
    1796  
    1797                          $this->store->process($module['file'], $dest); 
    1798  
    1799                          # --BEHAVIOR-- moduleAfterUpdate 
    1800                          $this->core->callBehavior('themesAfterUpdate', $module); 
    1801                     } 
    1802  
    1803                     dcPage::addSuccessNotice(__('Themes have been successfully updated.')); 
    1804                     http::redirect($this->getURL().'#themes'); 
    1805                } 
    1806           } 
     1888                    $count++; 
     1889               } 
     1890 
     1891               $tab = $count && $count == count($list) ? '#themes' : '#update'; 
     1892 
     1893               dcPage::addSuccessNotice( 
     1894                    __('Theme has been successfully updated.', 'Themes have been successuflly updated.', $count) 
     1895               ); 
     1896               http::redirect($this->getURL().$tab); 
     1897          } 
     1898 
    18071899          # Manual actions 
    18081900          elseif (!empty($_POST['upload_pkg']) && !empty($_FILES['pkg_file']) 
     
    18421934          } 
    18431935 
     1936          else { 
     1937 
     1938               # --BEHAVIOR-- adminModulesListDoActions 
     1939               $this->core->callBehavior('adminModulesListDoActions', $this, $modules, 'theme'); 
     1940 
     1941          } 
     1942 
    18441943          return null; 
    18451944     } 
  • locales/en/main.po

    r2432 r2487  
    25862586msgstr "" 
    25872587 
     2588msgid "Are you sure you want to delete selected plugins?" 
     2589msgstr "" 
     2590 
    25882591msgid "Use this theme" 
    25892592msgstr "" 
     
    25942597#, php-format 
    25952598msgid "Are you sure you want to delete \"%s\" theme?" 
     2599msgstr "" 
     2600 
     2601msgid "Are you sure you want to delete selected themes?" 
    25962602msgstr "" 
    25972603 
     
    28442850 
    28452851msgid "Plugin has been successfully activated." 
    2846 msgstr "" 
     2852msgid_plural "Plugins have been successfully activated." 
     2853msgstr[0] "" 
     2854msgstr[1] "" 
    28472855 
    28482856msgid "You don't have permissions to deactivate this plugin." 
     
    28502858 
    28512859msgid "Plugin has been successfully deactivated." 
    2852 msgstr "" 
     2860msgid_plural "Plugins have been successfully deactivated." 
     2861msgstr[0] "" 
     2862msgstr[1] "" 
    28532863 
    28542864msgid "You don't have permissions to delete this plugin." 
    28552865msgstr "" 
    28562866 
     2867msgid "Some plugins have not been deleted." 
     2868msgstr "" 
     2869 
    28572870msgid "Plugin has been successfully deleted." 
    2858 msgstr "" 
     2871msgid_plural "Plugins have been successfully deleted." 
     2872msgstr[0] "" 
     2873msgstr[1] "" 
    28592874 
    28602875msgid "Plugin has been successfully updated." 
    2861 msgstr "" 
     2876msgid_plural "Plugins have been successfully updated." 
     2877msgstr[0] "" 
     2878msgstr[1] "" 
    28622879 
    28632880msgid "Plugin has been successfully installed." 
     2881msgid_plural "Plugins have been successfully installed." 
     2882msgstr[0] "" 
     2883msgstr[1] "" 
     2884 
     2885msgid "Activate selected plugins" 
    28642886msgstr "" 
    28652887 
     
    28702892msgstr "" 
    28712893 
     2894msgid "Deactivate selected plugins" 
     2895msgstr "" 
     2896 
    28722897msgid "Deactivate all plugins from this list" 
    28732898msgstr "" 
     
    28792904msgstr "" 
    28802905 
     2906msgid "Update selected plugins" 
     2907msgstr "" 
     2908 
    28812909msgid "Update all plugins from this list" 
    28822910msgstr "" 
     
    29502978msgstr "" 
    29512979 
     2980msgid "Update selected themes" 
     2981msgstr "" 
     2982 
     2983msgid "Update all themes from this list" 
     2984msgstr "" 
     2985 
    29522986msgid "No such theme." 
    29532987msgstr "" 
     
    29572991 
    29582992msgid "Theme has been successfully activated." 
    2959 msgstr "" 
     2993msgid_plural "Themes have been successfully activated." 
     2994msgstr[0] "" 
     2995msgstr[1] "" 
    29602996 
    29612997msgid "You don't have permissions to deactivate this theme." 
    29622998msgstr "" 
    29632999 
     3000msgid "Some themes have not been deactivated." 
     3001msgstr "" 
     3002 
    29643003msgid "Theme has been successfully deactivated." 
    2965 msgstr "" 
    2966  
    2967 msgid "No such module." 
    2968 msgstr "" 
     3004msgid_plural "Themes have been successfully deactivated." 
     3005msgstr[0] "" 
     3006msgstr[1] "" 
    29693007 
    29703008msgid "You don't have permissions to delete this theme." 
    29713009msgstr "" 
    29723010 
     3011msgid "Some themes have not been delete." 
     3012msgstr "" 
     3013 
    29733014msgid "Theme has been successfully deleted." 
    2974 msgstr "" 
     3015msgid_plural "Themes have been successfully deleted." 
     3016msgstr[0] "" 
     3017msgstr[1] "" 
    29753018 
    29763019msgid "Theme has been successfully updated." 
    2977 msgstr "" 
     3020msgid_plural "Themes have been successfully updated." 
     3021msgstr[0] "" 
     3022msgstr[1] "" 
    29783023 
    29793024msgid "Update all theme from this list" 
    29803025msgstr "" 
    29813026 
    2982 msgid "Themes have been successfully updated." 
    2983 msgstr "" 
    2984  
    29853027msgid "Theme has been successfully installed." 
    2986 msgstr "" 
     3028msgid_plural "Themes have been successfully installed." 
     3029msgstr[0] "" 
     3030msgstr[1] "" 
    29873031 
    29883032msgid "First page" 
  • locales/fr/main.po

    r2440 r2487  
    16431643msgid "There is one plugin to update available from repository." 
    16441644msgid_plural "There are %s plugins to update available from repository." 
    1645 msgstr[0] "Il y a un plugin à mettre à jour depuis le dépôt" 
    1646 msgstr[1] "Il y a %s plugins à mettre à jour depuis le dépôt" 
     1645msgstr[0] "Il y a un plugin à mettre à jour depuis le dépôt." 
     1646msgstr[1] "Il y a %s plugins à mettre à jour depuis le dépôt." 
    16471647 
    16481648msgid "Installed plugins" 
     
    25992599msgstr "Êtes-vous certain de vouloir supprimer le plugin \"%s\" ?" 
    26002600 
     2601msgid "Are you sure you want to delete selected plugins?" 
     2602msgstr "Êtes-vous certain de vouloir supprimer les plugins sélectionnés ?" 
     2603 
    26012604msgid "Use this theme" 
    26022605msgstr "Utiliser ce thème" 
     
    26082611msgid "Are you sure you want to delete \"%s\" theme?" 
    26092612msgstr "Êtes-vous certain de vouloir supprimer le thème \"%s\" ?" 
     2613 
     2614msgid "Are you sure you want to delete selected themes?" 
     2615msgstr "Êtes-vous certain de vouloir supprimer les thèmes sélectionnés ?" 
    26102616 
    26112617msgid "Are you sure you want to delete this backup?" 
     
    28572863 
    28582864msgid "Plugin has been successfully activated." 
    2859 msgstr "Ce plugin a été activé." 
     2865msgid_plural "Plugins have been successfully activated." 
     2866msgstr[0] "Ce plugin a été désactivé." 
     2867msgstr[1] "Ces plugins ont été activé." 
    28602868 
    28612869msgid "You don't have permissions to deactivate this plugin." 
     
    28632871 
    28642872msgid "Plugin has been successfully deactivated." 
    2865 msgstr "Ce plugin a été désactivé." 
     2873msgid_plural "Plugins have been successfully deactivated." 
     2874msgstr[0] "Ce plugin a été désactivé." 
     2875msgstr[1] "Ces plugins ont été désactivé." 
    28662876 
    28672877msgid "You don't have permissions to delete this plugin." 
    28682878msgstr "Vous n'avez pas les permissions pour supprimer ce plugin." 
    28692879 
     2880msgid "Some plugins have not been deleted." 
     2881msgstr "Certains plugins n'ont pas pu être supprimés." 
     2882 
    28702883msgid "Plugin has been successfully deleted." 
    2871 msgstr "Ce plugin a été supprimé." 
     2884msgid_plural "Plugins have been successfully deleted." 
     2885msgstr[0] "Ce plugin a été supprimé." 
     2886msgstr[1] "Ces plugins ont été supprimé." 
    28722887 
    28732888msgid "Plugin has been successfully updated." 
    2874 msgstr "Ce plugin a été mis à jour." 
     2889msgid_plural "Plugins have been successfully updated." 
     2890msgstr[0] "Ce plugin a été mis à jour." 
     2891msgstr[1] "Ces plugins ont été mis à jour." 
    28752892 
    28762893msgid "Plugin has been successfully installed." 
    2877 msgstr "Ce plugin a été installé." 
     2894msgid_plural "Plugins have been successfully installed." 
     2895msgstr[0] "Ce plugin a été installé." 
     2896msgstr[1] "Ces plugins ont été installé." 
     2897 
     2898msgid "Activate selected plugins" 
     2899msgstr "Activer les plugins sélectionnés" 
    28782900 
    28792901msgid "Activate all plugins from this list" 
     
    28832905msgstr "Ces plugins ont été activés." 
    28842906 
     2907msgid "Deactivate selected plugins" 
     2908msgstr "Désactiver les plugins sélectionnés" 
     2909 
    28852910msgid "Deactivate all plugins from this list" 
    28862911msgstr "Désactiver tous les plugins de cette liste" 
     
    28922917msgstr "Certains plugins n'ont pas pu être désactivés." 
    28932918 
     2919msgid "Update selected plugins" 
     2920msgstr "Mettre à jour les plugins sélectionnés" 
     2921 
    28942922msgid "Update all plugins from this list" 
    28952923msgstr "Mettre à jour tous les plugins de cette liste" 
     
    29632991msgstr "Utiliser celui-ci" 
    29642992 
     2993msgid "Update selected themes" 
     2994msgstr "Mettre à jour les thèmes selectionnés" 
     2995 
     2996msgid "Update all themes from this list" 
     2997msgstr "Mettre à jour tous les thèmes de cette liste" 
     2998 
    29652999msgid "No such theme." 
    29663000msgstr "Thème inexistant." 
     
    29693003msgstr "Ce thème a été sélectionné." 
    29703004 
    2971 msgid "Theme has been successfully activated." 
    2972 msgstr "Ce thème a été activé." 
     3005msgid "Theme has been successfully deactivated." 
     3006msgid_plural "Themes have been successfully deactivated." 
     3007msgstr[0] "Ce thème a été activé." 
     3008msgstr[1] "Ces thèmes ont été activé." 
    29733009 
    29743010msgid "You don't have permissions to deactivate this theme." 
    29753011msgstr "Vous n'avez pas les permissions pour désactiver ce thème." 
    29763012 
     3013msgid "Some themes have not been deactivated." 
     3014msgstr "Certains thèmes n'ont pas pu être desactivé." 
     3015 
    29773016msgid "Theme has been successfully deactivated." 
    2978 msgstr "Ce thème a été désactivé." 
    2979  
    2980 msgid "No such module." 
    2981 msgstr "Thème inexistant." 
     3017msgid_plural "Themes have been successfully deactivated." 
     3018msgstr[0] "Ce thème a été désactivé." 
     3019msgstr[1] "Ces thèmes ont été désactivé." 
    29823020 
    29833021msgid "You don't have permissions to delete this theme." 
    29843022msgstr "Vous n'avez pas les permissions pour supprimer ce thème." 
    29853023 
     3024msgid "Some themes have not been delete." 
     3025msgstr "Certains thèmes n'ont pas pu être effacé." 
     3026 
    29863027msgid "Theme has been successfully deleted." 
    2987 msgstr "Ce thème a été supprimé." 
     3028msgid_plural "Themes have been successfully deleted." 
     3029msgstr[0] "Ce thème a été supprimé." 
     3030msgstr[1] "Ces thèmes ont été supprimé." 
    29883031 
    29893032msgid "Theme has been successfully updated." 
     
    29933036msgstr "Mettre à jour tous les thèmes de cette liste" 
    29943037 
    2995 msgid "Themes have been successfully updated." 
    2996 msgstr "Ces thèmes ont été mis à jour." 
     3038msgid "Theme has been successfully updated." 
     3039msgid_plural "Themes have been successfully updated." 
     3040msgstr[0] "Ce thème a été mis à jour." 
     3041msgstr[1] "Ces thèmes ont été mis à jour." 
    29973042 
    29983043msgid "Theme has been successfully installed." 
    2999 msgstr "Ce thème a été installé." 
     3044msgid_plural "Themes have been successfully installed." 
     3045msgstr[0] "Ce thème a été installé." 
     3046msgstr[1] "Ces thèmes ont été installé." 
    30003047 
    30013048msgid "First page" 
Note: See TracChangeset for help on using the changeset viewer.

Sites map