Created
October 8, 2015 23:18
-
-
Save curtiswilkinson/bc433858ec4a69635892 to your computer and use it in GitHub Desktop.
Half-star review ratings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[%SET [@ratings-count@] %][@rating_round_half@] [%/set%] | |
[%set [@ratings-count@] %][%split delimiter:'-'%] | |
[%param data1%][@ratings-count@][%/param%] | |
[%param *body%] | |
[%if [@count@] ne '0' %].[%/if%][@data1@] | |
[%/param%] | |
[%/split%][%/set%] | |
[%set [@ratings-count-while@] %][@ratings-count@][%/set%] | |
[%WHILE [@ratings-count-while@] > 0 %] | |
[%if [@ratings-count-while@] eq '0.5' %] | |
[%SET [@ratings-count-while@] %][%calc [@ratings-count-while@] - 1.0 /%] [%/set%] | |
<i class="fa fa-star-half-o"></i> | |
[%else%] | |
[%SET [@ratings-count-while@] %][%calc [@ratings-count-while@] - 1.0 /%] [%/set%] | |
<i class="fa fa-star"></i> | |
[%/if%] | |
[%/ WHILE%] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment