-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #475 from compucorp/staging
Sync master with staging
- Loading branch information
Showing
10 changed files
with
161 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
civihr_employee_portal/templates/tasks_notification_badge.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<span data-tasks-notification-badge> | ||
<tasks-notification-badge></tasks-notification-badge> | ||
</span> | ||
<script> | ||
CRM.tasksAssignments = { | ||
extensionPath: Drupal.settings.tasksAssignments.extensionPath | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
civihr_employee_portal/views/includes/views_between_operation_dates_filter_handler.inc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
/** | ||
* @file | ||
* A filter that allows the between operator to compare dates in 'Y-m-d' format | ||
* rather than the default timestamp comparison since absence dates are stored | ||
* in 'Y-m-d' format in the db. | ||
*/ | ||
|
||
class views_between_operation_dates_filter_handler extends views_handler_filter_date { | ||
function op_between($field) { | ||
// Use the substitutions to ensure a consistent timestamp. | ||
$query_substitutions = views_views_query_substitutions($this->view); | ||
$from = intval(strtotime($this->value['min'], $query_substitutions['***CURRENT_TIME***'])); | ||
$to = intval(strtotime($this->value['max'], $query_substitutions['***CURRENT_TIME***'])); | ||
|
||
$from = date('Y-m-d', $from); | ||
$to = date('Y-m-d', $to); | ||
|
||
$operator = strtoupper($this->operator); | ||
$this->query->add_where_expression($this->options['group'], "$field $operator '$from' AND '$to'"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters