diff options
| author | 2022-03-14 23:04:17 +0100 | |
|---|---|---|
| committer | 2022-03-14 23:04:17 +0100 | |
| commit | 6650d1d29ea5e6f895124afce9ed4a6e920a1ed8 (patch) | |
| tree | e81fc72e0a31d9ceaa1d3a9afeb2f4bc4ad46040 /app | |
| parent | 7b962e246bb9f273dda534b340851db799577dfe (diff) | |
Improved: log page (#4204)
* first draft
* wip
* Theme Ansum
* Update logs_pagination.phtml
* Theme Mapco
* Update adark.css
* Update BlueLagoon.css
* Update dark.css
* Update screwdriver.css
* Theme Swage
* Update app/views/helpers/logs_pagination.phtml
Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
* Update app/views/helpers/logs_pagination.phtml
Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
* Update template.css
* Update logs_pagination.phtml
* Update logs_pagination.phtml
* Update logs_pagination.phtml
* RTL CSS
* Update dark.rtl.css
* Update swage.css
* fix CLI findings
* Indentation fixed
* icons improved
* CSS: centered icons
* i18n
* pipline test fixes
* Update conf.php
* Update gen.php
* Update app/i18n/fr/conf.php
Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Diffstat (limited to 'app')
40 files changed, 330 insertions, 158 deletions
diff --git a/app/Models/Themes.php b/app/Models/Themes.php index 693657fae..ed379dc0d 100644 --- a/app/Models/Themes.php +++ b/app/Models/Themes.php @@ -79,6 +79,7 @@ class FreshRSS_Themes extends Minz_Model { 'close' => '❌', 'configure' => '⚙', 'down' => '▽', + 'error' => '❌', 'favorite' => '★', 'FreshRSS-logo' => '⊚', 'help' => 'ⓘ', @@ -91,6 +92,7 @@ class FreshRSS_Themes extends Minz_Model { 'logout' => '🔓', 'next' => '⏩', 'non-starred' => '☆', + 'notice' => 'ⓘ', 'prev' => '⏪', 'read' => '☑', 'rss' => '☄', @@ -107,6 +109,7 @@ class FreshRSS_Themes extends Minz_Model { 'view-normal' => '☰', 'view-global' => '☷', 'view-reader' => '☕', + 'warning' => '△', ); return isset($name) ? $alts[$name] : ''; } diff --git a/app/i18n/cz/conf.php b/app/i18n/cz/conf.php index f25382a3d..3e961e3a9 100644 --- a/app/i18n/cz/conf.php +++ b/app/i18n/cz/conf.php @@ -66,6 +66,19 @@ return array( 'thin' => 'Úzká', ), ), + 'logs' => array( + 'loglist' => array( + 'level' => 'Log Level', // TODO + 'message' => 'Log Message', // TODO + 'timestamp' => 'Timestamp', // TODO + ), + 'pagination' => array( + 'first' => 'První', + 'last' => 'Poslední', + 'next' => 'Další', + 'previous' => 'Předchozí', + ), + ), 'profile' => array( '_' => 'Správa profilu', 'api' => 'Správa API', diff --git a/app/i18n/cz/gen.php b/app/i18n/cz/gen.php index 853f4d0d9..cee99c845 100644 --- a/app/i18n/cz/gen.php +++ b/app/i18n/cz/gen.php @@ -176,12 +176,6 @@ return array( 'user_management' => 'Správa uživatelů', 'user_profile' => 'Profil', ), - 'pagination' => array( - 'first' => 'První', - 'last' => 'Poslední', - 'next' => 'Další', - 'previous' => 'Předchozí', - ), 'period' => array( 'days' => 'dní', 'hours' => 'hodin', diff --git a/app/i18n/de/conf.php b/app/i18n/de/conf.php index bc1fdc14f..5a0438f3b 100644 --- a/app/i18n/de/conf.php +++ b/app/i18n/de/conf.php @@ -66,6 +66,19 @@ return array( 'thin' => 'Klein', ), ), + 'logs' => array( + 'loglist' => array( + 'level' => 'Log Stufe', + 'message' => 'Log Nachricht', + 'timestamp' => 'Zeitstempel', + ), + 'pagination' => array( + 'first' => 'Erste', + 'last' => 'Letzte', + 'next' => 'Nächste', + 'previous' => 'Vorherige', + ), + ), 'profile' => array( '_' => 'Profil-Verwaltung', 'api' => 'API-Verwaltung', diff --git a/app/i18n/de/gen.php b/app/i18n/de/gen.php index 3f81a2e34..493cb3b1a 100644 --- a/app/i18n/de/gen.php +++ b/app/i18n/de/gen.php @@ -176,12 +176,6 @@ return array( 'user_management' => 'Benutzer verwalten', 'user_profile' => 'Profil', ), - 'pagination' => array( - 'first' => 'Erste', - 'last' => 'Letzte', - 'next' => 'Nächste', - 'previous' => 'Vorherige', - ), 'period' => array( 'days' => 'Tage', 'hours' => 'Stunden', diff --git a/app/i18n/en-us/conf.php b/app/i18n/en-us/conf.php index de51f5881..dcb530e90 100644 --- a/app/i18n/en-us/conf.php +++ b/app/i18n/en-us/conf.php @@ -66,6 +66,19 @@ return array( 'thin' => 'Narrow', // IGNORE ), ), + 'logs' => array( + 'loglist' => array( + 'level' => 'Log Level', // TODO + 'message' => 'Log Message', // TODO + 'timestamp' => 'Timestamp', // TODO + ), + 'pagination' => array( + 'first' => 'First', // IGNORE + 'last' => 'Last', // IGNORE + 'next' => 'Next', // IGNORE + 'previous' => 'Previous', // IGNORE + ), + ), 'profile' => array( '_' => 'Profile management', // IGNORE 'api' => 'API management', // IGNORE diff --git a/app/i18n/en-us/gen.php b/app/i18n/en-us/gen.php index 35d2c2cfd..2bebf441a 100644 --- a/app/i18n/en-us/gen.php +++ b/app/i18n/en-us/gen.php @@ -176,12 +176,6 @@ return array( 'user_management' => 'Manage users', // IGNORE 'user_profile' => 'Profile', // IGNORE ), - 'pagination' => array( - 'first' => 'First', // IGNORE - 'last' => 'Last', // IGNORE - 'next' => 'Next', // IGNORE - 'previous' => 'Previous', // IGNORE - ), 'period' => array( 'days' => 'days', // IGNORE 'hours' => 'hours', // IGNORE diff --git a/app/i18n/en/conf.php b/app/i18n/en/conf.php index 2bbceafca..7050a5cdc 100644 --- a/app/i18n/en/conf.php +++ b/app/i18n/en/conf.php @@ -66,6 +66,19 @@ return array( 'thin' => 'Narrow', ), ), + 'logs' => array( + 'loglist' => array( + 'level' => 'Log Level', // TODO + 'message' => 'Log Message', // TODO + 'timestamp' => 'Timestamp', // TODO + ), + 'pagination' => array( + 'first' => 'First', + 'last' => 'Last', + 'next' => 'Next', + 'previous' => 'Previous', + ), + ), 'profile' => array( '_' => 'Profile management', 'api' => 'API management', diff --git a/app/i18n/en/gen.php b/app/i18n/en/gen.php index 9fd81a716..06c8d356a 100644 --- a/app/i18n/en/gen.php +++ b/app/i18n/en/gen.php @@ -176,12 +176,6 @@ return array( 'user_management' => 'Manage users', 'user_profile' => 'Profile', ), - 'pagination' => array( - 'first' => 'First', - 'last' => 'Last', - 'next' => 'Next', - 'previous' => 'Previous', - ), 'period' => array( 'days' => 'days', 'hours' => 'hours', diff --git a/app/i18n/es/conf.php b/app/i18n/es/conf.php index d5b25469d..63289f800 100755 --- a/app/i18n/es/conf.php +++ b/app/i18n/es/conf.php @@ -66,6 +66,19 @@ return array( 'thin' => 'Estrecho', ), ), + 'logs' => array( + 'loglist' => array( + 'level' => 'Log Level', // TODO + 'message' => 'Log Message', // TODO + 'timestamp' => 'Timestamp', // TODO + ), + 'pagination' => array( + 'first' => 'Primero', + 'last' => 'Último', + 'next' => 'Siguiente', + 'previous' => 'Anterior', + ), + ), 'profile' => array( '_' => 'Administración de perfiles', 'api' => 'Administración de API', diff --git a/app/i18n/es/gen.php b/app/i18n/es/gen.php index de7b53924..c63bacedf 100755 --- a/app/i18n/es/gen.php +++ b/app/i18n/es/gen.php @@ -176,12 +176,6 @@ return array( 'user_management' => 'Administrar usuarios', 'user_profile' => 'Perfil', ), - 'pagination' => array( - 'first' => 'Primero', - 'last' => 'Último', - 'next' => 'Siguiente', - 'previous' => 'Anterior', - ), 'period' => array( 'days' => 'dias', 'hours' => 'horas', diff --git a/app/i18n/fr/conf.php b/app/i18n/fr/conf.php index 8d097fa59..c48a7bb6c 100644 --- a/app/i18n/fr/conf.php +++ b/app/i18n/fr/conf.php @@ -66,6 +66,19 @@ return array( 'thin' => 'Fine', ), ), + 'logs' => array( + 'loglist' => array( + 'level' => 'Niveau de sévérité', + 'message' => 'Message de journal', + 'timestamp' => 'Horodatage', + ), + 'pagination' => array( + 'first' => 'Début', + 'last' => 'Fin', + 'next' => 'Suivant', + 'previous' => 'Précédent', + ), + ), 'profile' => array( '_' => 'Gestion du profil', 'api' => 'Gestion de l’API', diff --git a/app/i18n/fr/gen.php b/app/i18n/fr/gen.php index 80a1d7276..0554f6d52 100644 --- a/app/i18n/fr/gen.php +++ b/app/i18n/fr/gen.php @@ -176,12 +176,6 @@ return array( 'user_management' => 'Gestion des utilisateurs', 'user_profile' => 'Profil', ), - 'pagination' => array( - 'first' => 'Début', - 'last' => 'Fin', - 'next' => 'Suivant', - 'previous' => 'Précédent', - ), 'period' => array( 'days' => 'jours', 'hours' => 'heures', diff --git a/app/i18n/he/conf.php b/app/i18n/he/conf.php index 62dca4b11..7ce29c582 100644 --- a/app/i18n/he/conf.php +++ b/app/i18n/he/conf.php @@ -66,6 +66,19 @@ return array( 'thin' => 'צר', ), ), + 'logs' => array( + 'loglist' => array( + 'level' => 'Log Level', // TODO + 'message' => 'Log Message', // TODO + 'timestamp' => 'Timestamp', // TODO + ), + 'pagination' => array( + 'first' => 'הראשון', + 'last' => 'אחרון', + 'next' => 'הבא', + 'previous' => 'הקודם', + ), + ), 'profile' => array( '_' => 'Profile management', // TODO 'api' => 'API management', // TODO diff --git a/app/i18n/he/gen.php b/app/i18n/he/gen.php index e9da2bb9e..144c1242a 100644 --- a/app/i18n/he/gen.php +++ b/app/i18n/he/gen.php @@ -176,12 +176,6 @@ return array( 'user_management' => 'Manage users', // TODO 'user_profile' => 'Profile', // TODO ), - 'pagination' => array( - 'first' => 'הראשון', - 'last' => 'אחרון', - 'next' => 'הבא', - 'previous' => 'הקודם', - ), 'period' => array( 'days' => 'days', // TODO 'hours' => 'hours', // TODO diff --git a/app/i18n/it/conf.php b/app/i18n/it/conf.php index a9fc1a6d8..41f7e041c 100644 --- a/app/i18n/it/conf.php +++ b/app/i18n/it/conf.php @@ -66,6 +66,19 @@ return array( 'thin' => 'Stretto', ), ), + 'logs' => array( + 'loglist' => array( + 'level' => 'Log Level', // TODO + 'message' => 'Log Message', // TODO + 'timestamp' => 'Timestamp', // TODO + ), + 'pagination' => array( + 'first' => 'Prima', + 'last' => 'Ultima', + 'next' => 'Successiva', + 'previous' => 'Precedente', + ), + ), 'profile' => array( '_' => 'Gestione profili', 'api' => 'API management', // TODO diff --git a/app/i18n/it/gen.php b/app/i18n/it/gen.php index b65b7305d..fa1e9d3c6 100644 --- a/app/i18n/it/gen.php +++ b/app/i18n/it/gen.php @@ -176,12 +176,6 @@ return array( 'user_management' => 'Gestione utenti', 'user_profile' => 'Profilo', ), - 'pagination' => array( - 'first' => 'Prima', - 'last' => 'Ultima', - 'next' => 'Successiva', - 'previous' => 'Precedente', - ), 'period' => array( 'days' => 'days', // TODO 'hours' => 'hours', // TODO diff --git a/app/i18n/ja/conf.php b/app/i18n/ja/conf.php index 113d385dd..29d69cd6b 100644 --- a/app/i18n/ja/conf.php +++ b/app/i18n/ja/conf.php @@ -66,6 +66,19 @@ return array( 'thin' => '狭い', ), ), + 'logs' => array( + 'loglist' => array( + 'level' => 'Log Level', // TODO + 'message' => 'Log Message', // TODO + 'timestamp' => 'Timestamp', // TODO + ), + 'pagination' => array( + 'first' => '先頭', + 'last' => '最後', + 'next' => 'つぎへ', + 'previous' => '前へ', + ), + ), 'profile' => array( '_' => 'プロフィール', 'api' => 'API管理', diff --git a/app/i18n/ja/gen.php b/app/i18n/ja/gen.php index 360ae1d87..a5d55fec9 100644 --- a/app/i18n/ja/gen.php +++ b/app/i18n/ja/gen.php @@ -176,12 +176,6 @@ return array( 'user_management' => 'ユーザー管理', 'user_profile' => 'プロフィール', ), - 'pagination' => array( - 'first' => '先頭', - 'last' => '最後', - 'next' => 'つぎへ', - 'previous' => '前へ', - ), 'period' => array( 'days' => '日', 'hours' => '時', diff --git a/app/i18n/ko/conf.php b/app/i18n/ko/conf.php index 1c9674d3c..01d853585 100644 --- a/app/i18n/ko/conf.php +++ b/app/i18n/ko/conf.php @@ -66,6 +66,19 @@ return array( 'thin' => '얇게', ), ), + 'logs' => array( + 'loglist' => array( + 'level' => 'Log Level', // TODO + 'message' => 'Log Message', // TODO + 'timestamp' => 'Timestamp', // TODO + ), + 'pagination' => array( + 'first' => '처음으로', + 'last' => '마지막으로', + 'next' => '다음', + 'previous' => '이전', + ), + ), 'profile' => array( '_' => '프로필 관리', 'api' => 'API 관리', diff --git a/app/i18n/ko/gen.php b/app/i18n/ko/gen.php index 566bdd4d5..d996ac467 100644 --- a/app/i18n/ko/gen.php +++ b/app/i18n/ko/gen.php @@ -176,12 +176,6 @@ return array( 'user_management' => '사용자 관리', 'user_profile' => '프로필', ), - 'pagination' => array( - 'first' => '처음으로', - 'last' => '마지막으로', - 'next' => '다음', - 'previous' => '이전', - ), 'period' => array( 'days' => '일', 'hours' => '시', diff --git a/app/i18n/nl/conf.php b/app/i18n/nl/conf.php index 6e266c350..f8c11707a 100644 --- a/app/i18n/nl/conf.php +++ b/app/i18n/nl/conf.php @@ -66,6 +66,19 @@ return array( 'thin' => 'Smal', ), ), + 'logs' => array( + 'loglist' => array( + 'level' => 'Log Level', // TODO + 'message' => 'Log Message', // TODO + 'timestamp' => 'Timestamp', // TODO + ), + 'pagination' => array( + 'first' => 'Eerste', + 'last' => 'Laatste', + 'next' => 'Volgende', + 'previous' => 'Vorige', + ), + ), 'profile' => array( '_' => 'Profielbeheer', 'api' => 'API-beheer', diff --git a/app/i18n/nl/gen.php b/app/i18n/nl/gen.php index 81b265616..286b69c85 100644 --- a/app/i18n/nl/gen.php +++ b/app/i18n/nl/gen.php @@ -176,12 +176,6 @@ return array( 'user_management' => 'Gebruikersbeheer', 'user_profile' => 'Profiel', ), - 'pagination' => array( - 'first' => 'Eerste', - 'last' => 'Laatste', - 'next' => 'Volgende', - 'previous' => 'Vorige', - ), 'period' => array( 'days' => 'dagen', 'hours' => 'uren', diff --git a/app/i18n/oc/conf.php b/app/i18n/oc/conf.php index 28f11798a..3cca02c2b 100644 --- a/app/i18n/oc/conf.php +++ b/app/i18n/oc/conf.php @@ -66,6 +66,19 @@ return array( 'thin' => 'Fina', ), ), + 'logs' => array( + 'loglist' => array( + 'level' => 'Log Level', // TODO + 'message' => 'Log Message', // TODO + 'timestamp' => 'Timestamp', // TODO + ), + 'pagination' => array( + 'first' => 'Debuta', + 'last' => 'Fin', + 'next' => 'Seguent', + 'previous' => 'Precedent', + ), + ), 'profile' => array( '_' => 'Gestion del perfil', 'api' => 'Gestion API', diff --git a/app/i18n/oc/gen.php b/app/i18n/oc/gen.php index 88758ab0d..86f556895 100644 --- a/app/i18n/oc/gen.php +++ b/app/i18n/oc/gen.php @@ -176,12 +176,6 @@ return array( 'user_management' => 'Gestion dels utilizaires', 'user_profile' => 'Perfil', ), - 'pagination' => array( - 'first' => 'Debuta', - 'last' => 'Fin', - 'next' => 'Seguent', - 'previous' => 'Precedent', - ), 'period' => array( 'days' => 'jorns', 'hours' => 'oras', diff --git a/app/i18n/pl/conf.php b/app/i18n/pl/conf.php index 4c5dd0646..fa342abdd 100644 --- a/app/i18n/pl/conf.php +++ b/app/i18n/pl/conf.php @@ -66,6 +66,19 @@ return array( 'thin' => 'Wąska', ), ), + 'logs' => array( + 'loglist' => array( + 'level' => 'Log Level', // TODO + 'message' => 'Log Message', // TODO + 'timestamp' => 'Timestamp', // TODO + ), + 'pagination' => array( + 'first' => 'Początek', + 'last' => 'Koniec', + 'next' => 'Następne', + 'previous' => 'Poprzednie', + ), + ), 'profile' => array( '_' => 'Zarządzanie profilem', 'api' => 'Zarządzanie API', diff --git a/app/i18n/pl/gen.php b/app/i18n/pl/gen.php index 2acb5ece2..dc7d31da7 100644 --- a/app/i18n/pl/gen.php +++ b/app/i18n/pl/gen.php @@ -176,12 +176,6 @@ return array( 'user_management' => 'Zarządzanie użytkownikami', 'user_profile' => 'Profil', ), - 'pagination' => array( - 'first' => 'Początek', - 'last' => 'Koniec', - 'next' => 'Następne', - 'previous' => 'Poprzednie', - ), 'period' => array( 'days' => 'dni', 'hours' => 'godziny', diff --git a/app/i18n/pt-br/conf.php b/app/i18n/pt-br/conf.php index 2b6241449..07d1c7872 100644 --- a/app/i18n/pt-br/conf.php +++ b/app/i18n/pt-br/conf.php @@ -66,6 +66,19 @@ return array( 'thin' => 'Fino', ), ), + 'logs' => array( + 'loglist' => array( + 'level' => 'Log Level', // TODO + 'message' => 'Log Message', // TODO + 'timestamp' => 'Timestamp', // TODO + ), + 'pagination' => array( + 'first' => 'Primeiro', + 'last' => 'Último', + 'next' => 'Próximo', + 'previous' => 'Anterior', + ), + ), 'profile' => array( '_' => 'Gerenciamento de perfil', 'api' => 'Administração da API', diff --git a/app/i18n/pt-br/gen.php b/app/i18n/pt-br/gen.php index 744b89788..c1cb7326c 100644 --- a/app/i18n/pt-br/gen.php +++ b/app/i18n/pt-br/gen.php @@ -176,12 +176,6 @@ return array( 'user_management' => 'Gerenciamento de usuários', 'user_profile' => 'Perfil', ), - 'pagination' => array( - 'first' => 'Primeiro', - 'last' => 'Último', - 'next' => 'Próximo', - 'previous' => 'Anterior', - ), 'period' => array( 'days' => 'dias', 'hours' => 'horas', diff --git a/app/i18n/ru/conf.php b/app/i18n/ru/conf.php index 577076805..1c6e3af5a 100644 --- a/app/i18n/ru/conf.php +++ b/app/i18n/ru/conf.php @@ -66,6 +66,19 @@ return array( 'thin' => 'Узкое', ), ), + 'logs' => array( + 'loglist' => array( + 'level' => 'Log Level', // TODO + 'message' => 'Log Message', // TODO + 'timestamp' => 'Timestamp', // TODO + ), + 'pagination' => array( + 'first' => 'Первая', + 'last' => 'Последняя', + 'next' => 'Следующая', + 'previous' => 'Предыдущая', + ), + ), 'profile' => array( '_' => 'Настройки профиля', 'api' => 'Настройки API', diff --git a/app/i18n/ru/gen.php b/app/i18n/ru/gen.php index 3a2f2de28..4c0334153 100644 --- a/app/i18n/ru/gen.php +++ b/app/i18n/ru/gen.php @@ -176,12 +176,6 @@ return array( 'user_management' => 'Управление пользователями', 'user_profile' => 'Профиль', ), - 'pagination' => array( - 'first' => 'Первая', - 'last' => 'Последняя', - 'next' => 'Следующая', - 'previous' => 'Предыдущая', - ), 'period' => array( 'days' => 'дней', 'hours' => 'часов', diff --git a/app/i18n/sk/conf.php b/app/i18n/sk/conf.php index cbade872d..35a34c136 100644 --- a/app/i18n/sk/conf.php +++ b/app/i18n/sk/conf.php @@ -66,6 +66,19 @@ return array( 'thin' => 'Úzka', ), ), + 'logs' => array( + 'loglist' => array( + 'level' => 'Log Level', // TODO + 'message' => 'Log Message', // TODO + 'timestamp' => 'Timestamp', // TODO + ), + 'pagination' => array( + 'first' => 'Prvý', + 'last' => 'Posledný', + 'next' => 'Ďalší', + 'previous' => 'Predošlý', + ), + ), 'profile' => array( '_' => 'Správca profilu', 'api' => 'Správa API', diff --git a/app/i18n/sk/gen.php b/app/i18n/sk/gen.php index 9c060f690..6954e7cbb 100644 --- a/app/i18n/sk/gen.php +++ b/app/i18n/sk/gen.php @@ -176,12 +176,6 @@ return array( 'user_management' => 'Spravovať používateľov', 'user_profile' => 'Profil', ), - 'pagination' => array( - 'first' => 'Prvý', - 'last' => 'Posledný', - 'next' => 'Ďalší', - 'previous' => 'Predošlý', - ), 'period' => array( 'days' => 'dni', 'hours' => 'hodiny', diff --git a/app/i18n/tr/conf.php b/app/i18n/tr/conf.php index ae1a2bf47..e3750235c 100644 --- a/app/i18n/tr/conf.php +++ b/app/i18n/tr/conf.php @@ -66,6 +66,19 @@ return array( 'thin' => 'Zayıf', ), ), + 'logs' => array( + 'loglist' => array( + 'level' => 'Log Level', // TODO + 'message' => 'Log Message', // TODO + 'timestamp' => 'Timestamp', // TODO + ), + 'pagination' => array( + 'first' => 'İlk', + 'last' => 'Son', + 'next' => 'Sonraki', + 'previous' => 'Önceki', + ), + ), 'profile' => array( '_' => 'Profil yönetimi', 'api' => 'API yönetimi', diff --git a/app/i18n/tr/gen.php b/app/i18n/tr/gen.php index 56b7a3962..6d6aac595 100644 --- a/app/i18n/tr/gen.php +++ b/app/i18n/tr/gen.php @@ -176,12 +176,6 @@ return array( 'user_management' => 'Kullanıcıları yönet', 'user_profile' => 'Profil', ), - 'pagination' => array( - 'first' => 'İlk', - 'last' => 'Son', - 'next' => 'Sonraki', - 'previous' => 'Önceki', - ), 'period' => array( 'days' => 'gün', 'hours' => 'saat', diff --git a/app/i18n/zh-cn/conf.php b/app/i18n/zh-cn/conf.php index 44d27e3b0..1c9e1100b 100644 --- a/app/i18n/zh-cn/conf.php +++ b/app/i18n/zh-cn/conf.php @@ -66,6 +66,19 @@ return array( 'thin' => '窄', ), ), + 'logs' => array( + 'loglist' => array( + 'level' => 'Log Level', // TODO + 'message' => 'Log Message', // TODO + 'timestamp' => 'Timestamp', // TODO + ), + 'pagination' => array( + 'first' => '首页', + 'last' => '末页', + 'next' => '下一页', + 'previous' => '上一页', + ), + ), 'profile' => array( '_' => '用户管理', 'api' => 'API 管理', diff --git a/app/i18n/zh-cn/gen.php b/app/i18n/zh-cn/gen.php index 9942f98e7..1071b6703 100644 --- a/app/i18n/zh-cn/gen.php +++ b/app/i18n/zh-cn/gen.php @@ -176,12 +176,6 @@ return array( 'user_management' => '用户管理', 'user_profile' => '用户帐户', ), - 'pagination' => array( - 'first' => '首页', - 'last' => '末页', - 'next' => '下一页', - 'previous' => '上一页', - ), 'period' => array( 'days' => '天', 'hours' => '时', diff --git a/app/layout/aside_configure.phtml b/app/layout/aside_configure.phtml index f71419dc1..5f1762834 100644 --- a/app/layout/aside_configure.phtml +++ b/app/layout/aside_configure.phtml @@ -33,6 +33,11 @@ <li class="item<?= Minz_Request::controllerName() === 'extension' ? ' active' : '' ?>"> <a href="<?= _url('extension', 'index') ?>"><?= _t('gen.menu.extensions') ?></a> </li> + <?php if (!FreshRSS_Auth::hasAccess('admin')) { ?> + <li class="item<?= Minz_Request::actionName() === 'logs' ? ' active' : '' ?>"> + <a href="<?= _url('index', 'logs') ?>"><?= _t('gen.menu.logs') ?></a> + </li> + <?php } ?> <?= Minz_ExtensionManager::callHook('menu_configuration_entry') ?> <?php if (FreshRSS_Auth::hasAccess('admin')) { ?> @@ -53,6 +58,9 @@ <li class="item<?= Minz_Request::controllerName() === 'update' && Minz_Request::actionName() === 'index' ? ' active' : '' ?>"> <a href="<?= _url('update', 'index') ?>"><?= _t('gen.menu.update') ?></a> </li> + <li class="item<?= Minz_Request::actionName() === 'logs' ? ' active' : '' ?>"> + <a href="<?= _url('index', 'logs') ?>"><?= _t('gen.menu.logs') ?></a> + </li> <?php } ?> <?= Minz_ExtensionManager::callHook('menu_admin_entry') ?> <?php } ?> diff --git a/app/views/helpers/logs_pagination.phtml b/app/views/helpers/logs_pagination.phtml index fe6a71a3a..d12b3f9d1 100755 --- a/app/views/helpers/logs_pagination.phtml +++ b/app/views/helpers/logs_pagination.phtml @@ -6,46 +6,53 @@ ?> <?php if ($this->nbPage > 1) { ?> -<ul class="pagination"> - <?php - /** @var int $getteur */ - $params[$getteur] = 1; - ?> - <li class="item pager-first"> - <?php if ($this->currentPage > 1) { ?> - <a href="<?= Minz_Url::display(array('c' => $c, 'a' => $a, 'params' => $params)) ?>">« <?= _t('gen.pagination.first') ?></a> - <?php } ?> - </li> +<nav class="nav-pagination nav-list"> + <ul class="pagination"> + <?php + /** @var int $getteur */ + $params[$getteur] = 1; + ?> + <li class="item pager-first"> + <a href="<?= Minz_Url::display(array('c' => $c, 'a' => $a, 'params' => $params)) ?>">« <?= _t('conf.logs.pagination.first') ?></a> + </li> - <?php $params[$getteur] = $this->currentPage - 1; ?> - <li class="item pager-previous"> - <?php if ($this->currentPage > 1) { ?> - <a href="<?= Minz_Url::display(array('c' => $c, 'a' => $a, 'params' => $params)) ?>">‹ <?= _t('gen.pagination.previous') ?></a> - <?php } ?> - </li> + <?php $params[$getteur] = $this->currentPage - 1; ?> + <li class="item pager-previous"> + <a href="<?= Minz_Url::display(array('c' => $c, 'a' => $a, 'params' => $params)) ?>">‹ <?= _t('conf.logs.pagination.previous') ?></a> + </li> - <?php for ($i = $this->currentPage - 2; $i <= $this->currentPage + 2; $i++) { ?> - <?php if($i > 0 && $i <= $this->nbPage) { ?> - <?php if ($i != $this->currentPage) { ?> - <?php $params[$getteur] = $i; ?> - <li class="item pager-item"><a href="<?= Minz_Url::display(array('c' => $c, 'a' => $a, 'params' => $params)) ?>"><?= $i ?></a></li> - <?php } else { ?> - <li class="item pager-current"><?= $i ?></li> - <?php } ?> + <?php if ($this->currentPage - 2 > 1) { ?> + <li class="item">…</a></li> <?php } ?> - <?php } ?> - <?php $params[$getteur] = $this->currentPage + 1; ?> - <li class="item pager-next"> - <?php if ($this->currentPage < $this->nbPage) { ?> - <a href="<?= Minz_Url::display(array('c' => $c, 'a' => $a, 'params' => $params)) ?>"><?= _t('gen.pagination.next') ?> ›</a> - <?php } ?> - </li> - <?php $params[$getteur] = $this->nbPage; ?> - <li class="item pager-last"> - <?php if ($this->currentPage < $this->nbPage) { ?> - <a href="<?= Minz_Url::display(array('c' => $c, 'a' => $a, 'params' => $params)) ?>"><?= _t('gen.pagination.last') ?> »</a> + <?php + for ($i = $this->currentPage - 2; $i <= $this->currentPage + 2; $i++) { + if($i > 0 && $i <= $this->nbPage) { + if ($i != $this->currentPage) { + $params[$getteur] = $i; + $class = ''; + $aria = 'false'; + } else { + $class = ' active'; + $aria = 'true'; + } ?> + <li class="item<?= $class ?>"><a href="<?= Minz_Url::display(array('c' => $c, 'a' => $a, 'params' => $params)) ?>" aria-current="<?= $aria ?>"><?= $i ?></a></li> + <?php + } + } ?> + + <?php if ($this->nbPage > $i - 1) { ?> + <li class="item">…</a></li> <?php } ?> - </li> -</ul> + + <?php $params[$getteur] = $this->currentPage + 1; ?> + <li class="item pager-next"> + <a href="<?= Minz_Url::display(array('c' => $c, 'a' => $a, 'params' => $params)) ?>"><?= _t('conf.logs.pagination.next') ?> ›</a> + </li> + <?php $params[$getteur] = $this->nbPage; ?> + <li class="item pager-last"> + <a href="<?= Minz_Url::display(array('c' => $c, 'a' => $a, 'params' => $params)) ?>"><?= _t('conf.logs.pagination.last') ?> »</a> + </li> + </ul> +</nav> <?php } ?> diff --git a/app/views/index/logs.phtml b/app/views/index/logs.phtml index bb11f9f69..8221d2d4b 100644 --- a/app/views/index/logs.phtml +++ b/app/views/index/logs.phtml @@ -1,15 +1,12 @@ <?php /** @var FreshRSS_View $this */ ?> -<main class="post content"> +<?php $this->partial('aside_configure'); ?> +<main class="post"> <div class="link-back-wrapper"> <a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a> </div> <h1><?= _t('index.log') ?></h1> - <form method="post" action="<?= _url('index', 'logs') ?>"><p> - <input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" /> - <input type="hidden" name="clearLogs" /> - <button type="submit" class="btn"><?= _t('index.log.clear') ?></button> - </p></form> + <?php /** @var array<FreshRSS_Log> $items */ @@ -17,18 +14,49 @@ ?> <?php if (!empty($items)) { ?> - <div class="loglist"> - <?php $this->logsPaginator->render('logs_pagination.phtml', 'page'); ?> - + <?php $this->logsPaginator->render('logs_pagination.phtml', 'page'); ?> + <div id="loglist-wrapper"> + <table id="loglist"> + <thead> + <th><?= _t('conf.logs.loglist.level') ?></th> + <th><?= _t('conf.logs.loglist.timestamp') ?></th> + <th><?= _t('conf.logs.loglist.message') ?></th> + </thead> + <tbody> <?php foreach ($items as $log) { ?> - <div class="log <?= $log->level() ?>"><span class="date"> - <?= @date('Y-m-d H:i:s', @strtotime($log->date())) ?> - </span><?= htmlspecialchars($log->info(), ENT_NOQUOTES, 'UTF-8') ?></div> + <tr class="log-item"> + <td class="log-<?= $log->level() ?>"> + <?= _i($log->level()) ?> + </td> + <td class="log-date"> + <time datetime="<?= @date('Y-m-d H:i:s', @strtotime($log->date())) ?>"> + <?= @date('Y-m-d H:i:s', @strtotime($log->date())) ?> + </time> + </td> + <td class="log-message"> + <?= htmlspecialchars($log->info(), ENT_NOQUOTES, 'UTF-8') ?> + </td> + </tr> <?php } ?> + </tbody> + </table> + </div> + <?php $this->logsPaginator->render('logs_pagination.phtml', 'page'); ?> + - <?php $this->logsPaginator->render('logs_pagination.phtml', 'page'); ?> + + <form method="post" action="<?= _url('index', 'logs') ?>"> + <div class="form-group form-actions"> + <input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" /> + <input type="hidden" name="clearLogs" /> + <div class="group-controls"> + <button type="submit" class="btn btn-attention"><?= _t('index.log.clear') ?></button> + </div> </div> + </form> + <?php } else { ?> <p class="alert alert-warn"><?= _t('index.log.empty') ?></p> <?php } ?> + </main> |
