Changeset 13593


Ignore:
Timestamp:
03/17/12 15:07:28 (8 years ago)
Author:
plg
Message:

feature 2594: l10n on new strings of the "Album Permissions" screen. Details about "indirect permissions".

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/cat_perm.php

    r13580 r13593  
    281281 
    282282  $user_granted_by_group_ids = array(); 
    283  
     283   
    284284  foreach ($granted_groups as $group_users) 
    285285  { 
    286     $user_granted_by_group_ids = array_merge($user_granted_by_group_ids, 
    287                                              $group_users); 
    288   } 
     286    $user_granted_by_group_ids = array_merge($user_granted_by_group_ids, $group_users); 
     287  } 
     288   
    289289  $user_granted_by_group_ids = array_unique($user_granted_by_group_ids); 
    290290   
    291    
    292   $user_granted_indirect_ids = array_diff($user_granted_by_group_ids, 
    293                                           $user_granted_direct_ids); 
    294   $user_granted_indirect_ids =  
    295     order_by_name($user_granted_indirect_ids, $users);   
    296   foreach ($user_granted_indirect_ids as $user_id) 
    297   { 
    298     foreach ($granted_groups as $group_id => $group_users) 
    299     { 
    300       if (in_array($user_id, $group_users)) 
    301       { 
    302         $template->append( 
    303           'user_granted_indirects', 
    304           array( 
    305             'USER'=>$users[$user_id], 
    306             'GROUP'=>$groups[$group_id] 
    307             ) 
    308           ); 
    309         break; 
    310       } 
    311     } 
     291  $user_granted_indirect_ids = array_diff( 
     292    $user_granted_by_group_ids, 
     293    $user_granted_direct_ids 
     294    ); 
     295 
     296  $template->assign('nb_users_granted_indirect', count($user_granted_indirect_ids)); 
     297 
     298  foreach ($granted_groups as $group_id => $group_users) 
     299  { 
     300    $group_usernames = array(); 
     301    foreach ($group_users as $user_id) 
     302    { 
     303      if (in_array($user_id, $user_granted_indirect_ids)) 
     304      { 
     305        array_push($group_usernames, $users[$user_id]); 
     306      } 
     307    } 
     308 
     309    $template->append( 
     310      'user_granted_indirect_groups', 
     311      array( 
     312        'group_name' => $groups[$group_id], 
     313        'group_users' => implode(', ', $group_usernames), 
     314        ) 
     315      ); 
    312316  } 
    313317} 
  • trunk/admin/themes/default/template/cat_perm.tpl

    r13580 r13593  
    1818  jQuery("#selectStatus").change(function() { 
    1919    checkStatusOptions(); 
     20  }); 
     21 
     22  jQuery("#indirectPermissionsDetailsShow").click(function(){ 
     23    jQuery("#indirectPermissionsDetailsShow").hide(); 
     24    jQuery("#indirectPermissionsDetailsHide").show(); 
     25    jQuery("#indirectPermissionsDetails").show(); 
     26    return false; 
     27  }); 
     28 
     29  jQuery("#indirectPermissionsDetailsHide").click(function(){ 
     30    jQuery("#indirectPermissionsDetailsShow").show(); 
     31    jQuery("#indirectPermissionsDetailsHide").hide(); 
     32    jQuery("#indirectPermissionsDetails").hide(); 
     33    return false; 
    2034  }); 
    2135}); 
     
    4256 
    4357  <p> 
     58{if count($groups) > 0} 
    4459    <strong>{'Permission granted for groups'|@translate}</strong> 
    4560    <br> 
     
    4762      {html_options options=$groups selected=$groups_selected} 
    4863    </select> 
     64{else} 
     65    {'There is no group in this gallery.'|@translate} <a href="admin.php?page=group_list" class="externalLink">{'Group management'|@translate}</a> 
     66{/if} 
    4967  </p> 
    5068 
     
    5674    </select> 
    5775  </p> 
     76 
     77{if isset($nb_users_granted_indirect)} 
     78  <p> 
     79    {'%u users have automatic permission because they belong to a granted group.'|@translate|@sprintf:$nb_users_granted_indirect} 
     80    <a href="#" id="indirectPermissionsDetailsHide" style="display:none">{'hide details'|@translate}</a> 
     81    <a href="#" id="indirectPermissionsDetailsShow">{'show details'|@translate}</a> 
     82 
     83    <ul id="indirectPermissionsDetails" style="display:none"> 
     84  {foreach from=$user_granted_indirect_groups item=group_details} 
     85      <li><strong>{$group_details.group_name}</strong> : {$group_details.group_users}</li> 
     86  {/foreach} 
     87    </ul> 
     88  </p> 
     89{/if} 
    5890 
    5991{* 
  • trunk/language/en_UK/admin.lang.php

    r13544 r13593  
    865865$lang['Generate multiple size images']='Generate multiple size images'; 
    866866$lang['Delete multiple size images']='Delete multiple size images'; 
     867$lang['any visitor can see this album'] = 'any visitor can see this album'; 
     868$lang['visitors need to login and have the appropriate permissions to see this album'] = 'visitors need to login and have the appropriate permissions to see this album'; 
     869$lang['Groups and users'] = 'Groups and users'; 
     870$lang['Permission granted for groups'] = 'Permission granted for groups'; 
     871$lang['Select groups...'] = 'Select groups...'; 
     872$lang['There is no group in this gallery.'] = 'There is no group in this gallery.'; 
     873$lang['Permission granted for users'] = 'Permission granted for users'; 
     874$lang['Select users...'] = 'Select users...'; 
     875$lang['%u users have automatic permission because they belong to a granted group.'] = '%u users have automatic permission because they belong to a granted group.'; 
    867876?> 
  • trunk/language/fr_FR/admin.lang.php

    r13543 r13593  
    880880$lang['ReGalAndroid (RemoteGallery client for Android) is an open source (GPL v3) Piwigo client for the Android platform.'] = 'ReGalAndroid (RemoteGallery Android) est un client libre (GPL v3) pour Piwigo sur Android.'; 
    881881$lang['Features include gallery browsing, album creation and photo upload.'] = 'Ses fonctionnalités incluent la navigation sur la galerie, la création d\'albums et l\'ajout de photos.'; 
     882$lang['any visitor can see this album'] = 'n\'importe quel visiteur peut voir cet album'; 
     883$lang['visitors need to login and have the appropriate permissions to see this album'] = 'les visiteurs doivent se connecter et avoir les permissions nécessaires pour voir cet album'; 
     884$lang['Groups and users'] = 'Groupes et utilisateurs'; 
     885$lang['Permission granted for groups'] = 'Permission accordée pour les groupes'; 
     886$lang['Select groups...'] = 'Sélectionnez les groupes...'; 
     887$lang['There is no group in this gallery.'] = 'Il n\'y a pas de groupe dans cette galerie.'; 
     888$lang['Permission granted for users'] = 'Permission accordée pour les utilisateurs'; 
     889$lang['Select users...'] = 'Sélectionnez les utilisateurs...'; 
     890$lang['%u users have automatic permission because they belong to a granted group.'] = '%u utilisateurs ont automatiquement la permission car ils appartiennent à un groupe autorisé.'; 
    882891?> 
Note: See TracChangeset for help on using the changeset viewer.