diff options
Diffstat (limited to '')
-rw-r--r-- | admin/plugins.php | 62 | ||||
-rw-r--r-- | admin/user_list.php | 293 | ||||
-rw-r--r-- | template/yoga/admin/user_list.tpl | 302 |
3 files changed, 233 insertions, 424 deletions
diff --git a/admin/plugins.php b/admin/plugins.php index d40158b33..a4260513b 100644 --- a/admin/plugins.php +++ b/admin/plugins.php @@ -35,6 +35,34 @@ $my_base_url = PHPWG_ROOT_PATH.'admin.php?page=plugins'; // +-----------------------------------------------------------------------+ +// | Sections definitions | +// +-----------------------------------------------------------------------+ +if (empty($_GET['section'])) +{ + $page['section'] = 'list'; +} +else +{ + $page['section'] = $_GET['section']; +} + +$tab_link = $my_base_url . '&section='; + +// TabSheet +$tabsheet = new tabsheet(); +// TabSheet initialization +$tabsheet->add('list', l10n('plugins_tab_list'), $tab_link.'list'); +$tabsheet->add('update', l10n('plugins_tab_update'), $tab_link.'update'); +$tabsheet->add('new', l10n('plugins_tab_new'), $tab_link.'new'); +// TabSheet selection +$tabsheet->select($page['section']); +// Assign tabsheet to template +$tabsheet->assign(); + +$my_base_url .= '§ion=' . $page['section']; + + +// +-----------------------------------------------------------------------+ // | perform requested actions | // +-----------------------------------------------------------------------+ if (isset($_GET['action']) and isset($_GET['plugin']) and !is_adviser()) @@ -153,7 +181,11 @@ DELETE FROM ' . PLUGINS_TABLE . ' WHERE id="' . $plugin_id . '"'; break; case 'delete': - if (!deltree(PHPWG_PLUGINS_PATH . $plugin_id)) + if (!empty($crt_db_plugin)) + { + array_push($errors, 'CANNOT delete - PLUGIN IS INSTALLED'); + } + elseif (!deltree(PHPWG_PLUGINS_PATH . $plugin_id)) { send_to_trash(PHPWG_PLUGINS_PATH . $plugin_id); } @@ -177,34 +209,6 @@ DELETE FROM ' . PLUGINS_TABLE . ' WHERE id="' . $plugin_id . '"'; // +-----------------------------------------------------------------------+ -// | Sections definitions | -// +-----------------------------------------------------------------------+ -if (empty($_GET['section'])) -{ - $page['section'] = 'list'; -} -else -{ - $page['section'] = $_GET['section']; -} - -$tab_link = $my_base_url . '&section='; - -// TabSheet -$tabsheet = new tabsheet(); -// TabSheet initialization -$tabsheet->add('list', l10n('plugins_tab_list'), $tab_link.'list'); -$tabsheet->add('update', l10n('plugins_tab_update'), $tab_link.'update'); -$tabsheet->add('new', l10n('plugins_tab_new'), $tab_link.'new'); -// TabSheet selection -$tabsheet->select($page['section']); -// Assign tabsheet to template -$tabsheet->assign(); - -$my_base_url .= '§ion=' . $page['section']; - - -// +-----------------------------------------------------------------------+ // | start template output | // +-----------------------------------------------------------------------+ $fs_plugins = get_fs_plugins(); diff --git a/admin/user_list.php b/admin/user_list.php index 6e648101f..3b7194594 100644 --- a/admin/user_list.php +++ b/admin/user_list.php @@ -450,7 +450,7 @@ DELETE FROM '.USER_GROUP_TABLE.' // | groups list | // +-----------------------------------------------------------------------+ -$groups = array(); +$groups[-1] = '------------'; $query = ' SELECT id, name @@ -481,7 +481,7 @@ else $start = 0; } -$template->assign_vars( +$template->assign( array( 'U_HELP' => PHPWG_ROOT_PATH.'popuphelp.php?page=user_list', @@ -490,93 +490,42 @@ $template->assign_vars( 'F_FILTER_ACTION' => PHPWG_ROOT_PATH.'admin.php' )); -if (isset($_GET['id'])) -{ - $template->assign_block_vars('session', array('ID' => $_GET['id'])); -} - // Hide radio-button if not allow to assign adviser if ($conf['allow_adviser']) { - $template->assign_block_vars('adviser', array()); + $template->assign('adviser', true); } -foreach ($page['order_by_items'] as $item => $label) +// Filter status options +$status_options[-1] = '------------'; +foreach (get_enums(USER_INFOS_TABLE, 'status') as $status) { - $selected = (isset($_GET['order_by']) and $_GET['order_by'] == $item) ? - 'selected="selected"' : ''; - $template->assign_block_vars( - 'order_by', - array( - 'VALUE' => $item, - 'CONTENT' => $label, - 'SELECTED' => $selected - )); + $status_options[$status] = l10n('user_status_'.$status); } +$template->assign('status_options', $status_options); +$template->assign('status_selected', + isset($_GET['status']) ? $_GET['status'] : ''); -foreach ($page['direction_items'] as $item => $label) -{ - $selected = (isset($_GET['direction']) and $_GET['direction'] == $item) ? - 'selected="selected"' : ''; - $template->assign_block_vars( - 'direction', - array( - 'VALUE' => $item, - 'CONTENT' => $label, - 'SELECTED' => $selected - )); -} +// Filter group options +$template->assign('group_options', $groups); +$template->assign('group_selected', + isset($_GET['group']) ? $_GET['group'] : ''); -$blockname = 'group_option'; +// Filter order options +$template->assign('order_options', $page['order_by_items']); +$template->assign('order_selected', + isset($_GET['order_by']) ? $_GET['order_by'] : ''); -$template->assign_block_vars( - $blockname, - array( - 'VALUE'=> -1, - 'CONTENT' => '------------', - 'SELECTED' => '' - )); +// Filter direction options +$template->assign('direction_options', $page['direction_items']); +$template->assign('direction_selected', + isset($_GET['direction']) ? $_GET['direction'] : ''); -foreach ($groups as $group_id => $group_name) -{ - $selected = (isset($_GET['group']) and $_GET['group'] == $group_id) ? - 'selected="selected"' : ''; - $template->assign_block_vars( - $blockname, - array( - 'VALUE' => $group_id, - 'CONTENT' => $group_name, - 'SELECTED' => $selected - )); -} - -$blockname = 'status_option'; - -$template->assign_block_vars( - $blockname, - array( - 'VALUE'=> -1, - 'CONTENT' => '------------', - 'SELECTED' => '' - )); - -foreach (get_enums(USER_INFOS_TABLE, 'status') as $status) -{ - $selected = (isset($_GET['status']) and $_GET['status'] == $status) ? - 'selected="selected"' : ''; - $template->assign_block_vars( - $blockname, - array( - 'VALUE' => $status, - 'CONTENT' => l10n('user_status_'.$status), - 'SELECTED' => $selected - )); -} if (isset($_POST['pref_submit'])) { // echo '<pre>'; print_r($_POST); echo '</pre>'; - $template->assign_vars( + $template->assign( array( 'ADVISER_YES' => 'true' == (isset($_POST['adviser']) and $_POST['adviser']) ? 'checked="checked"' : '', 'ADVISER_NO' => 'false' == (isset($_POST['adviser']) and $_POST['adviser']) ? 'checked="checked"' : '', @@ -587,22 +536,28 @@ if (isset($_POST['pref_submit'])) 'RECENT_PERIOD' => $_POST['recent_period'], 'EXPAND_YES' => 'true' == $_POST['expand'] ? 'checked="checked"' : '', 'EXPAND_NO' => 'false' == $_POST['expand'] ? 'checked="checked"' : '', - 'SHOW_NB_COMMENTS_YES' => - 'true' == $_POST['show_nb_comments'] ? 'checked="checked"' : '', - 'SHOW_NB_COMMENTS_NO' => - 'false' == $_POST['show_nb_comments'] ? 'checked="checked"' : '', - 'SHOW_NB_HITS_YES' => - 'true' == $_POST['show_nb_hits'] ? 'checked="checked"' : '', - 'SHOW_NB_HITS_NO' => - 'false' == $_POST['show_nb_hits'] ? 'checked="checked"' : '', + 'SHOW_NB_COMMENTS_YES' => 'true' == $_POST['show_nb_comments'] ? 'checked="checked"' : '', + 'SHOW_NB_COMMENTS_NO' => 'false' == $_POST['show_nb_comments'] ? 'checked="checked"' : '', + 'SHOW_NB_HITS_YES' => 'true' == $_POST['show_nb_hits'] ? 'checked="checked"' : '', + 'SHOW_NB_HITS_NO' => 'false' == $_POST['show_nb_hits'] ? 'checked="checked"' : '', 'ENABLED_HIGH_YES' => 'true' == $_POST['enabled_high'] ? 'checked="checked"' : '', 'ENABLED_HIGH_NO' => 'false' == $_POST['enabled_high'] ? 'checked="checked"' : '', + + 'STATUS_ACTION_SET' => 'set' == $_POST['status_action'] ? 'checked="checked"' : '', + 'LEVEL_ACTION_SET' => 'set' == $_POST['level_action'] ? 'checked="checked"' : '', + 'NB_IMAGE_LINE_ACTION_SET' => 'set' == $_POST['nb_image_line_action'] ? 'checked="checked"' : '', + 'NB_LINE_PAGE_ACTION_SET' => 'set' == $_POST['nb_line_page_action'] ? 'checked="checked"' : '', + 'TEMPLATE_ACTION_SET' => 'set' == $_POST['template_action'] ? 'checked="checked"' : '', + 'LANGUAGE_ACTION_SET' => 'set' == $_POST['language_action'] ? 'checked="checked"' : '', + 'RECENT_PERIOD_ACTION_SET' => 'set' == $_POST['recent_period_action'] ? 'checked="checked"' : '', + 'MAXWIDTH_ACTION_SET' => 'set' == $_POST['maxwidth_action'] ? 'checked="checked"' : '', + 'MAXHEIGHT_ACTION_SET' => 'set' == $_POST['maxheight_action'] ? 'checked="checked"' : '', )); } else { $default_user = get_default_user_info(true); - $template->assign_vars( + $template->assign( array( 'NB_IMAGE_LINE' => $default_user['nb_image_line'], 'NB_LINE_PAGE' => $default_user['nb_line_page'], @@ -612,162 +567,45 @@ else )); } -$blockname = 'template_option'; +// Template Options +$template->assign('template_options', get_pwg_themes()); +$template->assign('template_selected', + isset($_POST['pref_submit']) ? $_POST['template'] : get_default_template()); -foreach (get_pwg_themes() as $pwg_template) -{ - if (isset($_POST['pref_submit'])) - { - $selected = $_POST['template']==$pwg_template ? 'selected="selected"' : ''; - } - else if (get_default_template() == $pwg_template) - { - $selected = 'selected="selected"'; - } - else - { - $selected = ''; - } - - $template->assign_block_vars( - $blockname, - array( - 'VALUE'=> $pwg_template, - 'CONTENT' => $pwg_template, - 'SELECTED' => $selected - )); -} - -$blockname = 'language_option'; - -foreach (get_languages() as $language_code => $language_name) -{ - if (isset($_POST['pref_submit'])) - { - $selected = $_POST['language']==$language_code ? 'selected="selected"':''; - } - else if (get_default_language() == $language_code) - { - $selected = 'selected="selected"'; - } - else - { - $selected = ''; - } - - $template->assign_block_vars( - $blockname, - array( - 'VALUE'=> $language_code, - 'CONTENT' => $language_name, - 'SELECTED' => $selected - )); -} - -$blockname = 'pref_status_option'; +// Language options +$template->assign('language_options', get_languages()); +$template->assign('language_selected', + isset($_POST['pref_submit']) ? $_POST['language'] : get_default_language()); +// Status options foreach (get_enums(USER_INFOS_TABLE, 'status') as $status) { - if (isset($_POST['pref_submit'])) - { - $selected = $_POST['status'] == $status ? 'selected="selected"' : ''; - } - else if ('normal' == $status) - { - $selected = 'selected="selected"'; - } - else - { - $selected = ''; - } - // Only status <= can be assign if (is_autorize_status(get_access_type_status($status))) { - $template->assign_block_vars( - $blockname, - array( - 'VALUE' => $status, - 'CONTENT' => l10n('user_status_'.$status), - 'SELECTED' => $selected - )); + $pref_status_options[$status] = l10n('user_status_'.$status); } } +$template->assign('pref_status_options', $pref_status_options); +$template->assign('pref_status_selected', + isset($_POST['pref_submit']) ? $_POST['status'] : 'normal'); -// associate -$blockname = 'associate_option'; +// associate and dissociate options +$template->assign('association_options', $groups); +$template->assign('associate_selected', + isset($_POST['pref_submit']) ? $_POST['associate'] : ''); +$template->assign('dissociate_selected', + isset($_POST['pref_submit']) ? $_POST['dissociate'] : ''); -$template->assign_block_vars( - $blockname, - array( - 'VALUE'=> -1, - 'CONTENT' => '------------', - 'SELECTED' => '' - )); - -foreach ($groups as $group_id => $group_name) -{ - if (isset($_POST['pref_submit'])) - { - $selected = $_POST['associate'] == $group_id ? 'selected="selected"' : ''; - } - else - { - $selected = ''; - } - - $template->assign_block_vars( - $blockname, - array( - 'VALUE' => $group_id, - 'CONTENT' => $group_name, - 'SELECTED' => $selected - )); -} - -// dissociate -$blockname = 'dissociate_option'; - -$template->assign_block_vars( - $blockname, - array( - 'VALUE'=> -1, - 'CONTENT' => '------------', - 'SELECTED' => '' - )); - -foreach ($groups as $group_id => $group_name) -{ - if (isset($_POST['pref_submit'])) - { - $selected = $_POST['dissociate'] == $group_id ? 'selected="selected"' : ''; - } - else - { - $selected = ''; - } - - $template->assign_block_vars( - $blockname, - array( - 'VALUE' => $group_id, - 'CONTENT' => $group_name, - 'SELECTED' => $selected - )); -} // user level options -$blockname = 'level_option'; foreach ($conf['available_permission_levels'] as $level) { - $template->assign_block_vars( - $blockname, - array( - 'VALUE' => $level, - 'CONTENT' => l10n( sprintf('Level %d', $level) ), - 'SELECTED' => $level==$default_user['level'] ? 'selected="selected"' : '', - )); + $level_options[$level] = l10n(sprintf('Level %d', $level)); } +$template->assign('level_options', $level_options); +$template->assign('level_selected', + isset($_POST['pref_submit']) ? $_POST['level'] : $default_user['level']); // +-----------------------------------------------------------------------+ // | navigation bar | @@ -782,7 +620,7 @@ $navbar = create_navigation_bar( $conf['users_page'] ); -$template->assign_vars(array('NAVBAR' => $navbar)); +$template->assign('NAVBAR', $navbar); // +-----------------------------------------------------------------------+ // | user list | @@ -840,10 +678,9 @@ foreach ($visible_user_list as $num => $local_user) (isset($local_user['enabled_high']) and ($local_user['enabled_high'] == 'true')) ? l10n('is_high_enabled') : l10n('is_high_disabled'); - $template->assign_block_vars( - 'user', + $template->append( + 'users', array( - 'CLASS' => ($num % 2 == 1) ? 'row2' : 'row1', 'ID' => $local_user['id'], 'CHECKED' => $checked, 'U_PROFILE' => $profile_url.$local_user['id'], @@ -861,7 +698,7 @@ foreach ($visible_user_list as $num => $local_user) 'PROPERTIES' => implode( ', ', $properties), ) ); - trigger_action('loc_assign_block_var_local_user_list', $local_user); + trigger_action('loc_append_user_list', $local_user); } // +-----------------------------------------------------------------------+ diff --git a/template/yoga/admin/user_list.tpl b/template/yoga/admin/user_list.tpl index 594ab9670..ffb0d651e 100644 --- a/template/yoga/admin/user_list.tpl +++ b/template/yoga/admin/user_list.tpl @@ -1,173 +1,147 @@ -<!-- DEV TAG: not smarty migrated --> +{* $Id$ *} <div class="titrePage"> <ul class="categoryActions"> - <li><a href="{U_HELP}" onclick="popuphelp(this.href); return false;" title="{lang:Help}"><img src="{themeconf:icon_dir}/help.png" class="button" alt="(?)"></a></li> + <li><a href="{$U_HELP}" onclick="popuphelp(this.href); return false;" title="{'Help'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/help.png" class="button" alt="(?)"></a></li> </ul> - <h2>{lang:title_liste_users}</h2> + <h2>{'title_liste_users'|@translate}</h2> </div> -<form class="filter" method="post" name="add_user" action="{F_ADD_ACTION}"> +<form class="filter" method="post" name="add_user" action="{$F_ADD_ACTION}"> <fieldset> - <legend>{lang:Add a user}</legend> - <label>{lang:Username} <input type="text" name="login" maxlength="50" size="20" /></label> - <label>{lang:Password} <input type="text" name="password" /></label> - <label>{lang:Email address} <input type="text" name="email" /></label> - <input class="submit" type="submit" name="submit_add" value="{lang:submit}" {TAG_INPUT_ENABLED} /> + <legend>{'Add a user'|@translate}</legend> + <label>{'Username'|@translate} <input type="text" name="login" maxlength="50" size="20" /></label> + <label>{'Password'|@translate} <input type="text" name="password" /></label> + <label>{'Email address'|@translate} <input type="text" name="email" /></label> + <input class="submit" type="submit" name="submit_add" value="{'submit'|@translate}" {$TAG_INPUT_ENABLED} /> </fieldset> </form> -<form class="filter" method="get" name="filter" action="{F_FILTER_ACTION}"> +<form class="filter" method="get" name="filter" action="{$F_FILTER_ACTION}"> <fieldset> - <legend>{lang:Filter}</legend> + <legend>{'Filter'|@translate}</legend> <input type="hidden" name="page" value="user_list" /> - <label>{lang:Username} <input type="text" name="username" value="{F_USERNAME}" /></label> + <label>{'Username'|@translate} <input type="text" name="username" value="{$F_USERNAME}" /></label> <label> - {lang:status} - <select name="status"> - <!-- BEGIN status_option --> - <option value="{status_option.VALUE}" {status_option.SELECTED} > {status_option.CONTENT}</option> - <!-- END status_option --> - </select> + {'status'|@translate} + {html_options name=status options=$status_options selected=$status_selected} </label> <label> - {lang:group} - <select name="group"> - <!-- BEGIN group_option --> - <option value="{group_option.VALUE}" {group_option.SELECTED} > {group_option.CONTENT}</option> - <!-- END group_option --> - </select> + {'group'|@translate} + {html_options name=group options=$group_options selected=$group_selected} </label> <label> - {lang:Order by} - <select name="order_by"> - <!-- BEGIN order_by --> - <option value="{order_by.VALUE}" {order_by.SELECTED} >{order_by.CONTENT}</option> - <!-- END order_by --> - </select> + {'Order by'|@translate} + {html_options name=order_by options=$order_options selected=$order_selected} </label> <label> - {lang:Sort order} - <select name="direction"> - <!-- BEGIN direction --> - <option value="{direction.VALUE}" {direction.SELECTED} >{direction.CONTENT}</option> - <!-- END direction --> - </select> + {'Sort order'|@translate} + {html_options name=direction options=$direction_options selected=$direction_selected} </label> - <input class="submit" type="submit" value="{lang:submit}" /> + <input class="submit" type="submit" value="{'submit'|@translate}" /> </fieldset> </form> -<form method="post" name="preferences" action="{F_PREF_ACTION}"> +<form method="post" name="preferences" action="{$F_PREF_ACTION}"> <table class="table2"> <tr class="throw"> <th> </th> - <th>{lang:Username}</th> - <th>{lang:user_status}</th> - <th>{lang:Email address}</th> - <th>{lang:Groups}</th> - <th>{lang:properties}</th> - <!-- BEGIN cpl_title_user --> - <th>{cpl_title_user.CAPTION}</th> - <!-- END cpl_title_user --> - <th>{lang:actions}</th> + <th>{'Username'|@translate}</th> + <th>{'user_status'|@translate}</th> + <th>{'Email address'|@translate}</th> + <th>{'Groups'|@translate}</th> + <th>{'properties'|@translate}</th> + {foreach from=$cpl_title_user item=title} + <th>{$title}</th> + {/foreach} + <th>{'actions'|@translate}</th> </tr> - <!-- BEGIN user --> - <tr class="{user.CLASS}"> - <td><input type="checkbox" name="selection[]" value="{user.ID}" {user.CHECKED} id="selection-{user.ID}" /></td> - <td><label for="selection-{user.ID}">{user.USERNAME}</label></td> - <td>{user.STATUS}</td> - <td>{user.EMAIL}</td> - <td>{user.GROUPS}</td> - <td>{user.PROPERTIES}</td> - <!-- BEGIN cpl_user --> - <td>{user.cpl_user.DATA}</td> - <!-- END cpl_user --> + {foreach from=$users item=user name=users_loop} + <tr class="{if $smarty.foreach.users_loop.index is odd}row1{else}row2{/if}"> + <td><input type="checkbox" name="selection[]" value="{$user.ID}" {$user.CHECKED} id="selection-{$user.ID}" /></td> + <td><label for="selection-{$user.ID}">{$user.USERNAME}</label></td> + <td>{$user.STATUS}</td> + <td>{$user.EMAIL}</td> + <td>{$user.GROUPS}</td> + <td>{$user.PROPERTIES}</td> + {foreach from=$cpl_user[$smarty.foreach.users_loop.index] item=data} + <td>{$data}</td> + {/foreach} <td style="text-align:center;"> - <a href="{user.U_PERM}"><img src="{themeconf:icon_dir}/permissions.png" class="button" style="border:none" alt="{lang:permissions}" title="{lang:permissions}" /></a> - <a href="{user.U_PROFILE}"><img src="{themeconf:icon_dir}/edit_s.png" class="button" style="border:none" alt="{lang:Profile}" title="{lang:Profile}" /></a> - <!-- BEGIN cpl_link_user --> - {user.cpl_link_user.DATA} - <!-- END cpl_link_user --> - </td> + <a href="{$user.U_PERM}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/permissions.png" class="button" style="border:none" alt="{'permissions'|@translate}" title="{'permissions'|@translate}" /></a> + <a href="{$user.U_PROFILE}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/edit_s.png" class="button" style="border:none" alt="{'Profile'|@translate}" title="{'Profile'|@translate}" /></a> + {foreach from=$cpl_link_user[$smarty.foreach.users_loop.index] item=data} + {$data} + {/foreach} + </td> </tr> - <!-- END user --> + {/foreach} </table> -<div class="navigationBar">{NAVBAR}</div> +<div class="navigationBar">{$NAVBAR}</div> -<!-- delete the selected users ? --> +{* delete the selected users ? *} <fieldset> - <legend>{lang:Deletions}</legend> - <label><input type="checkbox" name="confirm_deletion" value="1" /> {lang:confirm}</label> - <input class="submit" type="submit" value="{lang:Delete selected users}" name="delete" {TAG_INPUT_ENABLED}/> + <legend>{'Deletions'|@translate}</legend> + <label><input type="checkbox" name="confirm_deletion" value="1" /> {'confirm'|@translate}</label> + <input class="submit" type="submit" value="{'Delete selected users'|@translate}" name="delete" {$TAG_INPUT_ENABLED}/> </fieldset> <fieldset> - <legend>{lang:Status}</legend> + <legend>{'Status'|@translate}</legend> <table> <tr> - <td>{lang:Status}</td> + <td>{'Status'|@translate}</td> <td> - <label><input type="radio" name="status_action" value="leave" checked="checked" /> {lang:leave}</label> - <label><input type="radio" name="status_action" value="set" id="status_action_set" /> {lang:set to}</label> + <label><input type="radio" name="status_action" value="leave" checked="checked" /> {'leave'|@translate}</label> + <label><input type="radio" name="status_action" value="set" id="status_action_set" {$STATUS_ACTION_SET} /> {'set to'|@translate}</label> <select onmousedown="document.getElementById('status_action_set').checked = true;" name="status" size="1"> - <!-- BEGIN pref_status_option --> - <option {pref_status_option.SELECTED} value="{pref_status_option.VALUE}">{pref_status_option.CONTENT}</option> - <!-- END pref_status_option --> + {html_options options=$pref_status_options selected=$pref_status_selected} </select> </td> </tr> - <!-- BEGIN adviser --> + {if isset($adviser)} <tr> - <td>{lang:adviser}</td> + <td>{'adviser'|@translate}</td> <td> - <label><input type="radio" name="adviser" value="leave" checked="checked" /> {lang:leave}</label> - / {lang:set to} - <label><input type="radio" name="adviser" value="true" {ADVISER_YES} />{lang:yes}</label> - <label><input type="radio" name="adviser" value="false" {ADVISER_NO} />{lang:no}</label> + <label><input type="radio" name="adviser" value="leave" checked="checked" /> {'leave'|@translate}</label> + / {'set to'|@translate} + <label><input type="radio" name="adviser" value="true" {$ADVISER_YES} />{'yes'|@translate}</label> + <label><input type="radio" name="adviser" value="false" {$ADVISER_NO} />{'no'|@translate}</label> </td> </tr> - <!-- END adviser --> + {/if} </table> </fieldset> -<!-- form to set properties for many users at once --> +{* form to set properties for many users at once *} <fieldset> - <legend>{lang:Groups}</legend> + <legend>{'Groups'|@translate}</legend> <table> <tr> - <td>{lang:associate to group}</td> + <td>{'associate to group'|@translate}</td> <td> - <select name="associate" size="1"> - <!-- BEGIN associate_option --> - <option {associate_option.SELECTED} value="{associate_option.VALUE}">{associate_option.CONTENT}</option> - <!-- END associate_option --> - </select> + {html_options name=associate options=$association_options selected=$associate_selected} </td> </tr> <tr> - <td>{lang:dissociate from group}</td> + <td>{'dissociate from group'|@translate}</td> <td> - <select name="dissociate" size="1"> - <!-- BEGIN dissociate_option --> - <option {dissociate_option.SELECTED} value="{dissociate_option.VALUE}">{dissociate_option.CONTENT}</option> - <!-- END dissociate_option --> - </select> + {html_options name=dissociate options=$association_options selected=$dissociate_selected} </td> </tr> @@ -175,31 +149,29 @@ </fieldset> -<!-- Properties --> +{* Properties *} <fieldset> - <legend>{lang:properties}</legend> + <legend>{'properties'|@translate}</legend> <table> <tr> - <td>{lang:enabled_high}</td> + <td>{'enabled_high'|@translate}</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} />{lang:yes}</label> - <label><input type="radio" name="enabled_high" value="false" {ENABLED_HIGH_NO} />{lang:no}</label> + <label><input type="radio" name="enabled_high" value="leave" checked="checked" /> {'leave'|@translate}</label> + / {'set to'|@translate} + <label><input type="radio" name="enabled_high" value="true" {$ENABLED_HIGH_YES} />{'yes'|@translate}</label> + <label><input type="radio" name="enabled_high" value="false" {$ENABLED_HIGH_NO} />{'no'|@translate}</label> </td> </tr> <tr> - <td>{lang:Privacy level}</td> + <td>{'Privacy level'|@translate}</td> <td> - <label><input type="radio" name="level_action" value="leave" checked="checked" />{lang:leave}</label> - <label><input type="radio" name="level_action" value="set" id="level_action_set" />{lang:set to}</label> + <label><input type="radio" name="level_action" value="leave" checked="checked" />{'leave'|@translate}</label> + <label><input type="radio" name="level_action" value="set" id="level_action_set" {$LEVEL_ACTION_SET} />{'set to'|@translate}</label> <select onmousedown="document.getElementById('level_action_set').checked = true;" name="level" size="1"> - <!-- BEGIN level_option --> - <option {level_option.SELECTED} value="{level_option.VALUE}">{level_option.CONTENT} ({level_option.VALUE})</option> - <!-- END level_option --> + {html_options options=$level_options selected=$level_selected} </select> </td> </tr> @@ -208,118 +180,114 @@ </fieldset> -<!-- preference --> +{* preference *} <fieldset> - <legend>{lang:Preferences}</legend> + <legend>{'Preferences'|@translate}</legend> <table> <tr> - <td>{lang:nb_image_per_row}</td> + <td>{'nb_image_per_row'|@translate}</td> <td> - <label><input type="radio" name="nb_image_line_action" value="leave" checked="checked" /> {lang:leave}</label> - <label><input type="radio" name="nb_image_line_action" value="set" id="nb_image_line_action_set" /> {lang:set to}</label> + <label><input type="radio" name="nb_image_line_action" value="leave" checked="checked" /> {'leave'|@translate}</label> + <label><input type="radio" name="nb_image_line_action" value="set" id="nb_image_line_action_set" {$NB_IMAGE_LINE_ACTION_SET} /> {'set to'|@translate}</label> <input onmousedown="document.getElementById('nb_image_line_action_set').checked = true;" - size="3" maxlength="2" type="text" name="nb_image_line" value="{NB_IMAGE_LINE}" /> + size="3" maxlength="2" type="text" name="nb_image_line" value="{$NB_IMAGE_LINE}" /> </td> </tr> <tr> - <td>{lang:nb_row_per_page}</td> + <td>{'nb_row_per_page'|@translate}</td> <td> - <label><input type="radio" name="nb_line_page_action" value="leave" checked="checked" /> {lang:leave}</label> - <label><input type="radio" name="nb_line_page_action" value="set" id="nb_line_page_action_set" /> {lang:set to}</label> + <label><input type="radio" name="nb_line_page_action" value="leave" checked="checked" /> {'leave'|@translate}</label> + <label><input type="radio" name="nb_line_page_action" value="set" id="nb_line_page_action_set" {$NB_LINE_PAGE_ACTION_SET} /> {'set to'|@translate}</label> <input onmousedown="document.getElementById('nb_line_page_action_set').checked = true;" - size="3" maxlength="2" type="text" name="nb_line_page" value="{NB_LINE_PAGE}" /> + size="3" maxlength="2" type="text" name="nb_line_page" value="{$NB_LINE_PAGE}" /> <td> </tr> <tr> - <td>{lang:theme}</td> + <td>{'theme'|@translate}</td> <td> - <label><input type="radio" name="template_action" value="leave" checked="checked" /> {lang:leave}</label> - <label><input type="radio" name="template_action" value="set" id="template_action_set" /> {lang:set to}</label> + <label><input type="radio" name="template_action" value="leave" checked="checked" /> {'leave'|@translate}</label> + <label><input type="radio" name="template_action" value="set" id="template_action_set" {$TEMPLATE_ACTION_SET} /> {'set to'|@translate}</label> <select onmousedown="document.getElementById('template_action_set').checked = true;" name="template" size="1"> - <!-- BEGIN template_option --> - <option {template_option.SELECTED} value="{template_option.VALUE}">{template_option.CONTENT}</option> - <!-- END template_option --> + {html_options values=$template_options output=$template_options selected=$template_selected} </select> </td> </tr> <tr> - <td>{lang:language}</td> + <td>{'language'|@translate}</td> <td> - <label><input type="radio" name="language_action" value="leave" checked="checked" /> {lang:leave}</label> - <label><input type="radio" name="language_action" value="set" id="language_action_set" /> {lang:set to}</label> + <label><input type="radio" name="language_action" value="leave" checked="checked" /> {'leave'|@translate}</label> + <label><input type="radio" name="language_action" value="set" id="language_action_set" {$LANGUAGE_ACTION_SET} /> {'set to'|@translate}</label> <select onmousedown="document.getElementById('language_action_set').checked = true;" name="language" size="1"> - <!-- BEGIN language_option --> - <option {language_option.SELECTED} value="{language_option.VALUE}">{language_option.CONTENT}</option> - <!-- END language_option --> + {html_options options=$language_options selected=$language_selected} </select> </td> </tr> <tr> - <td>{lang:recent_period}</td> + <td>{'recent_period'|@translate}</td> <td> - <label><input type="radio" name="recent_period_action" value="leave" checked="checked" /> {lang:leave}</label> - <label><input type="radio" name="recent_period_action" value="set" id="recent_period_action_set" /> {lang:set to}</label> + <label><input type="radio" name="recent_period_action" value="leave" checked="checked" /> {'leave'|@translate}</label> + <label><input type="radio" name="recent_period_action" value="set" id="recent_period_action_set" {$RECENT_PERIOD_ACTION_SET} /> {'set to'|@translate}</label> <input onmousedown="document.getElementById('recent_period_action_set').checked = true;" - type="text" size="3" maxlength="2" name="recent_period" value="{RECENT_PERIOD}" /> + type="text" size="3" maxlength="2" name="recent_period" value="{$RECENT_PERIOD}" /> </td> </tr> <tr> - <td>{lang:auto_expand}</td> + <td>{'auto_expand'|@translate}</td> <td> - <label><input type="radio" name="expand" value="leave" checked="checked" /> {lang:leave}</label> - / {lang:set to} - <label><input type="radio" name="expand" value="true" {EXPAND_YES} />{lang:yes}</label> - <label><input type="radio" name="expand" value="false" {EXPAND_NO} />{lang:no}</label> + <label><input type="radio" name="expand" value="leave" checked="checked" /> {'leave'|@translate}</label> + / {'set to'|@translate} + <label><input type="radio" name="expand" value="true" {$EXPAND_YES} />{'yes'|@translate}</label> + <label><input type="radio" name="expand" value="false" {$EXPAND_NO} />{'no'|@translate}</label> </td> </tr> <tr> - <td>{lang:show_nb_comments}</td> + <td>{'show_nb_comments'|@translate}</td> <td> - <label><input type="radio" name="show_nb_comments" value="leave" checked="checked" /> {lang:leave}</label> - / {lang:set to} - <label><input type="radio" name="show_nb_comments" value="true" {SHOW_NB_COMMENTS_YES} />{lang:yes}</label> - <label><input type="radio" name="show_nb_comments" value="false" {SHOW_NB_COMMENTS_NO} />{lang:no}</label> + <label><input type="radio" name="show_nb_comments" value="leave" checked="checked" /> {'leave'|@translate}</label> + / {'set to'|@translate} + <label><input type="radio" name="show_nb_comments" value="true" {$SHOW_NB_COMMENTS_YES} />{'yes'|@translate}</label> + <label><input type="radio" name="show_nb_comments" value="false" {$SHOW_NB_COMMENTS_NO} />{'no'|@translate}</label> </td> </tr> <tr> - <td>{lang:show_nb_hits}</td> + <td>{'show_nb_hits'|@translate}</td> <td> - <label><input type="radio" name="show_nb_hits" value="leave" checked="checked" /> {lang:leave}</label> - / {lang:set to} - <label><input type="radio" name="show_nb_hits" value="true" {SHOW_NB_HITS_YES} />{lang:yes}</label> - <label><input type="radio" name="show_nb_hits" value="false" {SHOW_NB_HITS_NO} />{lang:no}</label> + <label><input type="radio" name="show_nb_hits" value="leave" checked="checked" /> {'leave'|@translate}</label> + / {'set to'|@translate} + <label><input type="radio" name="show_nb_hits" value="true" {$SHOW_NB_HITS_YES} />{'yes'|@translate}</label> + <label><input type="radio" name="show_nb_hits" value="false" {$SHOW_NB_HITS_NO} />{'no'|@translate}</label> </td> </tr> <tr> - <td>{lang:maxwidth}</td> + <td>{'maxwidth'|@translate}</td> <td> - <label><input type="radio" name="maxwidth_action" value="leave" checked="checked" /> {lang:leave}</label> - <label><input type="radio" name="maxwidth_action" value="unset" /> {lang:unset}</label> - <label><input type="radio" name="maxwidth_action" value="set" id="maxwidth_action_set" /> {lang:set to}</label> + <label><input type="radio" name="maxwidth_action" value="leave" checked="checked" /> {'leave'|@translate}</label> + <label><input type="radio" name="maxwidth_action" value="unset" /> {'unset'|@translate}</label> + <label><input type="radio" name="maxwidth_action" value="set" id="maxwidth_action_set" {$MAXWIDTH_ACTION_SET} /> {'set to'|@translate}</label> <input onmousedown="document.getElementById('maxwidth_action_set').checked = true;" - type="text" size="4" maxlength="4" name="maxwidth" value="{MAXWIDTH}" /> + type="text" size="4" maxlength="4" name="maxwidth" value="{$MAXWIDTH}" /> </td> </tr> <tr> - <td>{lang:maxheight}</td> + <td>{'maxheight'|@translate}</td> <td> - <label><input type="radio" name="maxheight_action" value="leave" checked="checked" /> {lang:leave}</label> - <label><input type="radio" name="maxheight_action" value="unset" /> {lang:unset}</label> - <label><input type="radio" name="maxheight_action" value="set" id="maxheight_action_set" /> {lang:set to}</label> + <label><input type="radio" name="maxheight_action" value="leave" checked="checked" /> {'leave'|@translate}</label> + <label><input type="radio" name="maxheight_action" value="unset" /> {'unset'|@translate}</label> + <label><input type="radio" name="maxheight_action" value="set" id="maxheight_action_set" {$MAXHEIGHT_ACTION_SET} /> {'set to'|@translate}</label> <input onmousedown="document.getElementById('maxheight_action_set').checked = true;" - type="text" size="4" maxlength="4" name="maxheight" value="{MAXHEIGHT}" /> + type="text" size="4" maxlength="4" name="maxheight" value="{$MAXHEIGHT}" /> </td> </tr> @@ -329,14 +297,14 @@ </fieldset> <p> - {lang:target} - <label><input type="radio" name="target" value="all" /> {lang:all}</label> - <label><input type="radio" name="target" value="selection" checked="checked" /> {lang:selection}</label> + {'target'|@translate} + <label><input type="radio" name="target" value="all" /> {'all'|@translate}</label> + <label><input type="radio" name="target" value="selection" checked="checked" /> {'selection'|@translate}</label> </p> <p> - <input class="submit" type="submit" value="{lang:submit}" name="pref_submit" {TAG_INPUT_ENABLED} /> - <input class="submit" type="reset" value="{lang:reset}" name="pref_reset" /> + <input class="submit" type="submit" value="{'submit'|@translate}" name="pref_submit" {$TAG_INPUT_ENABLED} /> + <input class="submit" type="reset" value="{'reset'|@translate}" name="pref_reset" /> </p> </form> |