Index: utils/tests/template/realviews.tmpl |
diff --git a/utils/tests/template/realviews.tmpl b/utils/tests/template/realviews.tmpl |
new file mode 100644 |
index 0000000000000000000000000000000000000000..e2e9338f2f29b1a6baa78a7bd17f4bb7f160b395 |
--- /dev/null |
+++ b/utils/tests/template/realviews.tmpl |
@@ -0,0 +1,106 @@ |
+template DivisionSales(var divisions) { |
+ css { |
+ .division-item { |
+ background-color: #bbb; |
+ border-top: 2px solid white; |
+ line-height: 20pt; |
+ padding-left: 5px; |
+ } |
+ .product-item { |
+ background-color: lightgray; |
+ margin-left: 10px; |
+ border-top: 2px solid white; |
+ line-height: 20pt; |
+ } |
+ .product-title { |
+ position: absolute; |
+ left: 45px; |
+ } |
+ .product-name { |
+ font-weight: bold; |
+ position: absolute; |
+ left: 100px; |
+ } |
+ .product-users { |
+ position: absolute; |
+ left: 150px; |
+ font-style: italic; |
+ color: gray; |
+ width: 110px; |
+ } |
+ .expand-collapse { |
+ margin-left: 5px; |
+ margin-right: 5px; |
+ vertical-align: top; |
+ cursor: pointer; |
+ } |
+ .expand { |
+ font-size: 9pt; |
+ } |
+ .collapse { |
+ font-size: 8pt; |
+ } |
+ .show-sales { |
+ display: inherit; |
+ } |
+ .hide-sales { |
+ display: none; |
+ } |
+ .sales-item { |
+ font-family: arial; |
+ background-color: lightgray; |
+ margin-left: 10px; |
+ border-top: 1px solid white; |
+ line-height: 18pt; |
+ padding-left: 5px; |
+ } |
+ .ytd-sales { |
+ position: absolute; |
+ left: 100px; |
+ } |
+ } |
+ <div> |
+ ${#each divisions} |
+ <div class="division-item"> |
+ <span>${name}</span> |
+ <span>-</span> |
+ <span>${id}</span> |
+ </div> |
+ <div> |
+ ${#each divisions.products} |
+ <div class="product-item"> |
+ <span var=productZippy class="expand-collapse expand">▼</span> |
+ <span class='product-title'>Product</span> |
+ <span class="product-name">${name}</span> |
+ <span class="product-users" align=right>${users} users</span> |
+ <div class="show-sales"> |
+ ${#each products.sales} |
+ <div class="sales-item"> |
+ <span>${country}</span> |
+ <span class="ytd-sales">\$${yearly}</span> |
+ </div> |
+ ${/each} |
+ </div> |
+ </div> |
+ ${/each} |
+ </div> |
+ ${/each} |
+ </div> |
+} |
+ |
+template Header(String company, Date date) { |
+ css { |
+ .header { |
+ background-color: slateGray; |
+ font-family: arial; |
+ color: lightgray; |
+ font-weight: bold; |
+ padding-top: 20px; |
+ } |
+ } |
+ <div class='header' align=center> |
+ <h2>${company}</h2> |
+ <div align=right>${date}</div> |
+ </div> |
+} |
+ |