Skip to content
Extraits de code Groupes Projets
Valider df8f2cdb rédigé par Thomas Steur's avatar Thomas Steur
Parcourir les fichiers

renamed searchPlugin to browsePlugin, added browseThemes

parent 513cbb6b
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -23,9 +23,9 @@ use Piwik\Url; ...@@ -23,9 +23,9 @@ use Piwik\Url;
class Controller extends \Piwik\Controller\Admin class Controller extends \Piwik\Controller\Admin
{ {
function search_plugin() function browsePlugins()
{ {
$view = $this->configureView('@CorePluginsAdmin/search_plugin'); $view = $this->configureView('@CorePluginsAdmin/browsePlugins');
$plugins = json_decode(file_get_contents('http://plugins.piwik.org/api/1.0/plugins')); $plugins = json_decode(file_get_contents('http://plugins.piwik.org/api/1.0/plugins'));
$view->plugins = $plugins->plugins; $view->plugins = $plugins->plugins;
...@@ -33,6 +33,16 @@ class Controller extends \Piwik\Controller\Admin ...@@ -33,6 +33,16 @@ class Controller extends \Piwik\Controller\Admin
echo $view->render(); echo $view->render();
} }
function browseThemes()
{
$view = $this->configureView('@CorePluginsAdmin/browseThemes');
$plugins = json_decode(file_get_contents('http://plugins.piwik.org/api/1.0/themes'));
$view->plugins = $plugins->plugins;
echo $view->render();
}
function extend() function extend()
{ {
$view = $this->configureView('@CorePluginsAdmin/extend'); $view = $this->configureView('@CorePluginsAdmin/extend');
......
...@@ -20,6 +20,8 @@ ...@@ -20,6 +20,8 @@
<a href="#">popular</a> <a href="#">popular</a>
| |
<a href="#">newest</a> <a href="#">newest</a>
|
<a href="#">alpha</a>
</div> </div>
</div> </div>
......
{% extends 'admin.twig' %}
{% block content %}
<style type="text/css">
.plugin li { display: inline-block;padding-right: 10px;font-size: 90%; }
.plugin ul { list-style: none;margin-left: 0; }
.plugin .description { padding-bottom: 10px; }
.plugin .install { float: right; }
.plugin h3 { display: inline; }
.plugin { width: 300px; float: left; }
.pluginslist { margin-top: 20px;max-width:980px; }
</style>
<div style="max-width:980px;">
<h2>Extend Piwik by installing a new plugin</h2>
<div>
<input placeholder="Search" type="text" name="q"/>
<button type="submit">Search</button>
|
<a href="#">popular</a>
|
<a href="#">newest</a>
|
<a href="#">alpha</a>
</div>
</div>
<div class="pluginslist" style="">
{% for plugin in plugins %}
<div class="plugin">
<a href="#" class="install">Install</a>
<h3>{{ plugin.name }}</h3>
<p class="description">{{ plugin.description }}</p>
<img src="" height="250" width="250"/>
<ul>
<li>Version {{ plugin.latestVersion }}</li>
<li>Updated {{ plugin.timestamp }}</li>
<li>Downloads {{ plugin.numDownloads }}</li>
</ul>
</div>
{% endfor %}
</div>
{% endblock %}
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter