Step 2 improvement issue 0000127:

o Allow to chage high property on user list
  o Set initial value for the 2 default users

+ Correction of permissions.png in user list


git-svn-id: http://piwigo.org/svn/trunk@1079 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
rub 2006-03-14 21:31:31 +00:00
parent 7eb6e6ca1f
commit 77aa54a32b
8 changed files with 56 additions and 16 deletions

View file

@ -96,7 +96,8 @@ function get_filtered_user_list()
SELECT DISTINCT u.'.$conf['user_fields']['id'].' AS id,
u.'.$conf['user_fields']['username'].' AS username,
u.'.$conf['user_fields']['email'].' AS email,
ui.status
ui.status,
ui.enabled_high
FROM '.USERS_TABLE.' AS u
INNER JOIN '.USER_INFOS_TABLE.' AS ui
ON u.'.$conf['user_fields']['id'].' = ui.user_id
@ -272,10 +273,10 @@ if (isset($_POST['delete']) and count($collection) > 0)
);
foreach ($page['filtered_users'] as $filter_key => $filter_user)
{
if (in_array($filter_user['id'], $collection))
{
unset($page['filtered_users'][$filter_key]);
}
if (in_array($filter_user['id'], $collection))
{
unset($page['filtered_users'][$filter_key]);
}
}
}
else
@ -336,9 +337,9 @@ DELETE FROM '.USER_GROUP_TABLE.'
$formfields =
array('nb_image_line', 'nb_line_page', 'template', 'language',
'recent_period', 'maxwidth', 'expand', 'show_nb_comments',
'maxheight', 'status');
'maxheight', 'status', 'enabled_high');
$true_false_fields = array('expand', 'show_nb_comments');
$true_false_fields = array('expand', 'show_nb_comments', 'enabled_high');
foreach ($formfields as $formfield)
{
@ -451,6 +452,7 @@ $template->assign_vars(
'L_EMAIL' => $lang['mail_address'],
'L_ORDER_BY' => $lang['order_by'],
'L_ACTIONS' => $lang['actions'],
'L_PROPERTIES' => $lang['properties'],
'L_PERMISSIONS' => $lang['permissions'],
'L_USERS_LIST' => $lang['title_liste_users'],
'L_LANGUAGE' => $lang['language'],
@ -801,7 +803,8 @@ foreach ($page['filtered_users'] as $num => $local_user)
'USERNAME' => $local_user['username'],
'STATUS' => $lang['user_status_'.$local_user['status']],
'EMAIL' => isset($local_user['email']) ? $local_user['email'] : '',
'GROUPS' => $groups_string
'GROUPS' => $groups_string,
'PROPERTIES' => (isset($local_user['enabled_high']) and ($local_user['enabled_high'] == 'true')) ? $lang['is_high_enabled'] : $lang['is_high_disabled']
)
);
}

View file

@ -451,7 +451,8 @@ function create_user_infos($user_id)
'show_nb_comments' => boolean_to_string($conf['show_nb_comments']),
'maxwidth' => $conf['default_maxwidth'],
'maxheight' => $conf['default_maxheight'],
'registration_date' => $dbnow
'registration_date' => $dbnow,
'enabled_high' => $conf['newuser_default_enabled_high']
);
include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');

View file

@ -185,6 +185,7 @@ if (@file_exists($config_file))
$prefixeTable = $table_prefix;
include(PHPWG_ROOT_PATH . 'include/config_default.inc.php');
@include(PHPWG_ROOT_PATH. 'include/config_local.inc.php');
include(PHPWG_ROOT_PATH . 'include/constants.php');
include(PHPWG_ROOT_PATH . 'include/functions.inc.php');
include(PHPWG_ROOT_PATH . 'include/template.php');
@ -309,9 +310,9 @@ INSERT INTO '.USERS_TABLE.'
$query = '
INSERT INTO '.USER_INFOS_TABLE.'
(user_id,status,language)
(user_id,status,language,enabled_high)
VALUES
(1, \'webmaster\', \''.$language.'\')
(1, \'webmaster\', \''.$language.'\',\''.$conf['newuser_default_enabled_high'].'\')
;';
mysql_query($query);
@ -333,9 +334,9 @@ INSERT INTO '.USERS_TABLE.'
$query = '
INSERT INTO '.USER_INFOS_TABLE.'
(user_id,status,language)
(user_id,status,language,enabled_high)
VALUES
(2, \'guest\', \''.$language.'\')
(2, \'guest\', \''.$language.'\',\'false\')
;';
mysql_query($query);

View file

@ -161,7 +161,11 @@ $lang['You are running on development sources, no check possible.'] = 'You are r
$lang['You are running the latest version of PhpWebGallery.'] = 'You are running the latest version of PhpWebGallery.';
$lang['You cannot move a category in its own sub category'] = 'You cannot move a category in its own sub category';
$lang['You need to confirm deletion'] = 'You need to confirm deletion';
$lang['actions'] = 'actions';
$lang['actions'] = 'Actions';
$lang['properties'] = 'Properties';
$lang['is_high_enabled'] = 'High definition';
$lang['is_high_disabled'] = '';
$lang['enabled_high'] = 'High definition enabled';
$lang['add keywords'] = 'add keywords';
$lang['associate to category'] = 'associate to category';
$lang['associate to group'] = 'associate to group';

View file

@ -26,6 +26,8 @@ or descending order.</p>
<li>modify display properties</li>
<li>modify additional properties</li>
</ul>
<p>The target is the set users selected (by default) or all users is

View file

@ -161,7 +161,11 @@ $lang['You are running on development sources, no check possible.'] = 'Vous trav
$lang['You are running the latest version of PhpWebGallery.'] = 'Vous utilisez la dernière version de PhpWebGallery.';
$lang['You cannot move a category in its own sub category'] = 'Vous ne pouvez pas déplacer une catégorie dans sa propre sous-catégorie';
$lang['You need to confirm deletion'] = 'Vous devez confirmer la suppression';
$lang['actions'] = 'actions';
$lang['actions'] = 'Actions';
$lang['properties'] = 'Propriétés';
$lang['is_high_enabled'] = 'Haute définition';
$lang['is_high_disabled'] = '';
$lang['enabled_high'] = 'Haute définition actif';
$lang['add keywords'] = 'ajouter des mots-clef';
$lang['associate to category'] = 'associer à la catégorie';
$lang['associate to group'] = 'associer au groupe';

View file

@ -27,6 +27,8 @@ simultan
<li>modifier les propriétés d'affichage</li>
<li>modifier les propriétés annexes</li>
</ul>
<p>La cible est la liste des utilisateurs sélectionnés (par défaut) ou bien

View file

@ -80,6 +80,7 @@
<th>{L_STATUS}</th>
<th>{L_EMAIL}</th>
<th>{lang:Groups}</th>
<th>{L_PROPERTIES}</th>
<th>{L_ACTIONS}</th>
</tr>
<!-- BEGIN user -->
@ -89,8 +90,9 @@
<td>{user.STATUS}</td>
<td>{user.EMAIL}</td>
<td>{user.GROUPS}</td>
<td>{user.PROPERTIES}</td>
<td style="text-align:center;">
<a href="{user.U_PERM}"><img src="./template/yoga/theme/permissions.png" class="button" style="border:none" alt="{L_PERMISSIONS}" title="{L_PERMISSIONS}" /></a>
<a href="{user.U_PERM}"><img src="{themeconf:icon_dir}/permissions.png" class="button" style="border:none" alt="{L_PERMISSIONS}" title="{L_PERMISSIONS}" /></a>
</td>
</tr>
<!-- END user -->
@ -157,6 +159,27 @@
</fieldset>
<!-- Properties -->
<fieldset>
<legend>{L_PROPERTIES}</legend>
<table>
<tr>
<td>{lang:enabled_high}</td>
<td>
<label><input type="radio" name="enabled_high" value="leave" checked="checked" /> {lang:leave}</label>
/ {lang:set to}
<label><input type="radio" name="enabled_high" value="true" {ENABLED_HIGH_YES} />{L_YES}</label>
<label><input type="radio" name="enabled_high" value="false" {ENABLED_HIGH_NO} />{L_NO}</label>
</td>
</tr>
</table>
</fieldset>
<!-- preference -->
<fieldset>
<legend>{lang:Preferences}</legend>