Merge branch 'ent-4264-cambios-vista-de-eventos' into 'develop'
Ent 4264 cambios vista de eventos See merge request artica/pandorafms!3893
This commit is contained in:
commit
79b11a6b30
|
@ -1381,6 +1381,12 @@ if ($get_extended_event) {
|
||||||
'EW',
|
'EW',
|
||||||
$event['clean_tags'],
|
$event['clean_tags'],
|
||||||
$childrens_ids
|
$childrens_ids
|
||||||
|
)) || (tags_checks_event_acl(
|
||||||
|
$config['id_user'],
|
||||||
|
$event['id_grupo'],
|
||||||
|
'ER',
|
||||||
|
$event['clean_tags'],
|
||||||
|
$childrens_ids
|
||||||
)))
|
)))
|
||||||
) {
|
) {
|
||||||
$tabs .= "<li><a href='#extended_event_responses_page' id='link_responses'>".html_print_image(
|
$tabs .= "<li><a href='#extended_event_responses_page' id='link_responses'>".html_print_image(
|
||||||
|
@ -1444,6 +1450,12 @@ if ($get_extended_event) {
|
||||||
'EW',
|
'EW',
|
||||||
$event['clean_tags'],
|
$event['clean_tags'],
|
||||||
$childrens_ids
|
$childrens_ids
|
||||||
|
)) || (tags_checks_event_acl(
|
||||||
|
$config['id_user'],
|
||||||
|
$event['id_grupo'],
|
||||||
|
'ER',
|
||||||
|
$event['clean_tags'],
|
||||||
|
$childrens_ids
|
||||||
)))
|
)))
|
||||||
) {
|
) {
|
||||||
$responses = events_page_responses($event);
|
$responses = events_page_responses($event);
|
||||||
|
|
|
@ -3669,22 +3669,37 @@ function events_page_responses($event, $childrens_ids=[])
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$table_responses->data[] = $data;
|
if ((tags_checks_event_acl(
|
||||||
|
$config['id_user'],
|
||||||
|
$event['id_grupo'],
|
||||||
|
'EM',
|
||||||
|
$event['clean_tags'],
|
||||||
|
$childrens_ids
|
||||||
|
)) || (tags_checks_event_acl(
|
||||||
|
$config['id_user'],
|
||||||
|
$event['id_grupo'],
|
||||||
|
'EW',
|
||||||
|
$event['clean_tags'],
|
||||||
|
$childrens_ids
|
||||||
|
))
|
||||||
|
) {
|
||||||
|
$table_responses->data[] = $data;
|
||||||
|
|
||||||
// Comments.
|
// Comments.
|
||||||
$data = [];
|
$data = [];
|
||||||
$data[0] = __('Comment');
|
$data[0] = __('Comment');
|
||||||
$data[1] = '';
|
$data[1] = '';
|
||||||
$data[2] = html_print_button(
|
$data[2] = html_print_button(
|
||||||
__('Add comment'),
|
__('Add comment'),
|
||||||
'comment_button',
|
'comment_button',
|
||||||
false,
|
false,
|
||||||
'$(\'#link_comments\').trigger(\'click\');',
|
'$(\'#link_comments\').trigger(\'click\');',
|
||||||
'class="sub next w70p"',
|
'class="sub next w70p"',
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
$table_responses->data[] = $data;
|
$table_responses->data[] = $data;
|
||||||
|
}
|
||||||
|
|
||||||
if (tags_checks_event_acl(
|
if (tags_checks_event_acl(
|
||||||
$config['id_user'],
|
$config['id_user'],
|
||||||
|
|
|
@ -1608,8 +1608,20 @@ try {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Event responses.
|
// Event responses.
|
||||||
$sql_event_resp = "SELECT id, name FROM tevent_response WHERE type LIKE 'command'";
|
if (is_user_admin($config['id_user'])) {
|
||||||
$event_responses = db_get_all_rows_sql($sql_event_resp);
|
$sql_event_resp = "SELECT id, name FROM tevent_response WHERE type LIKE 'command'";
|
||||||
|
$event_responses = db_get_all_rows_sql($sql_event_resp);
|
||||||
|
} else {
|
||||||
|
$id_groups = array_keys(users_get_groups(false, 'EW'));
|
||||||
|
$event_responses = db_get_all_rows_filter(
|
||||||
|
'tevent_response',
|
||||||
|
[
|
||||||
|
'id_group' => $id_groups,
|
||||||
|
'type' => 'command',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if ($config['event_replication'] != 1) {
|
if ($config['event_replication'] != 1) {
|
||||||
if ($event_w && !$readonly) {
|
if ($event_w && !$readonly) {
|
||||||
|
|
Loading…
Reference in New Issue