added: html/fun_pw.html
default view for pw winix function git-svn-id: svn://ttmath.org/publicrep/winix/trunk@815 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
parent
e61f0db57e
commit
6c2c12fe5e
|
@ -122,8 +122,6 @@ Users::SizeType Users::Size()
|
||||||
|
|
||||||
User & Users::operator[](Users::SizeType pos)
|
User & Users::operator[](Users::SizeType pos)
|
||||||
{
|
{
|
||||||
// !! IMPROVE ME
|
|
||||||
// add checking the range and returning an empty User struct if out of range
|
|
||||||
return table[pos];
|
return table[pos];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
<h1>Pw</h1>
|
||||||
|
|
||||||
|
[if user_tab]
|
||||||
|
<table class="tablec">
|
||||||
|
<tr>
|
||||||
|
<th>{pw_table_no}</th>
|
||||||
|
<th>{pw_table_login}</th>
|
||||||
|
<th>{pw_table_is_root}</th>
|
||||||
|
<th>{pw_table_is_active}</th>
|
||||||
|
<th>{pw_table_is_suspended}</th>
|
||||||
|
<th>{pw_table_is_banned}</th>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
[for user_tab]
|
||||||
|
<tr class="[if-index odd]roweven[else]rowodd[end]">
|
||||||
|
<td>[user_tab_index]</td>
|
||||||
|
<td>[user_tab_name]</td>
|
||||||
|
<td>[if user_tab_is_super_user]{pw_table_yes}[end]</td>
|
||||||
|
<td>[if user_tab_is_active]{pw_table_yes}[end]</td>
|
||||||
|
<td>[if user_tab_is_suspended]{pw_table_yes}[end]</td>
|
||||||
|
<td>[if user_tab_is_blocked]{pw_table_yes}[end]</td>
|
||||||
|
</tr>
|
||||||
|
[end]
|
||||||
|
</table>
|
||||||
|
[end]
|
||||||
|
|
||||||
|
|
11
locale/en
11
locale/en
|
@ -178,6 +178,17 @@ priv_for_all_dirs = For all directories to
|
||||||
priv_change_all = Change subdirectories as well
|
priv_change_all = Change subdirectories as well
|
||||||
priv_change_current_dir = Change also the current directory
|
priv_change_current_dir = Change also the current directory
|
||||||
|
|
||||||
|
pw_header = Users
|
||||||
|
pw_table_no = No
|
||||||
|
pw_table_login = Login
|
||||||
|
pw_table_is_root = Is Root
|
||||||
|
pw_table_is_active = Is active
|
||||||
|
pw_table_is_suspended = Is suspended
|
||||||
|
pw_table_is_banned = Is banned
|
||||||
|
pw_table_yes = yes
|
||||||
|
pw_table_no = no
|
||||||
|
|
||||||
|
|
||||||
reload_header = Reload
|
reload_header = Reload
|
||||||
reload_select = Choose an item to reload
|
reload_select = Choose an item to reload
|
||||||
reload_templates = html templates
|
reload_templates = html templates
|
||||||
|
|
11
locale/pl
11
locale/pl
|
@ -199,6 +199,17 @@ priv_change_all = Zmień także w podkatalogach
|
||||||
priv_change_current_dir = Zmień także sam katalog bieżący
|
priv_change_current_dir = Zmień także sam katalog bieżący
|
||||||
|
|
||||||
|
|
||||||
|
pw_header = Użytkownicy
|
||||||
|
pw_table_no = L.p.
|
||||||
|
pw_table_login = Login
|
||||||
|
pw_table_is_root = Root
|
||||||
|
pw_table_is_active = Aktywny
|
||||||
|
pw_table_is_suspended = Wstrzymany
|
||||||
|
pw_table_is_banned = Zbanowany
|
||||||
|
pw_table_yes = tak
|
||||||
|
pw_table_no = nie
|
||||||
|
|
||||||
|
|
||||||
reload_header = Przeładuj
|
reload_header = Przeładuj
|
||||||
reload_select = Wybierz pozycję
|
reload_select = Wybierz pozycję
|
||||||
reload_templates = szablony html
|
reload_templates = szablony html
|
||||||
|
|
|
@ -503,9 +503,13 @@ void Templates::CreateFunctions()
|
||||||
ezc_functions.Insert("user_can_use_bbcode", user_can_use_bbcode);
|
ezc_functions.Insert("user_can_use_bbcode", user_can_use_bbcode);
|
||||||
ezc_functions.Insert("user_can_use_raw", user_can_use_raw);
|
ezc_functions.Insert("user_can_use_raw", user_can_use_raw);
|
||||||
ezc_functions.Insert("user_tab", user_tab);
|
ezc_functions.Insert("user_tab", user_tab);
|
||||||
|
ezc_functions.Insert("user_tab_index", user_tab_index);
|
||||||
ezc_functions.Insert("user_tab_id", user_tab_id);
|
ezc_functions.Insert("user_tab_id", user_tab_id);
|
||||||
ezc_functions.Insert("user_tab_name", user_tab_name);
|
ezc_functions.Insert("user_tab_name", user_tab_name);
|
||||||
ezc_functions.Insert("user_tab_is_super_user", user_tab_is_super_user);
|
ezc_functions.Insert("user_tab_is_super_user", user_tab_is_super_user);
|
||||||
|
ezc_functions.Insert("user_tab_is_active", user_tab_is_active);
|
||||||
|
ezc_functions.Insert("user_tab_is_suspended", user_tab_is_suspended);
|
||||||
|
ezc_functions.Insert("user_tab_is_blocked", user_tab_is_blocked);
|
||||||
ezc_functions.Insert("user_tab_is_current", user_tab_is_current);
|
ezc_functions.Insert("user_tab_is_current", user_tab_is_current);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -421,9 +421,13 @@ namespace TemplatesFunctions
|
||||||
void user_can_use_bbcode(Info & i);
|
void user_can_use_bbcode(Info & i);
|
||||||
void user_can_use_raw(Info & i);
|
void user_can_use_raw(Info & i);
|
||||||
void user_tab(Info & i);
|
void user_tab(Info & i);
|
||||||
|
void user_tab_index(Info & i);
|
||||||
void user_tab_id(Info & i);
|
void user_tab_id(Info & i);
|
||||||
void user_tab_name(Info & i);
|
void user_tab_name(Info & i);
|
||||||
void user_tab_is_super_user(Info & i);
|
void user_tab_is_super_user(Info & i);
|
||||||
|
void user_tab_is_active(Info & i);
|
||||||
|
void user_tab_is_suspended(Info & i);
|
||||||
|
void user_tab_is_blocked(Info & i);
|
||||||
void user_tab_is_current(Info & i);
|
void user_tab_is_current(Info & i);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* This file is a part of Winix
|
* This file is a part of Winix
|
||||||
* and is not publicly distributed
|
* and is not publicly distributed
|
||||||
*
|
*
|
||||||
* Copyright (c) 2008-2010, Tomasz Sowa
|
* Copyright (c) 2008-2012, Tomasz Sowa
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -117,6 +117,11 @@ void user_tab(Info & i)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void user_tab_index(Info & i)
|
||||||
|
{
|
||||||
|
i.out << (user_index+1);
|
||||||
|
}
|
||||||
|
|
||||||
void user_tab_id(Info & i)
|
void user_tab_id(Info & i)
|
||||||
{
|
{
|
||||||
if( user_index < system->users.Size() )
|
if( user_index < system->users.Size() )
|
||||||
|
@ -138,6 +143,26 @@ void user_tab_is_super_user(Info & i)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void user_tab_is_active(Info & i)
|
||||||
|
{
|
||||||
|
if( user_index < system->users.Size() )
|
||||||
|
i.res = system->users[user_index].status == WINIX_ACCOUNT_READY;
|
||||||
|
}
|
||||||
|
|
||||||
|
void user_tab_is_suspended(Info & i)
|
||||||
|
{
|
||||||
|
if( user_index < system->users.Size() )
|
||||||
|
i.res = system->users[user_index].status == WINIX_ACCOUNT_SUSPENDED;
|
||||||
|
}
|
||||||
|
|
||||||
|
void user_tab_is_blocked(Info & i)
|
||||||
|
{
|
||||||
|
if( user_index < system->users.Size() )
|
||||||
|
i.res = system->users[user_index].status == WINIX_ACCOUNT_BLOCKED;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void user_tab_is_current(Info & i)
|
void user_tab_is_current(Info & i)
|
||||||
{
|
{
|
||||||
if( user_index < system->users.Size() && cur->session->puser )
|
if( user_index < system->users.Size() && cur->session->puser )
|
||||||
|
|
Loading…
Reference in New Issue