Index: utils/tests/template/top_searches2.tmpl |
diff --git a/utils/tests/template/top_searches2.tmpl b/utils/tests/template/top_searches2.tmpl |
new file mode 100644 |
index 0000000000000000000000000000000000000000..1bb17fb374963b200a308bac7b41876f8b1d79ec |
--- /dev/null |
+++ b/utils/tests/template/top_searches2.tmpl |
@@ -0,0 +1,64 @@ |
+template TopSearches(var persons) { |
+ css { |
+ .all-list { |
+ font-family: arial; |
+ } |
+ .person-item { |
+ padding: 4px 0px 4px 5px; |
+ background-color: slateGray; |
+ color: white; |
+ font-weight: bold; |
+ } |
+ .search-item { |
+ font-size: 11pt; |
+ padding: 3px 0px 3px 15px; |
+ background-color: #aaa; |
+ font-weight: bold; |
+ } |
+ .metrics-item { |
+ font-size: 10pt; |
+ padding: 2px 0px 2px 25px; |
+ background-color: lightgray; |
+ border-bottom: 1px solid white; |
+ } |
+ .total-hits { |
+ position: absolute; |
+ left: 100px; |
+ } |
+ } |
+ <div class="all-list"> |
+ ${#each persons} |
+ <div class="person-item"> |
+ <span>${name}, </span> |
+ <span>age = </span> |
+ <span>${age}</span> |
+ </div> |
+ <div> |
+ ${#each persons.searches} |
+ <div class="search-item">query=${query}, rank=${rank}, total=${total}</div> |
+ ${#each searches.metrics} |
+ <div class="metrics-item"> |
+ <span>${country}</span> |
+ <span class="total-hits">${quantity}</span> |
+ </div> |
+ ${/each} |
+ ${/each} |
+ </div> |
+ ${/each} |
+ </div> |
+} |
+ |
+template NameEntry(String name, int age) { |
+ css { |
+ .name-item { |
+ font-size: 18pt; |
+ font-weight: bold; |
+ } |
+ } |
+ <div var=topDiv class="name-item" attr="test" attr1=test1 attr2='test2' attr3=test3> |
+ <span var=spanElem>${name}</span> |
+ <span> - </span> |
+ <span>${age}</span> |
+ </div> |
+} |
+ |