|
@@ -16,10 +16,16 @@ layout: default
|
|
|
// iterating over all the rules
|
|
|
for (var i = 0; i < rules.length; i++) {
|
|
|
libHTML += "<div class='library-item'>\n";
|
|
|
+ // icon if there is one
|
|
|
+ var icon = rules[i]["icon"];
|
|
|
+ var iconHTML = "";
|
|
|
+ if (icon != null) {
|
|
|
+ iconHTML = "<img src='/assets/tabler_icons/" + icon + "' /> ";
|
|
|
+ }
|
|
|
// first the titles
|
|
|
var title = rules[i]["communityname"];
|
|
|
if (title == null) { title = "Untitled"; }
|
|
|
- libHTML += "<div class='library-rule-name'>" +
|
|
|
+ libHTML += "<div class='library-rule-name'>" + iconHTML +
|
|
|
"<a href='/create/?r=" + rules[i]["ruleID"] + "'>" +
|
|
|
title + "</a></div>\n";
|
|
|
// then the authors
|