From e662a9937bb7f4c0ef9615c833b17a98f26d6e19 Mon Sep 17 00:00:00 2001 From: Awilum Date: Wed, 12 Feb 2014 00:08:13 +0200 Subject: [PATCH] Plugins. README.MD #167 --- plugins/box/plugins/languages/de.lang.php | 1 + plugins/box/plugins/languages/en.lang.php | 1 + plugins/box/plugins/languages/es.lang.php | 1 + plugins/box/plugins/languages/fa.lang.php | 1 + plugins/box/plugins/languages/fr.lang.php | 1 + plugins/box/plugins/languages/hu.lang.php | 1 + plugins/box/plugins/languages/id.lang.php | 1 + plugins/box/plugins/languages/it.lang.php | 1 + plugins/box/plugins/languages/ja.lang.php | 1 + plugins/box/plugins/languages/lt.lang.php | 1 + plugins/box/plugins/languages/nl.lang.php | 1 + plugins/box/plugins/languages/pl.lang.php | 1 + plugins/box/plugins/languages/pt-br.lang.php | 1 + plugins/box/plugins/languages/ru.lang.php | 1 + plugins/box/plugins/languages/sk.lang.php | 1 + plugins/box/plugins/languages/sr-yu.lang.php | 1 + plugins/box/plugins/languages/uk.lang.php | 1 + plugins/box/plugins/plugins.admin.php | 22 +++++++++++++------ .../box/plugins/views/backend/index.view.php | 2 ++ 19 files changed, 34 insertions(+), 7 deletions(-) diff --git a/plugins/box/plugins/languages/de.lang.php b/plugins/box/plugins/languages/de.lang.php index a051658..d95c263 100644 --- a/plugins/box/plugins/languages/de.lang.php +++ b/plugins/box/plugins/languages/de.lang.php @@ -16,5 +16,6 @@ 'Get More Plugins' => 'Hole weitere Plugins', 'Install' => 'Installieren', 'Uninstall' => 'Deinstallieren', + 'README.md not found' => 'README.md not found', ) ); diff --git a/plugins/box/plugins/languages/en.lang.php b/plugins/box/plugins/languages/en.lang.php index 7c5adf6..6cbe795 100644 --- a/plugins/box/plugins/languages/en.lang.php +++ b/plugins/box/plugins/languages/en.lang.php @@ -16,5 +16,6 @@ 'Get More Plugins' => 'Get More Plugins', 'Install' => 'Install', 'Uninstall' => 'Uninstall', + 'README.md not found' => 'README.md not found', ) ); diff --git a/plugins/box/plugins/languages/es.lang.php b/plugins/box/plugins/languages/es.lang.php index c02c7d7..005fdc9 100644 --- a/plugins/box/plugins/languages/es.lang.php +++ b/plugins/box/plugins/languages/es.lang.php @@ -16,5 +16,6 @@ 'Get More Plugins' => 'Obtener mas plugins', 'Install' => 'Instalar', 'Uninstall' => 'Desinstalar', + 'README.md not found' => 'README.md not found', ) ); \ No newline at end of file diff --git a/plugins/box/plugins/languages/fa.lang.php b/plugins/box/plugins/languages/fa.lang.php index bfc873b..849e026 100644 --- a/plugins/box/plugins/languages/fa.lang.php +++ b/plugins/box/plugins/languages/fa.lang.php @@ -16,5 +16,6 @@ 'Get More Plugins' => 'دریافت افزونه های بیشتر', 'Install' => 'نصب', 'Uninstall' => 'حذف', + 'README.md not found' => 'README.md not found', ) ); diff --git a/plugins/box/plugins/languages/fr.lang.php b/plugins/box/plugins/languages/fr.lang.php index f438b6e..e1324fb 100644 --- a/plugins/box/plugins/languages/fr.lang.php +++ b/plugins/box/plugins/languages/fr.lang.php @@ -16,5 +16,6 @@ 'Get More Plugins' => 'Obtenez plus de plugins', 'Install' => 'Installer', 'Uninstall' => 'Désinstaller', + 'README.md not found' => 'README.md not found', ) ); \ No newline at end of file diff --git a/plugins/box/plugins/languages/hu.lang.php b/plugins/box/plugins/languages/hu.lang.php index abb3e75..ee20943 100644 --- a/plugins/box/plugins/languages/hu.lang.php +++ b/plugins/box/plugins/languages/hu.lang.php @@ -16,5 +16,6 @@ 'Get More Plugins' => 'Még több Plugin', 'Install' => 'Telepít', 'Uninstall' => 'Töröl', + 'README.md not found' => 'README.md not found', ) ); diff --git a/plugins/box/plugins/languages/id.lang.php b/plugins/box/plugins/languages/id.lang.php index 03cd8e5..b53dd87 100644 --- a/plugins/box/plugins/languages/id.lang.php +++ b/plugins/box/plugins/languages/id.lang.php @@ -16,5 +16,6 @@ 'Get More Plugins' => 'Cari Plugins Baru', 'Install' => 'Memasangkan', 'Uninstall' => 'Menghapus Program', + 'README.md not found' => 'README.md not found', ) ); diff --git a/plugins/box/plugins/languages/it.lang.php b/plugins/box/plugins/languages/it.lang.php index 4d0f0a6..e47599a 100644 --- a/plugins/box/plugins/languages/it.lang.php +++ b/plugins/box/plugins/languages/it.lang.php @@ -16,5 +16,6 @@ 'Get More Plugins' => 'Scarica altri plugin', 'Install' => 'Installa', 'Uninstall' => 'Disinstalla', + 'README.md not found' => 'README.md not found', ) ); diff --git a/plugins/box/plugins/languages/ja.lang.php b/plugins/box/plugins/languages/ja.lang.php index 9d52c2f..816afd4 100644 --- a/plugins/box/plugins/languages/ja.lang.php +++ b/plugins/box/plugins/languages/ja.lang.php @@ -16,5 +16,6 @@ 'Get More Plugins' => 'さらにプラグインを取得', 'Install' => 'インストール', 'Uninstall' => '停止', + 'README.md not found' => 'README.md not found', ) ); diff --git a/plugins/box/plugins/languages/lt.lang.php b/plugins/box/plugins/languages/lt.lang.php index ecfb8a4..6bcefbb 100644 --- a/plugins/box/plugins/languages/lt.lang.php +++ b/plugins/box/plugins/languages/lt.lang.php @@ -16,5 +16,6 @@ 'Get More Plugins' => 'Gauti daugiau papildinių', 'Install' => 'Įdiegti', 'Uninstall' => 'Išdiegti', + 'README.md not found' => 'README.md not found', ) ); diff --git a/plugins/box/plugins/languages/nl.lang.php b/plugins/box/plugins/languages/nl.lang.php index bf77064..44b2171 100644 --- a/plugins/box/plugins/languages/nl.lang.php +++ b/plugins/box/plugins/languages/nl.lang.php @@ -16,5 +16,6 @@ 'Get More Plugins' => 'Vind meer plugins', 'Install' => 'Installeren', 'Uninstall' => 'Deinstalleren', + 'README.md not found' => 'README.md not found', ) ); diff --git a/plugins/box/plugins/languages/pl.lang.php b/plugins/box/plugins/languages/pl.lang.php index 4211147..8b97cf4 100644 --- a/plugins/box/plugins/languages/pl.lang.php +++ b/plugins/box/plugins/languages/pl.lang.php @@ -16,5 +16,6 @@ 'Get More Plugins' => 'Pobierz więcej wtyczek', 'Install' => 'Instaluj', 'Uninstall' => 'Odinstaluj', + 'README.md not found' => 'README.md not found', ) ); diff --git a/plugins/box/plugins/languages/pt-br.lang.php b/plugins/box/plugins/languages/pt-br.lang.php index 91e5600..cb10e0d 100644 --- a/plugins/box/plugins/languages/pt-br.lang.php +++ b/plugins/box/plugins/languages/pt-br.lang.php @@ -16,5 +16,6 @@ 'Get More Plugins' => 'Ver mais plugins', 'Install' => 'Instalar', 'Uninstall' => 'Desinstalar', + 'README.md not found' => 'README.md not found', ) ); diff --git a/plugins/box/plugins/languages/ru.lang.php b/plugins/box/plugins/languages/ru.lang.php index e0253d3..f68c639 100644 --- a/plugins/box/plugins/languages/ru.lang.php +++ b/plugins/box/plugins/languages/ru.lang.php @@ -16,5 +16,6 @@ 'Get More Plugins' => 'Скачать другие плагины', 'Install' => 'Установить', 'Uninstall' => 'Удалить', + 'README.md not found' => 'README.md not found', ) ); diff --git a/plugins/box/plugins/languages/sk.lang.php b/plugins/box/plugins/languages/sk.lang.php index 133f294..e09265c 100644 --- a/plugins/box/plugins/languages/sk.lang.php +++ b/plugins/box/plugins/languages/sk.lang.php @@ -16,5 +16,6 @@ 'Get More Plugins' => 'Získať viacej pluginov', 'Install' => 'Inštalovať', 'Uninstall' => 'Odinštalovať', + 'README.md not found' => 'README.md not found', ) ); diff --git a/plugins/box/plugins/languages/sr-yu.lang.php b/plugins/box/plugins/languages/sr-yu.lang.php index 0aba28b..b6368a8 100644 --- a/plugins/box/plugins/languages/sr-yu.lang.php +++ b/plugins/box/plugins/languages/sr-yu.lang.php @@ -16,5 +16,6 @@ 'Get More Plugins' => 'Dodaj još dodataka', 'Install' => 'Instaliraj', 'Uninstall' => 'Deinstaliraj', + 'README.md not found' => 'README.md not found', ) ); \ No newline at end of file diff --git a/plugins/box/plugins/languages/uk.lang.php b/plugins/box/plugins/languages/uk.lang.php index 464bee4..ff0bcb4 100644 --- a/plugins/box/plugins/languages/uk.lang.php +++ b/plugins/box/plugins/languages/uk.lang.php @@ -16,5 +16,6 @@ 'Get More Plugins' => 'Завантажити інші плагіни', 'Install' => 'Установити', 'Uninstall' => 'Видалити', + 'README.md not found' => 'README.md not found', ) ); diff --git a/plugins/box/plugins/plugins.admin.php b/plugins/box/plugins/plugins.admin.php index e3a1c4a..b500d55 100755 --- a/plugins/box/plugins/plugins.admin.php +++ b/plugins/box/plugins/plugins.admin.php @@ -15,13 +15,6 @@ Action::add('admin_pre_render','PluginsAdmin::_readmeLoadAjax'); class PluginsAdmin extends Backend { - public static function _readmeLoadAjax() { - if (Request::post('readme_plugin')) { - echo Text::toHtml(markdown(Html::toText(File::getContent(PLUGINS . DS . Request::post('readme_plugin') . DS . 'README.md')))); - Request::shutdown(); - } - } - /** * Plugins admin */ @@ -230,4 +223,19 @@ class PluginsAdmin extends Backend )) ->display(); } + + /** + * _readmeLoadAjax + */ + public static function _readmeLoadAjax() { + if (Request::post('readme_plugin')) { + if (File::exists($file = PLUGINS . DS . Request::post('readme_plugin') . DS . 'README.md')) { + echo Text::toHtml(markdown(Html::toText(File::getContent($file)))); + } else { + echo __('README.md not found', 'plugins'); + } + Request::shutdown(); + } + } + } diff --git a/plugins/box/plugins/views/backend/index.view.php b/plugins/box/plugins/views/backend/index.view.php index 075b8d1..b6c5d45 100755 --- a/plugins/box/plugins/views/backend/index.view.php +++ b/plugins/box/plugins/views/backend/index.view.php @@ -43,10 +43,12 @@
+ 'btn btn-info readme_plugin', 'data-toggle' => 'modal', 'data-target' => '#readme', 'readme_plugin' => $plugin['id'])); ?> + 'btn btn-danger', 'onclick' => "return confirmDelete('".__('Delete plugin :plugin', 'plugins', array(':plugin' => $plugin['title']))."')"));