1
0
mirror of https://github.com/monstra-cms/monstra.git synced 2025-08-04 12:17:42 +02:00

Plugins. README.MD #167

This commit is contained in:
Awilum
2014-02-12 00:08:13 +02:00
parent d8a9c746b4
commit e662a9937b
19 changed files with 34 additions and 7 deletions

View File

@@ -16,5 +16,6 @@
'Get More Plugins' => 'Hole weitere Plugins',
'Install' => 'Installieren',
'Uninstall' => 'Deinstallieren',
'README.md not found' => 'README.md not found',
)
);

View File

@@ -16,5 +16,6 @@
'Get More Plugins' => 'Get More Plugins',
'Install' => 'Install',
'Uninstall' => 'Uninstall',
'README.md not found' => 'README.md not found',
)
);

View File

@@ -16,5 +16,6 @@
'Get More Plugins' => 'Obtener mas plugins',
'Install' => 'Instalar',
'Uninstall' => 'Desinstalar',
'README.md not found' => 'README.md not found',
)
);

View File

@@ -16,5 +16,6 @@
'Get More Plugins' => 'دریافت افزونه های بیشتر',
'Install' => 'نصب',
'Uninstall' => 'حذف',
'README.md not found' => 'README.md not found',
)
);

View File

@@ -16,5 +16,6 @@
'Get More Plugins' => 'Obtenez plus de plugins',
'Install' => 'Installer',
'Uninstall' => 'Désinstaller',
'README.md not found' => 'README.md not found',
)
);

View File

@@ -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',
)
);

View File

@@ -16,5 +16,6 @@
'Get More Plugins' => 'Cari Plugins Baru',
'Install' => 'Memasangkan',
'Uninstall' => 'Menghapus Program',
'README.md not found' => 'README.md not found',
)
);

View File

@@ -16,5 +16,6 @@
'Get More Plugins' => 'Scarica altri plugin',
'Install' => 'Installa',
'Uninstall' => 'Disinstalla',
'README.md not found' => 'README.md not found',
)
);

View File

@@ -16,5 +16,6 @@
'Get More Plugins' => 'さらにプラグインを取得',
'Install' => 'インストール',
'Uninstall' => '停止',
'README.md not found' => 'README.md not found',
)
);

View File

@@ -16,5 +16,6 @@
'Get More Plugins' => 'Gauti daugiau papildinių',
'Install' => 'Įdiegti',
'Uninstall' => 'Išdiegti',
'README.md not found' => 'README.md not found',
)
);

View File

@@ -16,5 +16,6 @@
'Get More Plugins' => 'Vind meer plugins',
'Install' => 'Installeren',
'Uninstall' => 'Deinstalleren',
'README.md not found' => 'README.md not found',
)
);

View File

@@ -16,5 +16,6 @@
'Get More Plugins' => 'Pobierz więcej wtyczek',
'Install' => 'Instaluj',
'Uninstall' => 'Odinstaluj',
'README.md not found' => 'README.md not found',
)
);

View File

@@ -16,5 +16,6 @@
'Get More Plugins' => 'Ver mais plugins',
'Install' => 'Instalar',
'Uninstall' => 'Desinstalar',
'README.md not found' => 'README.md not found',
)
);

View File

@@ -16,5 +16,6 @@
'Get More Plugins' => 'Скачать другие плагины',
'Install' => 'Установить',
'Uninstall' => 'Удалить',
'README.md not found' => 'README.md not found',
)
);

View File

@@ -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',
)
);

View File

@@ -16,5 +16,6 @@
'Get More Plugins' => 'Dodaj još dodataka',
'Install' => 'Instaliraj',
'Uninstall' => 'Deinstaliraj',
'README.md not found' => 'README.md not found',
)
);

View File

@@ -16,5 +16,6 @@
'Get More Plugins' => 'Завантажити інші плагіни',
'Install' => 'Установити',
'Uninstall' => 'Видалити',
'README.md not found' => 'README.md not found',
)
);

View File

@@ -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();
}
}
}

View File

@@ -43,10 +43,12 @@
</td>
<td>
<div class="pull-right">
<?php if (File::exists(PLUGINS . DS . $plugin['id'] . DS . 'README.md')) { ?>
<?php echo Html::anchor(__('?', 'plugins'),
'#',
array('class' => 'btn btn-info readme_plugin', 'data-toggle' => 'modal', 'data-target' => '#readme', 'readme_plugin' => $plugin['id']));
?>
<?php } ?>
<?php echo Html::anchor(__('Uninstall', 'plugins'),
'index.php?id=plugins&delete_plugin='.$plugin['id'].'&token='.Security::token(),
array('class' => 'btn btn-danger', 'onclick' => "return confirmDelete('".__('Delete plugin :plugin', 'plugins', array(':plugin' => $plugin['title']))."')"));