Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Игорь
vtorpoisk
Commits
9f4f2745
Commit
9f4f2745
authored
Mar 01, 2021
by
Игорь
Browse files
init
parent
a765cdc4
Changes
1000
Show whitespace changes
Inline
Side-by-side
Too many changes to show.
To preserve performance only
1000 of 1000+
files are displayed.
Plain diff
Email patch
apps/arm/modules/main/templates/eventSuccess.php
0 → 100644
View file @
9f4f2745
apps/arm/modules/main/templates/indexSuccess.php
0 → 100644
View file @
9f4f2745
<?php
?>
apps/arm/modules/main/templates/profileSuccess.php
0 → 100644
View file @
9f4f2745
<?php
use_helper
(
'I18N'
,
'Date'
)
?>
<div
class=
"lui_form_layer"
>
<span
style=
"margin-left: 16px;"
class=
"lui__h1"
>
<?php
echo
__
(
'Профиль'
,
array
(),
'messages'
)
?>
</span>
<i
class=
"br15 hidden_element"
></i>
<div
class=
"lui__list_actions__wrapper"
>
<ul
class=
"sf_admin_actions sf_admin_actions__pseudo"
>
<li
class=
"sf_admin_action_save"
><input
type=
"submit"
value=
"Сохранить"
></li>
<li
style=
"visibility:hidden;"
><input
type=
"submit"
></li>
</ul>
<?php
if
(
!
$sf_request
->
isXmlHttpRequest
())
:
?>
<script
type=
"text/javascript"
>
$
(
document
).
ready
(
function
()
{
$
(
'
.sf_admin_actions input
'
).
click
(
function
()
{
$
(
this
).
closest
(
'
.lui_form_layer
'
).
find
(
'
form
'
).
append
(
'
<input type="hidden" name="
'
+
$
(
this
).
attr
(
"
name
"
)
+
'
">
'
);
$
(
this
).
closest
(
'
.lui_form_layer
'
).
find
(
'
form
'
).
submit
();
});
});
</script>
<?php
endif
;
?>
</div>
<?php
if
(
$sf_user
->
hasFlash
(
'notice'
))
:
?>
<i
class=
"lui__notice
<?php
echo
(
!
$sf_request
->
isXmlHttpRequest
()
?
' lui__notice__no_ajax'
:
''
);
?>
"
>
<?php
echo
__
(
$sf_user
->
getFlash
(
'notice'
),
array
(),
'sf_admin'
)
?>
</i>
<?php
endif
;
?>
<?php
if
(
$sf_user
->
hasFlash
(
'error'
))
:
?>
<i
class=
"lui__error
<?php
echo
(
!
$sf_request
->
isXmlHttpRequest
()
?
' lui__error__no_ajax'
:
''
);
?>
"
>
<?php
echo
__
(
$sf_user
->
getFlash
(
'error'
),
array
(),
'sf_admin'
)
?>
</i>
<?php
endif
;
?>
<?php
if
(
$sf_user
->
hasFlash
(
'restrict_error'
))
:
?>
<span
class=
"lui__error lui__restrict_error
<?php
echo
(
!
$sf_request
->
isXmlHttpRequest
()
?
' lui__error__no_ajax'
:
''
);
?>
"
>
<?php
echo
htmlspecialchars_decode
(
$sf_user
->
getFlash
(
'restrict_error'
))
?>
</span>
<?php
endif
;
?>
<?php
if
(
$form
->
hasGlobalErrors
())
:
?>
<?php
echo
$form
->
renderGlobalErrors
()
?>
<?php
endif
;
?>
<?php
use_stylesheets_for_form
(
$form
)
?>
<?php
use_javascripts_for_form
(
$form
)
?>
<?php
echo
'<form method="post" action="'
.
url_for
(
'@profile'
)
.
'">'
?>
<div
id=
"lui_scroller"
class=
"lui__scroller_class"
>
<div
class=
"lui__scroller_wrapper"
style=
"position:relative;z-index:102;padding-left:10px;"
>
<fieldset>
<?php
echo
$form
->
renderHiddenFields
();
echo
$form
->
renderGlobalErrors
();
foreach
(
$form
as
$name
=>
$field
)
{
if
(
!
$form
[
$name
]
->
isHidden
())
{
$attributes
=
array
();
$help
=
null
;
$opts
=
$form
[
$name
]
->
getWidget
()
->
getOptions
();
$class
=
'sf_admin_form_row sf_admin_'
.
strtolower
(
$opts
[
'type'
])
.
' sf_admin_form_field_'
.
$name
;
?>
<div
class=
"
<?php
echo
$class
?><?php
$form
[
$name
]
->
hasError
()
and
print
' errors'
?>
"
>
<div>
<?php
$opts
=
$form
[
$name
]
->
getWidget
()
->
getOptions
();
?>
<?php
if
(
$opts
[
'type'
]
==
'checkbox'
)
:
?>
<div
class=
"content"
>
<label>
<?php
echo
$form
[
$name
]
->
render
(
$attributes
instanceof
sfOutputEscaper
?
$attributes
->
getRawValue
()
:
$attributes
);
?><?php
echo
$label
;
?>
</label>
</div>
<?php
else
:
?>
<span
class=
"inline-label"
>
<?php
echo
$form
[
$name
]
->
renderLabel
()
?>
</span>
<div
class=
"content"
>
<?php
echo
$form
[
$name
]
->
render
(
$attributes
instanceof
sfOutputEscaper
?
$attributes
->
getRawValue
()
:
$attributes
)
?>
<?php
echo
$form
[
$name
]
->
renderError
()
?>
<?php
if
(
$help
)
:
?>
<span
class=
"help"
>
<?php
echo
__
(
$help
,
array
(),
'messages'
)
?>
</span>
<?php
elseif
(
$help
=
$form
[
$name
]
->
renderHelp
())
:
?>
<span
class=
"help"
>
<?php
echo
strip_tags
(
$help
,
'<a><i>'
)
?>
</span>
<?php
endif
;
?>
</div>
<?php
endif
;
?>
</div>
</div>
<?php
}
}
?>
</fieldset>
<span
class=
"br30"
></span>
</div>
</div>
</form>
</div>
\ No newline at end of file
apps/arm/modules/main/templates/versionSuccess.php
0 → 100644
View file @
9f4f2745
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>
<?php
include_slot
(
'title'
,
sfConfig
::
get
(
'app_arm_title'
));
?>
</title>
<link
rel=
"shortcut icon"
href=
"/i/favicon.ico"
type=
"image/x-icon"
/>
<link
rel=
"alternate stylesheet"
type=
"text/css"
href=
"resource://gre-resources/plaintext.css"
title=
"Переносить длинные строки"
>
</head>
<body>
<pre>
<?php
echo
file_get_contents
(
sfConfig
::
get
(
'sf_data_dir'
)
.
'/version.txt'
);
?>
</pre>
</body>
</html>
\ No newline at end of file
apps/arm/modules/main_menu/actions/actions.class.php
0 → 100644
View file @
9f4f2745
<?php
require_once
dirname
(
__FILE__
)
.
'/../lib/main_menuGeneratorConfiguration.class.php'
;
require_once
dirname
(
__FILE__
)
.
'/../lib/main_menuGeneratorHelper.class.php'
;
/**
* main_menu actions.
*
* @package sf
* @subpackage main_menu
* @author Atma
* @version SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
*/
class
main_menuActions
extends
autoMain_menuActions
{
}
apps/arm/modules/main_menu/config/generator.yml
0 → 100644
View file @
9f4f2745
generator
:
class
:
sfDoctrineGenerator
param
:
model_class
:
MainMenu
theme
:
admin
non_verbose_templates
:
true
with_show
:
false
singular
:
~
plural
:
~
route_prefix
:
main_menu
with_doctrine_route
:
true
actions_base_class
:
sfActions
order
:
40
config
:
actions
:
~
fields
:
id
:
{
label
:
'
№'
}
title
:
{
label
:
Название
}
link
:
{
label
:
Ссылка
}
is_activated
:
{
label
:
Опубликован
}
order_id
:
{
label
:
Сортировка
}
list
:
layout
:
~
title
:
'
Главное
меню'
display
:
[
title
,
link
,
order_id
,
is_activated
]
max_per_page
:
100
object_actions
:
_delete
:
~
_edit
:
~
search
:
fields
:
false
export
:
false
filter
:
class
:
false
form
:
~
edit
:
title
:
Редактирование ссылки главного меню
new
:
title
:
Новая ссылка главного меню
\ No newline at end of file
apps/arm/modules/main_menu/lib/main_menuGeneratorConfiguration.class.php
0 → 100644
View file @
9f4f2745
<?php
/**
* main_menu module configuration.
*
* @package sf
* @subpackage main_menu
* @author Atma
* @version SVN: $Id: configuration.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
*/
class
main_menuGeneratorConfiguration
extends
BaseMain_menuGeneratorConfiguration
{
}
apps/arm/modules/main_menu/lib/main_menuGeneratorHelper.class.php
0 → 100644
View file @
9f4f2745
<?php
/**
* main_menu module helper.
*
* @package sf
* @subpackage main_menu
* @author Atma
* @version SVN: $Id: helper.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
*/
class
main_menuGeneratorHelper
extends
BaseMain_menuGeneratorHelper
{
}
apps/arm/modules/page/actions/actions.class.php
0 → 100644
View file @
9f4f2745
<?php
require_once
dirname
(
__FILE__
)
.
'/../lib/pageGeneratorConfiguration.class.php'
;
require_once
dirname
(
__FILE__
)
.
'/../lib/pageGeneratorHelper.class.php'
;
/**
* page actions.
*
* @package chrisal
* @subpackage page
* @author SyLord
* @version SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
*/
class
pageActions
extends
autoPageActions
{
public
function
executeUpload
(
sfWebRequest
$request
)
{
echo
Page
::
uploader
(
$request
->
getFiles
(
'file'
),
$request
->
getParameter
(
'key'
),
'file'
);
return
sfView
::
NONE
;
}
public
function
executeJcrop
(
sfWebRequest
$request
)
{
$result
=
'error'
;
if
(
$request
->
isMethod
(
'POST'
))
{
$c
=
strip_tags
(
$request
->
getParameter
(
'c'
));
$key
=
strip_tags
(
$request
->
getParameter
(
'key'
));
$size
=
strip_tags
(
$request
->
getParameter
(
'size'
));
if
(
is_array
(
$cfg_sizes
=
sfConfig
::
get
(
'image_'
.
$key
.
'_sizes'
)))
{
$this_cfg_size
=
$cfg_sizes
[
$size
];
if
(
$this_cfg_size
&&
$this_cfg_size
[
'jcrop'
])
{
$min_width
=
$this_cfg_size
[
'width'
];
$min_height
=
$this_cfg_size
[
'height'
];
if
((
$request
->
getParameter
(
'w'
)
*
$c
)
>
$min_width
&&
(
$request
->
getParameter
(
'h'
)
*
$c
)
>
$min_height
)
{
$img
=
new
sfImage
(
sfConfig
::
get
(
'sf_upload_dir'
)
.
'/f/'
.
$request
->
getParameter
(
'src'
));
$img
->
setQuality
(
100
);
@
$img
->
crop
((
$request
->
getParameter
(
'x'
)
*
$c
),
(
$request
->
getParameter
(
'y'
)
*
$c
),
(
$request
->
getParameter
(
'w'
)
*
$c
),
(
$request
->
getParameter
(
'h'
)
*
$c
));
@
$img
->
thumbnail
(
$min_width
,
$min_height
,
$this_cfg_size
[
'thumbstyle'
]
?
$this_cfg_size
[
'thumbstyle'
]
:
'scale'
);
$image_src
=
sfConfig
::
get
(
'sf_upload_dir'
)
.
'/f/'
.
str_replace
(
'.'
,
'-'
.
$size
.
'.'
,
$request
->
getParameter
(
'src'
));
$content_type
=
mime_content_type
(
sfConfig
::
get
(
'sf_upload_dir'
)
.
'/f/'
.
$request
->
getParameter
(
'src'
));
if
(
$content_type
===
'application/octet-stream'
&&
extension_loaded
(
'gd'
)
&&
extension_loaded
(
'exif'
)){
$content_type
=
image_type_to_mime_type
(
exif_imagetype
(
sfConfig
::
get
(
'sf_upload_dir'
)
.
'/f/'
.
$request
->
getParameter
(
'src'
)));
}
@
$img
->
saveAs
(
$image_src
,
$content_type
);
if
(
$cfg_sizes
[
$size
][
'watermark'
])
{
Page
::
watermarkAdd
(
$image_src
);
}
$result
=
'ok'
;
}
else
{
$result
=
'small'
;
}
}
}
}
echo
$result
;
return
sfView
::
NONE
;
}
}
apps/arm/modules/page/config/generator.yml
0 → 100644
View file @
9f4f2745
generator
:
class
:
sfDoctrineGenerator
param
:
model_class
:
Page
theme
:
admin
non_verbose_templates
:
true
with_show
:
false
singular
:
~
plural
:
~
route_prefix
:
page
with_doctrine_route
:
true
actions_base_class
:
sfActions
order
:
13000
hr
:
true
skip
:
true
config
:
actions
:
~
fields
:
title
:
{
label
:
Заголовок
}
body
:
{
label
:
Текст страницы
}
images
:
{
label
:
Изображения
}
is_activated
:
{
label
:
Опубликована
}
alias
:
{
label
:
Алиас
}
list
:
layout
:
~
title
:
Страницы
display
:
[
=title
,
is_activated
]
params
:
|
%%%% %%title%%
max_per_page
:
30
object_actions
:
_delete
:
~
_edit
:
~
filter
:
class
:
false
form
:
~
edit
:
title
:
Редактирование страницы
new
:
title
:
Новая страница
apps/arm/modules/page/lib/pageGeneratorConfiguration.class.php
0 → 100644
View file @
9f4f2745
<?php
/**
* page module configuration.
*
* @package chrisal
* @subpackage page
* @author SyLord
* @version SVN: $Id: configuration.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
*/
class
pageGeneratorConfiguration
extends
BasePageGeneratorConfiguration
{
public
function
getListActions
()
{
return
array
();
}
public
function
getListBatchActions
()
{
return
array
();
}
public
function
getListObjectActions
()
{
return
array
(
'_edit'
=>
NULL
);
}
public
function
getFormActions
()
{
return
array
(
'_list'
=>
NULL
,
'_save'
=>
NULL
,
'_save_and_add'
=>
NULL
,
'_save_and_list'
=>
NULL
);
}
}
apps/arm/modules/page/lib/pageGeneratorHelper.class.php
0 → 100644
View file @
9f4f2745
<?php
/**
* page module helper.
*
* @package chrisal
* @subpackage page
* @author SyLord
* @version SVN: $Id: helper.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
*/
class
pageGeneratorHelper
extends
BasePageGeneratorHelper
{
}
apps/arm/modules/permission/actions/actions.class.php
0 → 100644
View file @
9f4f2745
<?php
require_once
dirname
(
__FILE__
)
.
'/../lib/permissionGeneratorConfiguration.class.php'
;
require_once
dirname
(
__FILE__
)
.
'/../lib/permissionGeneratorHelper.class.php'
;
class
permissionActions
extends
autoPermissionActions
{
public
function
executeIndex
(
sfWebRequest
$request
)
{
if
(
$request
->
hasParameter
(
'build'
)){
Permission
::
build
(
$request
->
getParameter
(
'm'
));
}
parent
::
executeIndex
(
$request
);
}
}
apps/arm/modules/permission/actions/components.class.php
0 → 100644
View file @
9f4f2745
<?php
class
permissionComponents
extends
sfComponents
{
public
function
executeMap
(
sfWebRequest
$request
)
{
$permissions_q
=
Doctrine_Query
::
create
()
->
select
(
"p.*"
)
->
from
(
"Permission p"
)
->
orderBy
(
"p.description ASC"
);
if
(
isset
(
$this
->
allow_group_id
)
&&
$this
->
allow_group_id
){
$permissions_q
->
innerJoin
(
"p.UserGroupPermissions u"
)
->
where
(
"u.user_group_id = ?"
,
$this
->
allow_group_id
);
}
$this
->
permissions
=
$permissions_q
->
fetchArray
();
$this
->
user_group_permissions
=
$request
->
isMethod
(
'post'
)
&&
$request
->
hasParameter
(
$this
->
form
->
getName
()
.
'_permissions'
)
?
$request
->
getParameter
(
$this
->
form
->
getName
()
.
'_permissions'
)
->
getRawValue
()
:
array
();
$this
->
user_permissions
=
array
();
if
(
in_array
(
$this
->
form
->
getName
(),
array
(
'post'
,
'my_post'
,
'company_post'
))){
$user_group
=
$this
->
form
->
getObject
()
->
getUserGroup
();
if
(
count
(
$user_group
)
>
0
){
$permissions
=
Doctrine_Query
::
create
()
->
select
(
"p.id"
)
->
from
(
"Permission p INDEXBY p.id"
)
->
innerJoin
(
"p.UserGroupPermissions u"
)
->
where
(
"u.user_group_id = ?"
,
$user_group
[
0
][
'id'
])
->
fetchArray
();
foreach
(
$permissions
as
$user_group_permission
)
{
$this
->
user_group_permissions
[]
=
$user_group_permission
[
'id'
];
}
}
}
elseif
(
$this
->
form
->
getName
()
==
'user_group'
)
{
foreach
(
$this
->
form
->
getObject
()
->
getUserGroupPermissions
()
as
$user_group_permission
)
{
$this
->
user_group_permissions
[]
=
$user_group_permission
->
getId
();
}
}
elseif
(
$this
->
form
->
getName
()
==
'user'
){
$this
->
user_permissions
=
Doctrine_Query
::
create
()
->
select
(
"*"
)
->
from
(
"UserPermissions INDEXBY permission_id"
)
->
where
(
"user_id = ?"
,
$this
->
form
->
getObject
()
->
getId
())
->
fetchArray
();
$this
->
user_permissions
=
array_keys
(
$this
->
user_permissions
);
if
(
!
$this
->
form
->
getObject
()
->
isNew
())
{
$user_groupss
=
Doctrine_Query
::
create
()
->
select
(
"ugs.*"
)
->
from
(
"UserGroupUsers ugs"
)
->
where
(
"ugs.user_id = "
.
$this
->
form
->
getObject
()
->
getId
())
->
execute
();
foreach
(
$user_groupss
as
$user_groups
)
{
$user_group
=
Doctrine
::
getTable
(
"UserGroup"
)
->
find
(
$user_groups
->
getUserGroupId
());
if
(
$user_group
)
{
foreach
(
$user_group
->
getUserGroupPermissions
()
as
$user_group_permission
)
{
$this
->
user_group_permissions
[]
=
$user_group_permission
->
getId
();
}
}
}
}
}
}
}
apps/arm/modules/permission/config/generator.yml
0 → 100644
View file @
9f4f2745
generator
:
class
:
sfDoctrineGenerator
param
:
model_class
:
Permission
theme
:
admin
non_verbose_templates
:
true
with_show
:
false
singular
:
~
plural
:
~
route_prefix
:
permission
with_doctrine_route
:
true
actions_base_class
:
sfActions
order
:
7000
skip
:
true
config
:
actions
:
~
fields
:
id
:
{
label
:
'
ID'
}
credential
:
{
label
:
'
Правило'
}
description
:
{
label
:
'
Описание'
}
list
:
layout
:
~
title
:
'
Права'
display
:
[
credential
,
description
]
max_per_page
:
100
object_actions
:
_delete
:
~
_edit
:
~
search
:
fields
:
[
credential
,
description
]
filter
:
class
:
false
form
:
~
edit
:
title
:
Редактирование правила
new
:
title
:
Новое правило
\ No newline at end of file
apps/arm/modules/permission/lib/permissionGeneratorConfiguration.class.php
0 → 100644
View file @
9f4f2745
<?php
/**
* permission module configuration.
*
* @package sf
* @subpackage permission
* @author Atma
* @version SVN: $Id: configuration.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
*/
class
permissionGeneratorConfiguration
extends
BasePermissionGeneratorConfiguration
{
}
apps/arm/modules/permission/lib/permissionGeneratorHelper.class.php
0 → 100644
View file @
9f4f2745
<?php
/**
* permission module helper.
*
* @package sf
* @subpackage permission
* @author Atma
* @version SVN: $Id: helper.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
*/
class
permissionGeneratorHelper
extends
BasePermissionGeneratorHelper
{
}
apps/arm/modules/permission/templates/_map.php
0 → 100644
View file @
9f4f2745
<?php
if
(
isset
(
$user_group_permissions
)){
$user_group_permissions
=
$user_group_permissions
->
getRawValue
();
}
if
(
isset
(
$user_permissions
)){
$user_permissions
=
$user_permissions
->
getRawValue
();
}
$rows
=
array
();
$cols
=
array
();
$rows_cols
=
array
();
$rows_cols_title
=
array
();
$base_permissions
=
Permission
::
$base_permission
;
unset
(
$base_permissions
[
'batch|batchMerge'
]);
foreach
(
$permissions
as
$permission
)
{
$c_split
=
explode
(
'-'
,
$permission
[
'credential'
]);
$d_split
=
explode
(
':'
,
$permission
[
'description'
]);
$rows
[
$c_split
[
0
]]
=
$d_split
[
0
];
$cols
[
$c_split
[
1
]]
=
$d_split
[
1
];
$rows_cols
[
$c_split
[
0
]][
$c_split
[
1
]]
=
$permission
[
'id'
];
$rows_cols_title
[
$permission
[
'id'
]]
=
$d_split
[
1
];
}
function
sort_rows
(
$a
,
$b
)
{
if
(
$a
[
'order'
]
==
$b
[
'order'
])
{
return
0
;
}
return
(
$a
[
'order'
]
<
$b
[
'order'
])
?
-
1
:
1
;
}
$orders
=
array
();
$parser
=
new
sfYamlParser
();
foreach
(
$rows
as
$row_key
=>
$row_value
)
{
$v
=
array
(
'module'
=>
$row_key
,
'title'
=>
$row_value
,
'order'
=>
0
);
$generator
=
sfConfig
::
get
(
'sf_app_module_dir'
)
.
'/'
.
$row_key
.
'/config/generator.yml'
;
if
(
file_exists
(
$generator
)){
$p
=
$parser
->
parse
(
file_get_contents
(
$generator
));
if
(
isset
(
$p
[
'generator'
][
'param'
][
'order'
])){
$v
[
'order'
]
=
$p
[
'generator'
][
'param'
][
'order'
];
}
}
$orders
[]
=
$v
;
}
usort
(
$orders
,
'sort_rows'
);
$rows
=
array
();
foreach
(
$orders
as
$order
){
$rows
[
$order
[
'module'
]]
=
$order
[
'title'
];
}
?>
<div
class=
"user_permission_map"
>
<div
style=
"margin-right: 10px !important;"
class=
"lui_pseudo magick_checker__check_all"
>
Отметить все
</div><div
class=
"lui_pseudo magick_checker__uncheck_all"
>
Убрать все
</div>
<table
class=
"lui__list_table lui__list_table_permissions"
cellpadding=
"0"
cellspacing=
"0"
>
<thead>
<tr>
<th
align=
"left"
>
Модуль
</th>
<?php
foreach
(
$base_permissions
as
$base_permission
){
echo
'<th class="magick_checker__col" width="1">'
.
$base_permission
.
'</th>'
;
}
?>
<th
class=
"magick_checker__col"
>
Дополнительно
</th>
</tr>
</thead>
<tbody>
<?php
foreach
(
$rows
as
$row_key
=>
$row_value
)
{
echo
'<tr>'
;
echo
'<td valign="middle" title="'
.
$row_key
.
'" class="magick_checker__row"><b>'
.
(
$row_value
?
$row_value
:
$row_key
)
.
'</b></td>'
;
foreach
(
$base_permissions
as
$base_permission_key
=>
$base_permission
){
echo
'<td align="center" valign="middle">'
;
if
(
in_array
(
$row_key
,
array
(
'test_item_company'
,
'test_item'
))
&&
in_array
(
$base_permission_key
,
array
(
'new|create'
,
'update'
,
'show|edit'
))){
echo
'</td>'
;
continue
;
}
$perm_buff
=
''
;
if
(
isset
(
$rows_cols
[
$row_key
][
$base_permission_key
])
&&
(
$row_key
)){
$perm_buff_item
=
'<label style="height: 14px;" title="'
.
$base_permission_key
.
'"><input autocomplete="off" type="checkbox" name="'
.
$form
->
getName
()
.
'_permissions[]"'
.
(
in_array
(
$rows_cols
[
$row_key
][
$base_permission_key
],
$user_group_permissions
)
?
' checked="checked"'
.
(
$form
->
getName
()
==
'user'
?
' disabled="disabled"'
:
''
)
:
(
in_array
(
$rows_cols
[
$row_key
][
$base_permission_key
],
$user_permissions
)
?
' checked="checked"'
:
''
))
.
' value="'
.
$rows_cols
[
$row_key
][
$base_permission_key
]
.
'" /></label>'
;
if
(
array_key_exists
(
$base_permission_key
,
$base_permissions
))
{
echo
$perm_buff_item
;
}
else
{
$perm_buff
.
=
$perm_buff_item
;
}
echo
$perm_buff
;
}
echo
'</td>'
;
}
echo
'<td align="left" valign="middle">'
;
$perm_buff
=
''
;
foreach
(
$rows_cols
[
$row_key
]
as
$col_key
=>
$col_value
)
{
if
(
isset
(
$base_permissions
[
$col_key
])
&&
(
!
in_array
(
$row_key
,
array
(
'test_item_company'
,
'test_item'
))
||
(
!
in_array
(
$col_key
,
array
(
'new|create'
,
'update'
,
'show|edit'
))))){
continue
;
}
if
((
$row_key
==
'user_log'
&&
$col_key
==
'return'
)
||
(
in_array
(
$row_key
,
array
(
'test'
,
'test_company'
))
&&
$col_key
==
'questions_list'
)
||
(
$row_key
==
'pay'
&&
$col_key
==
'form_data'
)){
continue
;
}
$perm_buff_item
=
'<div class="lui__list_table_permissions__item" title="'
.
$col_key
.
'">'
;
$perm_buff_item
.
=
'<label style="height: 14px;"><input autocomplete="off" type="checkbox" name="'
.
$form
->
getName
()
.
'_permissions[]"'
.
(
in_array
(
$col_value
,
$user_group_permissions
)
?
' checked="checked"'
.
(
$form
->
getName
()
==
'user'
?
' disabled="disabled"'
:
''
)
:
(
in_array
(
$col_value
,
$user_permissions
)
?
' checked="checked"'
:
''
))
.
' value="'
.
$col_value
.
'" />'
.
(
$rows_cols_title
[
$col_value
]
!=
''
?
$rows_cols_title
[
$col_value
]
:
$col_key
)
.
'</label>'
;
$perm_buff_item
.
=
'</div>'
;
if
(
array_key_exists
(
$col_key
,
$base_permissions
))
{
echo
$perm_buff_item
;
}
else
{
$perm_buff
.
=
$perm_buff_item
;
}
}
echo
$perm_buff
;
echo
'</td>'
;
echo
'</tr>'
;
}
?>
</tbody>
</table>
</div>
<script
type=
"text/javascript"
>
var
magickChecker
=
{
col
:
function
(
checker
){
var
check
=
false
;
checker
.
parent
().
parent
().
parent
().
find
(
'
td
'
).
each
(
function
(
k
,
de
)
{
if
(
checker
.
prop
(
'
cellIndex
'
)
==
$
(
de
).
prop
(
'
cellIndex
'
))
{
if
(
$
(
de
).
find
(
'
input
'
).
length
>
0
&&
!
$
(
de
).
find
(
'
input
'
).
is
(
'
:checked
'
))
{
check
=
true
;
return
false
;
}
}
});
checker
.
parent
().
parent
().
parent
().
find
(
'
td
'
).
each
(
function
(
k
,
de
)
{
if
(
checker
.
prop
(
'
cellIndex
'
)
==
$
(
de
).
prop
(
'
cellIndex
'
))
{
$
(
de
).
find
(
'
input
'
).
prop
(
'
checked
'
,
check
);
}
});
},
row
:
function
(
checker
){
var
check
=
false
;
checker
.
parent
().
find
(
'
td
'
).
each
(
function
(
k
,
de
)
{
if
(
$
(
de
).
find
(
'
input
'
).
length
>
0
&&
!
$
(
de
).
find
(
'
input
'
).
is
(
'
:checked
'
))
{
check
=
true
;
}
});
checker
.
parent
().
find
(
'
td
'
).
each
(
function
(
k
,
de
)
{
$
(
de
).
find
(
'
input
'
).
prop
(
'
checked
'
,
check
);
});
},
all
:
function
(
check
){
$
(
'
.lui__list_table_permissions input[type="checkbox"]:enabled
'
).
prop
(
'
checked
'
,
check
);
},
init
:
function
(){
$
(
'
.magick_checker__col
'
).
click
(
function
()
{
magickChecker
.
col
(
$
(
this
));
});
$
(
'
.magick_checker__row
'
).
click
(
function
()
{
magickChecker
.
row
(
$
(
this
));
});
$
(
'
.magick_checker__check_all, .magick_checker__uncheck_all
'
).
click
(
function
(){
magickChecker
.
all
(
$
(
this
).
hasClass
(
'
magick_checker__check_all
'
));
});
}
};
magickChecker
.
init
();
</script>
\ No newline at end of file
apps/arm/modules/statistic/actions/actions.class.php
0 → 100644
View file @
9f4f2745
<?php
require_once
dirname
(
__FILE__
)
.
'/../lib/statisticGeneratorConfiguration.class.php'
;
require_once
dirname
(
__FILE__
)
.
'/../lib/statisticGeneratorHelper.class.php'
;
/**
* statistic actions.
*
* @package sf
* @subpackage statistic
* @author Atma
* @version SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
*/
class
statisticActions
extends
autoStatisticActions
{
}
apps/arm/modules/statistic/config/generator.yml
0 → 100644
View file @
9f4f2745
generator
:
class
:
sfDoctrineGenerator
param
:
model_class
:
Export
theme
:
admin
non_verbose_templates
:
true
with_show
:
false
singular
:
~
plural
:
~
route_prefix
:
statistic
with_doctrine_route
:
true
actions_base_class
:
sfActions
order
:
35
hr
:
true
config
:
actions
:
~
fields
:
id
:
{
label
:
'
'
}
logic_type
:
{
label
:
'
Критерий'
}
cat_id
:
{
label
:
'
'
}
weight
:
{
label
:
'
Данный'
}
sum
:
{
label
:
'
'
}
user_id
:
{
label
:
'
'
}
created_at
:
{
label
:
'
'
}
updated_at
:
{
label
:
'
'
}
list
:
layout
:
~
title
:
'
Статистика'
display
:
[
logic_type
,
weight
]
max_per_page
:
100
object_actions
:
_delete
:
~
_edit
:
~
search
:
fields
:
false
export
:
false
filter
:
class
:
false
form
:
~
edit
:
title
:
Редактирование
new
:
title
:
Новая
\ No newline at end of file
Prev
1
2
3
4
5
6
7
…
50
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment