diff options
| author | 2025-10-16 21:23:32 +0200 | |
|---|---|---|
| committer | 2025-10-16 21:23:32 +0200 | |
| commit | 14fc3e9b6467254c59781c14cc533ddc804d9414 (patch) | |
| tree | 1f28369113a7e80e08f5a7f35c7888c37cc1d2a8 | |
| parent | 50eeede063bb3d17f3129da1775df4dcf391a05f (diff) | |
Add to search UI the user modification date (#8122)
* Add to search UI the user modification date
Follow-up of:
* https://github.com/FreshRSS/FreshRSS/pull/8103
* https://github.com/FreshRSS/FreshRSS/pull/8093
* Easier UI to cancel filtering by date
* Add blank <option> to ease deselection of <select>
| -rw-r--r-- | README.fr.md | 2 | ||||
| -rw-r--r-- | README.md | 2 | ||||
| -rw-r--r-- | app/Controllers/searchController.php | 21 | ||||
| -rw-r--r-- | app/i18n/cs/gen.php | 1 | ||||
| -rw-r--r-- | app/i18n/de/gen.php | 1 | ||||
| -rw-r--r-- | app/i18n/el/gen.php | 1 | ||||
| -rw-r--r-- | app/i18n/en-US/gen.php | 1 | ||||
| -rw-r--r-- | app/i18n/en/gen.php | 1 | ||||
| -rw-r--r-- | app/i18n/es/gen.php | 1 | ||||
| -rw-r--r-- | app/i18n/fa/gen.php | 1 | ||||
| -rw-r--r-- | app/i18n/fi/gen.php | 1 | ||||
| -rw-r--r-- | app/i18n/fr/gen.php | 1 | ||||
| -rw-r--r-- | app/i18n/he/gen.php | 1 | ||||
| -rw-r--r-- | app/i18n/hu/gen.php | 1 | ||||
| -rw-r--r-- | app/i18n/id/gen.php | 1 | ||||
| -rw-r--r-- | app/i18n/it/gen.php | 1 | ||||
| -rw-r--r-- | app/i18n/ja/gen.php | 1 | ||||
| -rw-r--r-- | app/i18n/ko/gen.php | 1 | ||||
| -rw-r--r-- | app/i18n/lv/gen.php | 1 | ||||
| -rw-r--r-- | app/i18n/nl/gen.php | 1 | ||||
| -rw-r--r-- | app/i18n/oc/gen.php | 1 | ||||
| -rw-r--r-- | app/i18n/pl/gen.php | 1 | ||||
| -rw-r--r-- | app/i18n/pt-BR/gen.php | 1 | ||||
| -rw-r--r-- | app/i18n/pt-PT/gen.php | 1 | ||||
| -rw-r--r-- | app/i18n/ru/gen.php | 1 | ||||
| -rw-r--r-- | app/i18n/sk/gen.php | 1 | ||||
| -rw-r--r-- | app/i18n/tr/gen.php | 1 | ||||
| -rw-r--r-- | app/i18n/uk/gen.php | 1 | ||||
| -rw-r--r-- | app/i18n/zh-CN/gen.php | 1 | ||||
| -rw-r--r-- | app/i18n/zh-TW/gen.php | 1 | ||||
| -rw-r--r-- | app/views/search/index.phtml | 40 |
31 files changed, 88 insertions, 4 deletions
diff --git a/README.fr.md b/README.fr.md index fced3b8ed..10ce64d4c 100644 --- a/README.fr.md +++ b/README.fr.md @@ -231,7 +231,7 @@ Voir le [dépôt dédié à ces extensions](https://github.com/FreshRSS/Extensio | Ελληνικά (el) | ■■・・・・・・・・ 22% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fel+%2F%28TODO%7CDIRTY%29%24%2F) | | English (en) | ■■■■■■■■■■ 100% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fen+%2F%28TODO%7CDIRTY%29%24%2F) | | English (United States) (en-US) | ■■■■■■■■■■ 100% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fen-US+%2F%28TODO%7CDIRTY%29%24%2F) | -| Español (es) | ■■■■■■■■・・ 89% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fes+%2F%28TODO%7CDIRTY%29%24%2F) | +| Español (es) | ■■■■■■■■・・ 88% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fes+%2F%28TODO%7CDIRTY%29%24%2F) | | فارسی (fa) | ■■■■■■■■■・ 94% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Ffa+%2F%28TODO%7CDIRTY%29%24%2F) | | Suomi (fi) | ■■■■■■■■■・ 97% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Ffi+%2F%28TODO%7CDIRTY%29%24%2F) | | Français (fr) | ■■■■■■■■■■ 100% | [contribuer](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Ffr+%2F%28TODO%7CDIRTY%29%24%2F) | @@ -127,7 +127,7 @@ See the [repository dedicated to those extensions](https://github.com/FreshRSS/E | Ελληνικά (el) | ■■・・・・・・・・ 22% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fel+%2F%28TODO%7CDIRTY%29%24%2F) | | English (en) | ■■■■■■■■■■ 100% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fen+%2F%28TODO%7CDIRTY%29%24%2F) | | English (United States) (en-US) | ■■■■■■■■■■ 100% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fen-US+%2F%28TODO%7CDIRTY%29%24%2F) | -| Español (es) | ■■■■■■■■・・ 89% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fes+%2F%28TODO%7CDIRTY%29%24%2F) | +| Español (es) | ■■■■■■■■・・ 88% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Fes+%2F%28TODO%7CDIRTY%29%24%2F) | | فارسی (fa) | ■■■■■■■■■・ 94% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Ffa+%2F%28TODO%7CDIRTY%29%24%2F) | | Suomi (fi) | ■■■■■■■■■・ 97% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Ffi+%2F%28TODO%7CDIRTY%29%24%2F) | | Français (fr) | ■■■■■■■■■■ 100% | [contribute](https://github.com/search?q=repo%3AFreshRSS%2FFreshRSS+path%3Aapp%2Fi18n%2Ffr+%2F%28TODO%7CDIRTY%29%24%2F) | diff --git a/app/Controllers/searchController.php b/app/Controllers/searchController.php index 19ec04606..616c4c878 100644 --- a/app/Controllers/searchController.php +++ b/app/Controllers/searchController.php @@ -149,6 +149,27 @@ class FreshRSS_search_Controller extends FreshRSS_ActionController { } } + // User modification date + $userDateFrom = trim(Minz_Request::paramString('userdate_from')); + $userDateTo = trim(Minz_Request::paramString('userdate_to')); + $userDateNumber = Minz_Request::paramInt('userdate_number'); + $userDateUnit = trim(Minz_Request::paramString('userdate_unit')); + + if ($userDateNumber > 0 && $userDateUnit !== '') { + // Convert to ISO 8601 duration format: P1D, P1W, P1M, PT1H, etc. + // Time units (H, M, S) require a T separator + $prefix = ($userDateUnit === 'H' || $userDateUnit === 'M' || $userDateUnit === 'S') ? 'PT' : 'P'; + $searchTerms[] = "userdate:{$prefix}{$userDateNumber}{$userDateUnit}"; + } elseif ($userDateFrom !== '' || $userDateTo !== '') { + if ($userDateFrom !== '' && $userDateTo !== '') { + $searchTerms[] = "userdate:$userDateFrom/$userDateTo"; + } elseif ($userDateFrom !== '') { + $searchTerms[] = "userdate:$userDateFrom/"; + } elseif ($userDateTo !== '') { + $searchTerms[] = "userdate:/$userDateTo"; + } + } + $feedIds = Minz_Request::paramArrayInt('feed_ids'); if (!empty($feedIds)) { $searchTerms[] = 'f:' . implode(',', $feedIds); diff --git a/app/i18n/cs/gen.php b/app/i18n/cs/gen.php index e61682441..586fcdd8a 100644 --- a/app/i18n/cs/gen.php +++ b/app/i18n/cs/gen.php @@ -233,6 +233,7 @@ return array( 'date_range' => 'Date Range', // TODO 'date_received' => 'Received Date', // TODO 'date_to' => 'To', // TODO + 'date_user' => 'User Modification Date', // TODO 'feeds' => 'Feeds', // TODO 'free_text' => 'Free Text', // TODO 'free_text_help' => 'Search both in title and content', // TODO diff --git a/app/i18n/de/gen.php b/app/i18n/de/gen.php index 6ed055259..b80a83f82 100644 --- a/app/i18n/de/gen.php +++ b/app/i18n/de/gen.php @@ -233,6 +233,7 @@ return array( 'date_range' => 'Date Range', // TODO 'date_received' => 'Received Date', // TODO 'date_to' => 'To', // TODO + 'date_user' => 'User Modification Date', // TODO 'feeds' => 'Feeds', // TODO 'free_text' => 'Free Text', // TODO 'free_text_help' => 'Search both in title and content', // TODO diff --git a/app/i18n/el/gen.php b/app/i18n/el/gen.php index cee4a0aea..18c4898cd 100644 --- a/app/i18n/el/gen.php +++ b/app/i18n/el/gen.php @@ -233,6 +233,7 @@ return array( 'date_range' => 'Date Range', // TODO 'date_received' => 'Received Date', // TODO 'date_to' => 'To', // TODO + 'date_user' => 'User Modification Date', // TODO 'feeds' => 'Feeds', // TODO 'free_text' => 'Free Text', // TODO 'free_text_help' => 'Search both in title and content', // TODO diff --git a/app/i18n/en-US/gen.php b/app/i18n/en-US/gen.php index 840241926..14cd8ce89 100644 --- a/app/i18n/en-US/gen.php +++ b/app/i18n/en-US/gen.php @@ -233,6 +233,7 @@ return array( 'date_range' => 'Date Range', // IGNORE 'date_received' => 'Received Date', // IGNORE 'date_to' => 'To', // IGNORE + 'date_user' => 'User Modification Date', // IGNORE 'feeds' => 'Feeds', // IGNORE 'free_text' => 'Free Text', // IGNORE 'free_text_help' => 'Search both in title and content', // IGNORE diff --git a/app/i18n/en/gen.php b/app/i18n/en/gen.php index 2f888f7ee..49d44ec46 100644 --- a/app/i18n/en/gen.php +++ b/app/i18n/en/gen.php @@ -233,6 +233,7 @@ return array( 'date_range' => 'Date Range', 'date_received' => 'Received Date', 'date_to' => 'To', + 'date_user' => 'User Modification Date', 'feeds' => 'Feeds', 'free_text' => 'Free Text', 'free_text_help' => 'Search both in title and content', diff --git a/app/i18n/es/gen.php b/app/i18n/es/gen.php index ec8ce0cc8..df8a3716b 100644 --- a/app/i18n/es/gen.php +++ b/app/i18n/es/gen.php @@ -233,6 +233,7 @@ return array( 'date_range' => 'Date Range', // TODO 'date_received' => 'Received Date', // TODO 'date_to' => 'To', // TODO + 'date_user' => 'User Modification Date', // TODO 'feeds' => 'Feeds', // TODO 'free_text' => 'Free Text', // TODO 'free_text_help' => 'Search both in title and content', // TODO diff --git a/app/i18n/fa/gen.php b/app/i18n/fa/gen.php index 9674748ac..0cbe51e78 100644 --- a/app/i18n/fa/gen.php +++ b/app/i18n/fa/gen.php @@ -233,6 +233,7 @@ return array( 'date_range' => 'Date Range', // TODO 'date_received' => 'Received Date', // TODO 'date_to' => 'To', // TODO + 'date_user' => 'User Modification Date', // TODO 'feeds' => 'Feeds', // TODO 'free_text' => 'Free Text', // TODO 'free_text_help' => 'Search both in title and content', // TODO diff --git a/app/i18n/fi/gen.php b/app/i18n/fi/gen.php index cad2587f1..8be7608f6 100644 --- a/app/i18n/fi/gen.php +++ b/app/i18n/fi/gen.php @@ -233,6 +233,7 @@ return array( 'date_range' => 'Date Range', // TODO 'date_received' => 'Received Date', // TODO 'date_to' => 'To', // TODO + 'date_user' => 'User Modification Date', // TODO 'feeds' => 'Feeds', // TODO 'free_text' => 'Free Text', // TODO 'free_text_help' => 'Search both in title and content', // TODO diff --git a/app/i18n/fr/gen.php b/app/i18n/fr/gen.php index caaa3291a..6df408426 100644 --- a/app/i18n/fr/gen.php +++ b/app/i18n/fr/gen.php @@ -233,6 +233,7 @@ return array( 'date_range' => 'Plage de dates', 'date_received' => 'Date de réception', 'date_to' => 'À', + 'date_user' => 'Date de modification par l’utilisateur', 'feeds' => 'Flux', 'free_text' => 'Texte libre', 'free_text_help' => 'Rechercher dans le titre et le contenu', diff --git a/app/i18n/he/gen.php b/app/i18n/he/gen.php index 1c91e60c9..bf95a007c 100644 --- a/app/i18n/he/gen.php +++ b/app/i18n/he/gen.php @@ -233,6 +233,7 @@ return array( 'date_range' => 'Date Range', // TODO 'date_received' => 'Received Date', // TODO 'date_to' => 'To', // TODO + 'date_user' => 'User Modification Date', // TODO 'feeds' => 'Feeds', // TODO 'free_text' => 'Free Text', // TODO 'free_text_help' => 'Search both in title and content', // TODO diff --git a/app/i18n/hu/gen.php b/app/i18n/hu/gen.php index 56388733f..96b132a55 100644 --- a/app/i18n/hu/gen.php +++ b/app/i18n/hu/gen.php @@ -233,6 +233,7 @@ return array( 'date_range' => 'Date Range', // TODO 'date_received' => 'Received Date', // TODO 'date_to' => 'To', // TODO + 'date_user' => 'User Modification Date', // TODO 'feeds' => 'Feeds', // TODO 'free_text' => 'Free Text', // TODO 'free_text_help' => 'Search both in title and content', // TODO diff --git a/app/i18n/id/gen.php b/app/i18n/id/gen.php index 11b55044a..82bfdaccb 100644 --- a/app/i18n/id/gen.php +++ b/app/i18n/id/gen.php @@ -233,6 +233,7 @@ return array( 'date_range' => 'Date Range', // TODO 'date_received' => 'Received Date', // TODO 'date_to' => 'To', // TODO + 'date_user' => 'User Modification Date', // TODO 'feeds' => 'Feeds', // TODO 'free_text' => 'Free Text', // TODO 'free_text_help' => 'Search both in title and content', // TODO diff --git a/app/i18n/it/gen.php b/app/i18n/it/gen.php index eca46db04..bf539d249 100644 --- a/app/i18n/it/gen.php +++ b/app/i18n/it/gen.php @@ -233,6 +233,7 @@ return array( 'date_range' => 'Date Range', // TODO 'date_received' => 'Received Date', // TODO 'date_to' => 'To', // TODO + 'date_user' => 'User Modification Date', // TODO 'feeds' => 'Feeds', // TODO 'free_text' => 'Free Text', // TODO 'free_text_help' => 'Search both in title and content', // TODO diff --git a/app/i18n/ja/gen.php b/app/i18n/ja/gen.php index a8d9dd1c6..60dc9c6ba 100644 --- a/app/i18n/ja/gen.php +++ b/app/i18n/ja/gen.php @@ -233,6 +233,7 @@ return array( 'date_range' => 'Date Range', // TODO 'date_received' => 'Received Date', // TODO 'date_to' => 'To', // TODO + 'date_user' => 'User Modification Date', // TODO 'feeds' => 'Feeds', // TODO 'free_text' => 'Free Text', // TODO 'free_text_help' => 'Search both in title and content', // TODO diff --git a/app/i18n/ko/gen.php b/app/i18n/ko/gen.php index d12422dc8..770b6c9be 100644 --- a/app/i18n/ko/gen.php +++ b/app/i18n/ko/gen.php @@ -233,6 +233,7 @@ return array( 'date_range' => 'Date Range', // TODO 'date_received' => 'Received Date', // TODO 'date_to' => 'To', // TODO + 'date_user' => 'User Modification Date', // TODO 'feeds' => 'Feeds', // TODO 'free_text' => 'Free Text', // TODO 'free_text_help' => 'Search both in title and content', // TODO diff --git a/app/i18n/lv/gen.php b/app/i18n/lv/gen.php index a94610be0..93176d737 100644 --- a/app/i18n/lv/gen.php +++ b/app/i18n/lv/gen.php @@ -233,6 +233,7 @@ return array( 'date_range' => 'Date Range', // TODO 'date_received' => 'Received Date', // TODO 'date_to' => 'To', // TODO + 'date_user' => 'User Modification Date', // TODO 'feeds' => 'Feeds', // TODO 'free_text' => 'Free Text', // TODO 'free_text_help' => 'Search both in title and content', // TODO diff --git a/app/i18n/nl/gen.php b/app/i18n/nl/gen.php index 02aa06a5c..3da2879d5 100644 --- a/app/i18n/nl/gen.php +++ b/app/i18n/nl/gen.php @@ -233,6 +233,7 @@ return array( 'date_range' => 'Date Range', // TODO 'date_received' => 'Received Date', // TODO 'date_to' => 'To', // TODO + 'date_user' => 'User Modification Date', // TODO 'feeds' => 'Feeds', // TODO 'free_text' => 'Free Text', // TODO 'free_text_help' => 'Search both in title and content', // TODO diff --git a/app/i18n/oc/gen.php b/app/i18n/oc/gen.php index b1382dac7..68e2a5124 100644 --- a/app/i18n/oc/gen.php +++ b/app/i18n/oc/gen.php @@ -233,6 +233,7 @@ return array( 'date_range' => 'Date Range', // TODO 'date_received' => 'Received Date', // TODO 'date_to' => 'To', // TODO + 'date_user' => 'User Modification Date', // TODO 'feeds' => 'Feeds', // TODO 'free_text' => 'Free Text', // TODO 'free_text_help' => 'Search both in title and content', // TODO diff --git a/app/i18n/pl/gen.php b/app/i18n/pl/gen.php index 1423295b6..baa288d1f 100644 --- a/app/i18n/pl/gen.php +++ b/app/i18n/pl/gen.php @@ -233,6 +233,7 @@ return array( 'date_range' => 'Date Range', // TODO 'date_received' => 'Received Date', // TODO 'date_to' => 'To', // TODO + 'date_user' => 'User Modification Date', // TODO 'feeds' => 'Feeds', // TODO 'free_text' => 'Free Text', // TODO 'free_text_help' => 'Search both in title and content', // TODO diff --git a/app/i18n/pt-BR/gen.php b/app/i18n/pt-BR/gen.php index 664b543b1..24401aecb 100644 --- a/app/i18n/pt-BR/gen.php +++ b/app/i18n/pt-BR/gen.php @@ -233,6 +233,7 @@ return array( 'date_range' => 'Date Range', // TODO 'date_received' => 'Received Date', // TODO 'date_to' => 'To', // TODO + 'date_user' => 'User Modification Date', // TODO 'feeds' => 'Feeds', // TODO 'free_text' => 'Free Text', // TODO 'free_text_help' => 'Search both in title and content', // TODO diff --git a/app/i18n/pt-PT/gen.php b/app/i18n/pt-PT/gen.php index a4d0cf5fd..3a1204082 100644 --- a/app/i18n/pt-PT/gen.php +++ b/app/i18n/pt-PT/gen.php @@ -233,6 +233,7 @@ return array( 'date_range' => 'Date Range', // TODO 'date_received' => 'Received Date', // TODO 'date_to' => 'To', // TODO + 'date_user' => 'User Modification Date', // TODO 'feeds' => 'Feeds', // TODO 'free_text' => 'Free Text', // TODO 'free_text_help' => 'Search both in title and content', // TODO diff --git a/app/i18n/ru/gen.php b/app/i18n/ru/gen.php index 42aec9283..57796e03e 100644 --- a/app/i18n/ru/gen.php +++ b/app/i18n/ru/gen.php @@ -233,6 +233,7 @@ return array( 'date_range' => 'Date Range', // TODO 'date_received' => 'Received Date', // TODO 'date_to' => 'To', // TODO + 'date_user' => 'User Modification Date', // TODO 'feeds' => 'Feeds', // TODO 'free_text' => 'Free Text', // TODO 'free_text_help' => 'Search both in title and content', // TODO diff --git a/app/i18n/sk/gen.php b/app/i18n/sk/gen.php index 569763a18..444ad67f3 100644 --- a/app/i18n/sk/gen.php +++ b/app/i18n/sk/gen.php @@ -233,6 +233,7 @@ return array( 'date_range' => 'Date Range', // TODO 'date_received' => 'Received Date', // TODO 'date_to' => 'To', // TODO + 'date_user' => 'User Modification Date', // TODO 'feeds' => 'Feeds', // TODO 'free_text' => 'Free Text', // TODO 'free_text_help' => 'Search both in title and content', // TODO diff --git a/app/i18n/tr/gen.php b/app/i18n/tr/gen.php index 13714a004..27e1baa40 100644 --- a/app/i18n/tr/gen.php +++ b/app/i18n/tr/gen.php @@ -233,6 +233,7 @@ return array( 'date_range' => 'Date Range', // TODO 'date_received' => 'Received Date', // TODO 'date_to' => 'To', // TODO + 'date_user' => 'User Modification Date', // TODO 'feeds' => 'Feeds', // TODO 'free_text' => 'Free Text', // TODO 'free_text_help' => 'Search both in title and content', // TODO diff --git a/app/i18n/uk/gen.php b/app/i18n/uk/gen.php index bc7f29d37..593b51d07 100644 --- a/app/i18n/uk/gen.php +++ b/app/i18n/uk/gen.php @@ -233,6 +233,7 @@ return array( 'date_range' => 'Date Range', // TODO 'date_received' => 'Received Date', // TODO 'date_to' => 'To', // TODO + 'date_user' => 'User Modification Date', // TODO 'feeds' => 'Feeds', // TODO 'free_text' => 'Free Text', // TODO 'free_text_help' => 'Search both in title and content', // TODO diff --git a/app/i18n/zh-CN/gen.php b/app/i18n/zh-CN/gen.php index 56f3292d8..96599d8e9 100644 --- a/app/i18n/zh-CN/gen.php +++ b/app/i18n/zh-CN/gen.php @@ -233,6 +233,7 @@ return array( 'date_range' => 'Date Range', // TODO 'date_received' => 'Received Date', // TODO 'date_to' => 'To', // TODO + 'date_user' => 'User Modification Date', // TODO 'feeds' => 'Feeds', // TODO 'free_text' => 'Free Text', // TODO 'free_text_help' => 'Search both in title and content', // TODO diff --git a/app/i18n/zh-TW/gen.php b/app/i18n/zh-TW/gen.php index 2f68c6bd8..7f1a68e8b 100644 --- a/app/i18n/zh-TW/gen.php +++ b/app/i18n/zh-TW/gen.php @@ -233,6 +233,7 @@ return array( 'date_range' => 'Date Range', // TODO 'date_received' => 'Received Date', // TODO 'date_to' => 'To', // TODO + 'date_user' => 'User Modification Date', // TODO 'feeds' => 'Feeds', // TODO 'free_text' => 'Free Text', // TODO 'free_text_help' => 'Search both in title and content', // TODO diff --git a/app/views/search/index.phtml b/app/views/search/index.phtml index 1d9222f23..fb64b0524 100644 --- a/app/views/search/index.phtml +++ b/app/views/search/index.phtml @@ -67,7 +67,7 @@ <div class="group-controls"> <div> <label for="date_number"><?= _t('gen.search.date_past') ?> - <input id="date_number" name="date_number" type="number" min="1" placeholder="1" /> + <input id="date_number" name="date_number" type="number" min="0" placeholder="0" /> <select id="date_unit" name="date_unit"> <option value="H"><?= _t('gen.period.hours') ?></option> <option value="D"><?= _t('gen.period.days') ?></option> @@ -85,7 +85,7 @@ <div class="group-controls"> <div> <label for="pubdate_number"><?= _t('gen.search.date_past') ?> - <input id="pubdate_number" name="pubdate_number" type="number" min="1" placeholder="1" /> + <input id="pubdate_number" name="pubdate_number" type="number" min="0" placeholder="0" /> <select id="pubdate_unit" name="pubdate_unit"> <option value="H"><?= _t('gen.period.hours') ?></option> <option value="D"><?= _t('gen.period.days') ?></option> @@ -97,6 +97,24 @@ </div> </div> </div> + + <div class="form-group"> + <label class="group-name"><?= _t('gen.search.date_user') ?></label> + <div class="group-controls"> + <div> + <label for="userdate_number"><?= _t('gen.search.date_past') ?> + <input id="userdate_number" name="userdate_number" type="number" min="0" placeholder="0" /> + <select id="userdate_unit" name="userdate_unit"> + <option value="H"><?= _t('gen.period.hours') ?></option> + <option value="D"><?= _t('gen.period.days') ?></option> + <option value="W"><?= _t('gen.period.weeks') ?></option> + <option value="M"><?= _t('gen.period.months') ?></option> + <option value="Y"><?= _t('gen.period.years') ?></option> + </select> + </label> + </div> + </div> + </div> </fieldset> <fieldset> @@ -129,6 +147,20 @@ </div> </div> </div> + + <div class="form-group"> + <label class="group-name"><?= _t('gen.search.date_user') ?></label> + <div class="group-controls"> + <div> + <label for="userdate_from"><?= _t('gen.search.date_from') ?> + <input id="userdate_from" name="userdate_from" type="date" /> + </label> + <label for="userdate_to"><?= _t('gen.search.date_to') ?> + <input id="userdate_to" name="userdate_to" type="date" /> + </label> + </div> + </div> + </div> </fieldset> <fieldset> @@ -138,6 +170,7 @@ <label class="group-name" for="feed_ids"><?= _t('gen.search.feeds') ?></label> <div class="group-controls"> <select name="feed_ids[]" id="feed_ids" size="<?= min(8, count($this->feeds) + 1) ?>" multiple="multiple"> + <option value=""></option> <?php foreach ($this->feeds as $feed): ?> <option value="<?= $feed->id() ?>"><?= $feed->name() ?></option> <?php endforeach; ?> @@ -149,6 +182,7 @@ <label class="group-name" for="category_ids"><?= _t('gen.search.categories') ?></label> <div class="group-controls"> <select name="category_ids[]" id="category_ids" size="<?= min(8, count($this->categories) + 1) ?>" multiple="multiple"> + <option value=""></option> <?php foreach ($this->categories as $category): ?> <option value="<?= $category->id() ?>"><?= $category->name() ?></option> <?php endforeach; ?> @@ -165,6 +199,7 @@ <label class="group-name" for="label_ids"><?= _t('gen.search.labels') ?></label> <div class="group-controls"> <select name="label_ids[]" id="label_ids" size="<?= min(8, count($this->labels) + 1) ?>" multiple="multiple"> + <option value=""></option> <?php foreach ($this->labels as $label): ?> <option value="<?= $label->id() ?>"><?= $label->name() ?></option> <?php endforeach; ?> @@ -181,6 +216,7 @@ <label class="group-name" for="user_query_ids"><?= _t('gen.search.user_queries') ?></label> <div class="group-controls"> <select name="user_query_ids[]" id="user_query_ids" size="<?= min(8, count($this->queries) + 1) ?>" multiple="multiple"> + <option value=""></option> <?php foreach ($this->queries as $key => $query): ?> <option value="<?= $key ?>"><?= $query->getName() ?></option> <?php endforeach; ?> |
