Implement pagination and detailed views for ad campaigns in admin panel
- Added pagination support for the ads list, allowing admins to navigate through multiple pages of campaigns. - Introduced detailed views for individual ad campaigns, displaying comprehensive statistics and information. - Enhanced the database access layer with new methods for counting and listing campaigns with pagination. - Updated localization files to include new strings for the ads overview and campaign details. - Improved the inline keyboard structure for better navigation within the ads management interface.
This commit is contained in:
+4
-1
@@ -420,5 +420,8 @@
|
||||
"admin_ads_invalid_cost": "❌ Invalid amount. Enter a non-negative number.",
|
||||
"admin_ads_start_param_exists": "❌ A campaign with this start parameter already exists.",
|
||||
"admin_ads_created_success": "✅ Campaign created!\nID: {id}\nSource: {source}\nParam: {start_param}\nCost: {cost} RUB",
|
||||
"admin_ads_back_to_menu_hint": "Done. Back to Ads section:"
|
||||
"admin_ads_back_to_menu_hint": "Done. Back to Ads section:",
|
||||
"admin_ads_overview": "📈 <b>Ads</b>\n💰 Revenue: <b>{revenue} RUB</b>\n💸 Spent: <b>{cost} RUB</b>",
|
||||
"back_to_ads_list_button": "⬅️ Back to list",
|
||||
"admin_ads_card": "📈 <b>Campaign #{id}</b>\nSource: <b>{source}</b>\nstart=<code>{start_param}</code>\nCost: <b>{cost} RUB</b>\nActive: {active}\n\n👥 Starts: <b>{starts}</b>\n🆓 Trials: <b>{trials}</b>\n💳 Payers: <b>{payers}</b>\n💵 Revenue: <b>{revenue} RUB</b>"
|
||||
}
|
||||
|
||||
+4
-1
@@ -419,5 +419,8 @@
|
||||
"admin_ads_invalid_cost": "❌ Неверная сумма. Введите неотрицательное число.",
|
||||
"admin_ads_start_param_exists": "❌ Кампания с таким start-параметром уже существует.",
|
||||
"admin_ads_created_success": "✅ Кампания создана!\nID: {id}\nИсточник: {source}\nПараметр: {start_param}\nЗатраты: {cost} RUB",
|
||||
"admin_ads_back_to_menu_hint": "Готово. Вернуться к разделу рекламы:"
|
||||
"admin_ads_back_to_menu_hint": "Готово. Вернуться к разделу рекламы:",
|
||||
"admin_ads_overview": "📈 <b>Реклама</b>\n💰 Пришло: <b>{revenue} RUB</b>\n💸 Потрачено: <b>{cost} RUB</b>",
|
||||
"back_to_ads_list_button": "⬅️ К списку",
|
||||
"admin_ads_card": "📈 <b>Кампания #{id}</b>\nИсточник: <b>{source}</b>\nstart=<code>{start_param}</code>\nСтоимость: <b>{cost} RUB</b>\nАктивна: {active}\n\n👥 Запустили: <b>{starts}</b>\n🆓 Взяли триал: <b>{trials}</b>\n💳 Оплатили: <b>{payers}</b>\n💵 Доход: <b>{revenue} RUB</b>"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user