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:
authorFabian Becker <halfdan@xnorfz.de>2013-04-06 16:43:05 +0400
committerFabian Becker <halfdan@xnorfz.de>2013-04-06 16:43:05 +0400
commit298465c8b16d724dbe3a0ca19a62ed31879329e8 (patch)
treea804c4bd696d0606ebf331c8f23ce58f57767eec /plugins/Annotations/templates
parentd381d9821a9639339dda3080e111b5dbe4d96d65 (diff)
Converted Annotations plugin to Twig
Diffstat (limited to 'plugins/Annotations/templates')
-rwxr-xr-xplugins/Annotations/templates/annotation.tpl46
-rwxr-xr-xplugins/Annotations/templates/annotation.twig45
-rwxr-xr-xplugins/Annotations/templates/annotationManager.tpl27
-rwxr-xr-xplugins/Annotations/templates/annotationManager.twig27
4 files changed, 72 insertions, 73 deletions
diff --git a/plugins/Annotations/templates/annotation.tpl b/plugins/Annotations/templates/annotation.tpl
deleted file mode 100755
index cc0d909a3b..0000000000
--- a/plugins/Annotations/templates/annotation.tpl
+++ /dev/null
@@ -1,46 +0,0 @@
-<tr class="annotation" data-id="{$annotation.idNote}" data-date="{$annotation.date}">
- <td class="annotation-meta">
- <div class="annotation-star{if $annotation.canEditOrDelete} annotation-star-changeable{/if}" data-starred="{$annotation.starred}"
- {if $annotation.canEditOrDelete}title="{'Annotations_ClickToStarOrUnstar'|translate}"{/if}>
- {if $annotation.starred}
- <img src="themes/default/images/star.png"/>
- {else}
- <img src="themes/default/images/star_empty.png"/>
- {/if}
- </div>
- <div class="annotation-period {if $annotation.canEditOrDelete}annotation-enter-edit-mode{/if}">({$annotation.date})</div>
- {if $annotation.canEditOrDelete}
- <div class="annotation-period-edit" style="display:none">
- <a href="#">{$annotation.date}</a>
-
- <div class="datepicker" style="display:none"/>
- </div>
- {/if}
- </td>
- <td class="annotation-value">
- <div class="annotation-view-mode">
- <span {if $annotation.canEditOrDelete}title="{'Annotations_ClickToEdit'|translate}"
- class="annotation-enter-edit-mode"{/if}>{$annotation.note|unescape|escape:'html'}</span>
- {if $annotation.canEditOrDelete}
- <a href="#" class="edit-annotation annotation-enter-edit-mode" title="{'Annotations_ClickToEdit'|translate}">{'General_Edit'|translate}...</a>
- {/if}
- </div>
- {if $annotation.canEditOrDelete}
- <div class="annotation-edit-mode" style="display:none">
- <input class="annotation-edit" type="text" value="{$annotation.note|unescape|escape:'html'}"/>
- <br/>
- <input class="annotation-save submit" type="button" value="{'General_Save'|translate}"/>
- <input class="annotation-cancel submit" type="button" value="{'General_Cancel'|translate}"/>
- </div>
- {/if}
- </td>
- {if isset($annotation.user) && $userLogin != 'anonymous'}
- <td class="annotation-user-cell">
- <span class="annotation-user">{$annotation.user|unescape|escape:'html'}</span><br/>
- {if $annotation.canEditOrDelete}
- <a href="#" class="delete-annotation" style="display:none" title="{'Annotations_ClickToDelete'|translate}">{'General_Delete'|translate}</a>
- {/if}
- </td>
- {/if}
-</tr>
-
diff --git a/plugins/Annotations/templates/annotation.twig b/plugins/Annotations/templates/annotation.twig
new file mode 100755
index 0000000000..e3144413af
--- /dev/null
+++ b/plugins/Annotations/templates/annotation.twig
@@ -0,0 +1,45 @@
+<tr class="annotation" data-id="{{ annotation.idNote }}" data-date="{{ annotation.date }}">
+ <td class="annotation-meta">
+ <div class="annotation-star{% if annotation.canEditOrDelete %} annotation-star-changeable{% endif %}" data-starred="{{ annotation.starred }}"
+ {% if annotation.canEditOrDelete %}title="{{ 'Annotations_ClickToStarOrUnstar'|translate }}"{% endif %}>
+ {% if annotation.starred %}
+ <img src="plugins/Zeitgeist/theme/images/star.png"/>
+ {% else %}
+ <img src="plugins/Zeitgeist/theme/images/star_empty.png"/>
+ {% endif %}
+ </div>
+ <div class="annotation-period {% if annotation.canEditOrDelete %}annotation-enter-edit-mode{% endif %}">({{ annotation.date }})</div>
+ {% if annotation.canEditOrDelete %}
+ <div class="annotation-period-edit" style="display:none">
+ <a href="#">{{ annotation.date }}</a>
+ <div class="datepicker" style="display:none"/>
+ </div>
+ {% endif %}
+ </td>
+ <td class="annotation-value">
+ <div class="annotation-view-mode">
+ <span {% if annotation.canEditOrDelete %}title="{{ 'Annotations_ClickToEdit'|translate }}"
+ class="annotation-enter-edit-mode"{% endif %}>{{ annotation.note }}</span>
+ {% if annotation.canEditOrDelete %}
+ <a href="#" class="edit-annotation annotation-enter-edit-mode" title="{{ 'Annotations_ClickToEdit'|translate }}">{{ 'General_Edit'|translate }}...</a>
+ {% endif %}
+ </div>
+ {% if annotation.canEditOrDelete %}
+ <div class="annotation-edit-mode" style="display:none">
+ <input class="annotation-edit" type="text" value="{{ annotation.note }}"/>
+ <br/>
+ <input class="annotation-save submit" type="button" value="{{ 'General_Save'|translate }}"/>
+ <input class="annotation-cancel submit" type="button" value="{{ 'General_Cancel'|translate }}"/>
+ </div>
+ {% endif %}
+ </td>
+ {% if annotation.user is defined and userLogin != 'anonymous' %}
+ <td class="annotation-user-cell">
+ <span class="annotation-user">{{ annotation.user }}</span><br/>
+ {% if annotation.canEditOrDelete %}
+ <a href="#" class="delete-annotation" style="display:none" title="{{ 'Annotations_ClickToDelete'|translate }}">{{ 'General_Delete'|translate }}</a>
+ {% endif %}
+ </td>
+ {% endif %}
+</tr>
+
diff --git a/plugins/Annotations/templates/annotationManager.tpl b/plugins/Annotations/templates/annotationManager.tpl
deleted file mode 100755
index 401c2458c9..0000000000
--- a/plugins/Annotations/templates/annotationManager.tpl
+++ /dev/null
@@ -1,27 +0,0 @@
-<div class="annotation-manager"
- {if $startDate neq $endDate}data-date="{$startDate},{$endDate}" data-period="range"
- {else}data-date="{$startDate}" data-period="{$period}"
- {/if}>
-
- <div class="annotations-header">
- <span>{'Annotations_Annotations'|translate}</span>
- </div>
-
- <div class="annotation-list-range">{$startDatePretty}{if $startDate neq $endDate} &mdash; {$endDatePretty}{/if}</div>
-
- <div class="annotation-list">
- {include file="Annotations/templates/annotations.tpl"}
-
- <span class="loadingPiwik" style="display:none"><img src="themes/default/images/loading-blue.gif"/>{'General_Loading_js'|translate}</span>
-
- </div>
-
- <div class="annotation-controls">
- {if $canUserAddNotes}
- <a href="#" class="add-annotation" title="{'Annotations_CreateNewAnnotation'|translate}">{'Annotations_CreateNewAnnotation'|translate}</a>
- {elseif $userLogin eq 'anonymous'}
- <a href="index.php?module=Login">{'Annotations_LoginToAnnotate'|translate}</a>
- {/if}
- </div>
-
-</div>
diff --git a/plugins/Annotations/templates/annotationManager.twig b/plugins/Annotations/templates/annotationManager.twig
new file mode 100755
index 0000000000..6d79f1ac08
--- /dev/null
+++ b/plugins/Annotations/templates/annotationManager.twig
@@ -0,0 +1,27 @@
+<div class="annotation-manager"
+ {% if startDate != endDate %}data-date="{{ startDate }},{{ endDate }}" data-period="range"
+ {% else %}data-date="{{ startDate }}" data-period="{{ period }}"
+ {% endif %}>
+
+ <div class="annotations-header">
+ <span>{{ 'Annotations_Annotations'|translate }}</span>
+ </div>
+
+ <div class="annotation-list-range">{{ startDatePretty }}{% if startDate != endDate %} &mdash; {{ endDatePretty }}{% endif %}</div>
+
+ <div class="annotation-list">
+ {% include "@Annotations/annotations.twig" %}
+
+ <span class="loadingPiwik" style="display:none"><img src="plugins/Zeitgeist/theme/images/loading-blue.gif"/>{{ 'General_Loading_js'|translate }}</span>
+
+ </div>
+
+ <div class="annotation-controls">
+ {% if canUserAddNotes %}
+ <a href="#" class="add-annotation" title="{{ 'Annotations_CreateNewAnnotation'|translate }}">{{ 'Annotations_CreateNewAnnotation'|translate }}</a>
+ {% elseif userLogin == 'anonymous' %}
+ <a href="index.php?module=Login">{{ 'Annotations_LoginToAnnotate'|translate }}</a>
+ {% endif %}
+ </div>
+
+</div>