Changeset 2090


Ignore:
Timestamp:
Sep 13, 2007, 3:06:34 AM (17 years ago)
Author:
rvelices
Message:

feature 731: permissions at image level

  • possibility to change image level from picture_modify
  • language change "Public" to "---"
  • possibility to sort users by level on user_list page
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/picture_modify.php

    r1900 r2090  
    7676  $data{'name'} = $_POST['name'];
    7777  $data{'author'} = $_POST['author'];
     78  $data['level'] = $_POST['level'];
    7879
    7980  if ($conf['allow_html_descriptions'])
     
    275276}
    276277
     278// image level options
     279$blockname = 'level_option';
     280$selected_level = isset($_POST['level']) ? $_POST['level'] : $row['level'];
     281foreach ($conf['available_permission_levels'] as $level)
     282{
     283  $template->assign_block_vars(
     284    $blockname,
     285    array(
     286      'VALUE' => $level,
     287      'CONTENT' => l10n( sprintf('Level %d', $level) ),
     288      'SELECTED' => ($level==$selected_level ? 'selected="selected"' : ''),
     289      ));
     290}
     291
    277292// creation date
    278293unset($day, $month, $year);
  • trunk/admin/user_list.php

    r2089 r2090  
    180180$page['order_by_items'] = array(
    181181  'id' => $lang['registration_date'],
    182   'username' => $lang['Username']
     182  'username' => $lang['Username'],
     183  'level' => l10n('Privacy level'),
     184  'language' => l10n('language'),
    183185  );
    184186
     
    831833
    832834  $properties = array();
    833   $properties[] = l10n( sprintf('Level %d', $local_user['level']) );
     835  if ( $local_user['level'] != 0 )
     836  {
     837    $properties[] = l10n( sprintf('Level %d', $local_user['level']) );
     838  }
    834839  $properties[] =
    835840    (isset($local_user['enabled_high']) and ($local_user['enabled_high'] == 'true'))
     
    854859      'EMAIL' => get_email_address_as_display_text($local_user['email']),
    855860      'GROUPS' => $groups_string,
    856       'PROPERTIES' => implode( ',', $properties),
     861      'PROPERTIES' => implode( ', ', $properties),
    857862      )
    858863    );
  • trunk/language/en_UK.iso-8859-1/admin.lang.php

    r2084 r2090  
    644644$lang['Minimum privacy level'] = 'Minimum privacy level';
    645645$lang['Privacy level'] = 'Privacy level';
    646 $lang['Level 0'] = 'Public';
     646$lang['Level 0'] = '---';
    647647$lang['Level 1'] = 'Contacts';
    648648$lang['Level 2'] = 'Friends';
  • trunk/language/fr_FR.iso-8859-1/admin.lang.php

    r2084 r2090  
    645645$lang['Minimum privacy level'] = 'Niveau minimal de confidentialité';
    646646$lang['Privacy level'] = 'Niveau de confidentialité';
    647 $lang['Level 0'] = 'Public';
     647$lang['Level 0'] = '---';
    648648$lang['Level 1'] = 'Contacts';
    649649$lang['Level 2'] = 'Amis';
  • trunk/template/yoga/admin/picture_modify.tpl

    r1900 r2090  
    117117      </tr>
    118118
     119        <tr>
     120                <td><strong>{lang:Minimum privacy level}</strong></td>
     121                <td>
     122                        <select name="level" size="1">
     123                        <!-- BEGIN level_option -->
     124                        <option {level_option.SELECTED} value="{level_option.VALUE}">{level_option.CONTENT} ({level_option.VALUE})</option>
     125                        <!-- END level_option -->
     126                        </select>
     127          </td>
     128        </tr>
     129
    119130    </table>
    120131
Note: See TracChangeset for help on using the changeset viewer.