diff options
author | Fabian Becker <halfdan@xnorfz.de> | 2013-04-04 22:12:06 +0400 |
---|---|---|
committer | Fabian Becker <halfdan@xnorfz.de> | 2013-04-04 22:12:06 +0400 |
commit | 40140b076baf72a650f85449214f2868c2a586c2 (patch) | |
tree | cb0fdad2429fc59acba6c761fcef0d4d081216f5 /plugins/API | |
parent | a04bef5e8293c72752586ad63c7dd4d0eeaa6f0e (diff) |
API now fully functional in Twig
Diffstat (limited to 'plugins/API')
-rw-r--r-- | plugins/API/Controller.php | 2 | ||||
-rw-r--r-- | plugins/API/templates/listAllAPI.twig | 36 |
2 files changed, 19 insertions, 19 deletions
diff --git a/plugins/API/Controller.php b/plugins/API/Controller.php index 6c3a5424fa..0ed49180a6 100644 --- a/plugins/API/Controller.php +++ b/plugins/API/Controller.php @@ -33,7 +33,7 @@ class Piwik_API_Controller extends Piwik_Controller public function listAllAPI() { - $view = Piwik_View::factory("listAllAPI"); + $view = new Piwik_View("@API/listAllAPI"); $this->setGeneralVariablesView($view); $ApiDocumentation = new Piwik_API_DocumentationGenerator(); diff --git a/plugins/API/templates/listAllAPI.twig b/plugins/API/templates/listAllAPI.twig index 70f02ef4a9..9863e00ceb 100644 --- a/plugins/API/templates/listAllAPI.twig +++ b/plugins/API/templates/listAllAPI.twig @@ -1,34 +1,34 @@ -{assign var=showSitesSelection value=true} -{assign var=showPeriodSelection value=false} -{assign var=showMenu value=false} -{include file="CoreHome/templates/header.tpl"} +{% extends 'dashboard.twig' %} +{% set showSitesSelection=true %} +{% set showPeriodSelection=false %} +{% set showMenu=false %} +{% block content %} <div class="page_api"> <div class="top_controls_inner"> - {include file="CoreHome/templates/period_select.tpl"} + {% include "@CoreHome/period_select.twig" %} </div> - <h2>{'API_QuickDocumentationTitle'|translate}</h2> + <h2>{{ 'API_QuickDocumentationTitle'|translate }}</h2> - <p>{'API_PluginDescription'|translate}</p> + <p>{{ 'API_PluginDescription'|translate }}</p> - {if $isSuperUser} - <p>{'API_GenerateVisits'|translate:'VisitorGenerator':'VisitorGenerator'}</p> - {/if} + {% if isSuperUser %} + <p>{{ 'API_GenerateVisits'|translate('VisitorGenerator','VisitorGenerator') }}</p> + {% endif %} <p> - <b>{'API_MoreInformation'|translate:"<a target='_blank' href='?module=Proxy&action=redirect&url=http://piwik.org/docs/analytics-api'>":"</a>":"<a target='_blank' href='?module=Proxy&action=redirect&url=http://piwik.org/docs/analytics-api/reference'>":"</a>"}</b> + <b>{{ 'API_MoreInformation'|translate("<a target='_blank' href='?module=Proxy&action=redirect&url=http://piwik.org/docs/analytics-api'>","</a>","<a target='_blank' href='?module=Proxy&action=redirect&url=http://piwik.org/docs/analytics-api/reference'>","</a>")|raw }}</b> </p> - <h2>{'API_UserAuthentication'|translate}</h2> + <h2>{{ 'API_UserAuthentication'|translate }}</h2> <p> - {'API_UsingTokenAuth'|translate:'<b>':'</b>':""}<br/> - <span id='token_auth'>&token_auth=<b>{$token_auth}</b></span><br/> - {'API_KeepTokenSecret'|translate:'<b>':'</b>'} + {{ 'API_UsingTokenAuth'|translate('<b>','</b>',"")|raw }}<br/> + <span id='token_auth'>&token_auth=<b>{{ token_auth }}</b></span><br/> + {{ 'API_KeepTokenSecret'|translate('<b>','</b>') }} <!-- {'API_LoadedAPIs'|translate:$countLoadedAPI} --> - {$list_api_methods_with_links} + {{ list_api_methods_with_links|raw }} <br/> </div> - -{include file="CoreHome/templates/footer.tpl"} +{% endblock %}
\ No newline at end of file |