Merge branch 'dev' into feature/pragma-dot-notation

This commit is contained in:
Justin Hileman
2010-04-26 20:27:07 -04:00
8 changed files with 144 additions and 19 deletions
+2 -2
View File
@@ -5,9 +5,9 @@
{{#current}}
<li><strong>{{name}}</strong></li>
{{/current}}
{{#isLink}}
{{^current}}
<li><a href="{{url}}">{{name}}</a></li>
{{/isLink}}
{{/current}}
{{/item}}
</ul>
{{/notEmpty}}
-5
View File
@@ -9,11 +9,6 @@ class Complex extends Mustache {
array('name' => 'blue', 'current' => false, 'url' => '#Blue'),
);
public function isLink() {
// Exploit the fact that the current iteration item is at the top of the context stack.
return $this->getVariable('current', $this->context) != true;
}
public function notEmpty() {
return !($this->isEmpty());
}
@@ -0,0 +1,5 @@
<?php
class InvertedSection extends Mustache {
public $repo = array();
}
@@ -0,0 +1,2 @@
{{#repo}}<b>{{name}}</b>{{/repo}}
{{^repo}}No repos :({{/repo}}
@@ -0,0 +1 @@
No repos :(