aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/helpers/handlebars/eachIndex.js
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2015-12-17 15:14:08 +0100
committerStas Vilchik <vilchiks@gmail.com>2015-12-18 11:02:51 +0100
commit3f38540619ece91a5f77cdd202ba339d3eb41462 (patch)
tree17386de2fc2b0972bb5f42453af3fcf4ffcb416f /server/sonar-web/src/main/js/helpers/handlebars/eachIndex.js
parenta76c4cc7cee9d6974324d93d936b904eab4960dc (diff)
downloadsonarqube-3f38540619ece91a5f77cdd202ba339d3eb41462.tar.gz
sonarqube-3f38540619ece91a5f77cdd202ba339d3eb41462.zip
install webpack
Diffstat (limited to 'server/sonar-web/src/main/js/helpers/handlebars/eachIndex.js')
-rw-r--r--server/sonar-web/src/main/js/helpers/handlebars/eachIndex.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/server/sonar-web/src/main/js/helpers/handlebars/eachIndex.js b/server/sonar-web/src/main/js/helpers/handlebars/eachIndex.js
new file mode 100644
index 00000000000..209d8d78b06
--- /dev/null
+++ b/server/sonar-web/src/main/js/helpers/handlebars/eachIndex.js
@@ -0,0 +1,10 @@
+import _ from 'underscore';
+
+module.exports = function (context, options) {
+ var ret = '';
+ context.forEach(function (d, i) {
+ var c = _.extend({ index: i }, d);
+ ret += options.fn(c);
+ });
+ return ret;
+};