Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xplugins/Annotations/Controller.php6
-rwxr-xr-xplugins/Annotations/templates/evolutionAnnotations.tpl15
-rwxr-xr-xplugins/Annotations/templates/evolutionAnnotations.twig15
3 files changed, 18 insertions, 18 deletions
diff --git a/plugins/Annotations/Controller.php b/plugins/Annotations/Controller.php
index 9b9f9e352c..124163fe5c 100755
--- a/plugins/Annotations/Controller.php
+++ b/plugins/Annotations/Controller.php
@@ -55,7 +55,7 @@ class Piwik_Annotations_Controller extends Piwik_Controller
}
// create & render the view
- $view = Piwik_View::factory('annotationManager');
+ $view = new Piwik_View('@Annotations/annotationManager');
$allAnnotations = Piwik_API_Request::processRequest(
'Annotations.getAll', array('date' => $date, 'period' => $period, 'lastN' => $lastN));
@@ -103,7 +103,7 @@ class Piwik_Annotations_Controller extends Piwik_Controller
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$this->checkTokenInUrl();
- $view = Piwik_View::factory('annotation');
+ $view = new Piwik_View('@Annotations//annotation');
// NOTE: permissions checked in API method
// save the annotation
@@ -208,7 +208,7 @@ class Piwik_Annotations_Controller extends Piwik_Controller
"Annotations.getAnnotationCountForDates", array('getAnnotationText' => 1));
// create & render the view
- $view = Piwik_View::factory('evolutionAnnotations');
+ $view = new Piwik_View('@Annotations/evolutionAnnotations');
$view->annotationCounts = reset($annotationCounts); // only one idSite allowed for this action
echo $view->render();
diff --git a/plugins/Annotations/templates/evolutionAnnotations.tpl b/plugins/Annotations/templates/evolutionAnnotations.tpl
deleted file mode 100755
index eaf6f9d9d3..0000000000
--- a/plugins/Annotations/templates/evolutionAnnotations.tpl
+++ /dev/null
@@ -1,15 +0,0 @@
-<div class="evolution-annotations">
- {foreach from=$annotationCounts item=dateCountPair}
- {assign var=date value=$dateCountPair[0]}
- {assign var=counts value=$dateCountPair[1]}
- <span data-date="{$date}" data-count="{$counts.count}" data-starred="{$counts.starred}"
- {if $counts.count eq 0}title="{'Annotations_AddAnnotationsFor_js'|translate:$date}"
- {elseif $counts.count eq 1}title="{'Annotations_AnnotationOnDate'|translate:$date:$counts.note}
-
-{'Annotations_ClickToEditOrAdd'|translate}"
- {else}title="{'Annotations_ViewAndAddAnnotations_js'|translate:$date}"
- {/if}>
- <img src="themes/default/images/{if $counts.starred > 0}yellow_marker.png{else}grey_marker.png{/if}" width="16" height="16"/>
- </span>
- {/foreach}
-</div>
diff --git a/plugins/Annotations/templates/evolutionAnnotations.twig b/plugins/Annotations/templates/evolutionAnnotations.twig
new file mode 100755
index 0000000000..c168ac9a31
--- /dev/null
+++ b/plugins/Annotations/templates/evolutionAnnotations.twig
@@ -0,0 +1,15 @@
+<div class="evolution-annotations">
+ {% for dateCountPair in annotationCounts %}
+ {% set date=dateCountPair[0] %}
+ {% set counts=dateCountPair[1] %}
+ <span data-date="{{ date }}" data-count="{{ counts.count }}" data-starred="{{ counts.starred }}"
+ {% if counts.count == 0 %}title="{{ 'Annotations_AddAnnotationsFor_js'|translate(date) }}"
+ {% elseif counts.count == 1 %}title="{{ 'Annotations_AnnotationOnDate'|translate(date,counts.note) }}
+
+{{ 'Annotations_ClickToEditOrAdd'|translate }}"
+ {% else %}}title="{{ 'Annotations_ViewAndAddAnnotations_js'|translate(date) }}"
+ {% endif %}>
+ <img src="plugins/Zeitgeist/theme/images/{% if counts.starred > 0 %}yellow_marker.png{% else %}}grey_marker.png{% endif %}}" width="16" height="16"/>
+ </span>
+ {% endfor %}
+</div>