wip special days alerts
This commit is contained in:
parent
c3f4addb0e
commit
cd163a96ef
|
@ -164,12 +164,32 @@ class CalendarManager
|
|||
).'</a>',
|
||||
];
|
||||
|
||||
if ($tab !== 'list') {
|
||||
$id_calendar = get_parameter('id_calendar', 0);
|
||||
$id_calendar = get_parameter('id_calendar', 0);
|
||||
$id = get_parameter('id', 0);
|
||||
|
||||
$op = get_parameter('op', '');
|
||||
$action = get_parameter('action', '');
|
||||
|
||||
if (($id_calendar !== 0 || $id !== 0)) {
|
||||
$id = ($id_calendar === 0) ? $id : $id_calendar;
|
||||
$buttons['list_edit'] = [
|
||||
'active' => false,
|
||||
'text' => '<a href="'.ui_get_full_url(
|
||||
$this->url.'&tab=list&op=edit&id='.$id
|
||||
).'&pure='.(int) $config['pure'].'">'.html_print_image(
|
||||
'images/pencil.png',
|
||||
true,
|
||||
[
|
||||
'title' => __('Edit calendar'),
|
||||
'class' => 'invert_filter',
|
||||
]
|
||||
).'</a>',
|
||||
];
|
||||
|
||||
$buttons['special_days'] = [
|
||||
'active' => false,
|
||||
'text' => '<a href="'.ui_get_full_url(
|
||||
$this->url.'&tab=special_days&id_calendar='.$id_calendar
|
||||
$this->url.'&tab=special_days&id_calendar='.$id
|
||||
).'&pure='.(int) $config['pure'].'">'.html_print_image(
|
||||
'images/templates.png',
|
||||
true,
|
||||
|
@ -181,6 +201,10 @@ class CalendarManager
|
|||
];
|
||||
}
|
||||
|
||||
if ($op === 'edit' && $action === '') {
|
||||
$tab = 'list_edit';
|
||||
}
|
||||
|
||||
$buttons[$tab]['active'] = true;
|
||||
|
||||
return $buttons;
|
||||
|
@ -596,7 +620,7 @@ class CalendarManager
|
|||
if ((bool) $manage === true) {
|
||||
$name = '<b><a href="';
|
||||
$name .= ui_get_full_url(
|
||||
$this->url.'&op=edit&id='.$tmp->id
|
||||
$this->url.'&op=special_days&tab=special_days&id_calendar='.$tmp->id
|
||||
);
|
||||
$name .= '">';
|
||||
$name .= $tmp->name;
|
||||
|
@ -914,7 +938,18 @@ class CalendarManager
|
|||
$day_code = get_parameter('day_code', '');
|
||||
$id_calendar = get_parameter('id_calendar', 0);
|
||||
|
||||
$output = '<h4>'.__('Same as %s', $day_code);
|
||||
$weekdays = [
|
||||
1 => 'monday',
|
||||
2 => 'tuesday',
|
||||
3 => 'wednesday',
|
||||
4 => 'thursday',
|
||||
5 => 'friday',
|
||||
6 => 'saturday',
|
||||
7 => 'sunday',
|
||||
8 => 'holidays',
|
||||
];
|
||||
|
||||
$output = '<h4>'.__('Same as %s', $weekdays[$day_code]);
|
||||
$output .= ' » ';
|
||||
$output .= __('Templates not being fired');
|
||||
$output .= '</h4>';
|
||||
|
|
|
@ -49,6 +49,10 @@ if (empty($message) === false) {
|
|||
// Datatables list.
|
||||
try {
|
||||
$columns = [
|
||||
[
|
||||
'text' => 'id',
|
||||
'class' => 'invisible',
|
||||
],
|
||||
'name',
|
||||
'id_group',
|
||||
'description',
|
||||
|
@ -59,6 +63,7 @@ try {
|
|||
];
|
||||
|
||||
$column_names = [
|
||||
__('ID'),
|
||||
__('Name'),
|
||||
__('Group'),
|
||||
__('Description'),
|
||||
|
@ -78,7 +83,7 @@ try {
|
|||
'ajax_data' => ['method' => 'drawListCalendar'],
|
||||
'no_sortable_columns' => [-1],
|
||||
'order' => [
|
||||
'field' => 'name',
|
||||
'field' => 'id',
|
||||
'direction' => 'asc',
|
||||
],
|
||||
'search_button_class' => 'sub filter float-right',
|
||||
|
|
Loading…
Reference in New Issue