recurring:XY search keyword + auto-added recurring filter bookmarks v1.7
This commit is contained in:
@@ -27,6 +27,7 @@ class OrganonProjectHelper extends Base
|
||||
// Config toggles for the auto-managed custom-filter groups.
|
||||
const SHOW_ALL_FILTER_KEY = 'organon_tweaks_show_all_filter';
|
||||
const MONTH_FILTERS_KEY = 'organon_tweaks_month_filters';
|
||||
const RECURRING_FILTERS_KEY = 'organon_tweaks_recurring_filters';
|
||||
|
||||
// Reserved custom-filter groups: each row is [name, query, append]. The NAME is reserved by the
|
||||
// plugin (fixed, non-translated strings so dedup is stable across locales); a user's own filter
|
||||
@@ -39,6 +40,13 @@ class OrganonProjectHelper extends Base
|
||||
array('Due this month', 'duemonth:this', 1),
|
||||
array('Around this month', 'aroundmonth:this', 1),
|
||||
);
|
||||
const GROUP_RECURRING = array(
|
||||
array('All recurring', 'recurring:anyall', 1),
|
||||
array('Event recurring', 'recurring:evtall', 1),
|
||||
array('Calendar recurring', 'recurring:calall', 1),
|
||||
array('Recurring templates', 'recurring:anyori', 1),
|
||||
array('Recurring duplicates', 'recurring:anydup', 1),
|
||||
);
|
||||
|
||||
/**
|
||||
* Should the current board emphasize the due date? Board pages only (project_id in the route).
|
||||
@@ -135,6 +143,10 @@ class OrganonProjectHelper extends Base
|
||||
if ((int) $this->configModel->get(self::MONTH_FILTERS_KEY, 1) === 1) {
|
||||
$this->ensureGroup($project_id, self::GROUP_MONTH);
|
||||
}
|
||||
|
||||
if ((int) $this->configModel->get(self::RECURRING_FILTERS_KEY, 1) === 1) {
|
||||
$this->ensureGroup($project_id, self::GROUP_RECURRING);
|
||||
}
|
||||
}
|
||||
|
||||
private function ensureGroup($project_id, array $rows)
|
||||
|
||||
Reference in New Issue
Block a user