UX: change private category to lock glyph

This commit is contained in:
Jeff Atwood 2015-01-15 14:07:21 -08:00
parent 987504c6ab
commit 992ad7991b
3 changed files with 5 additions and 5 deletions

View File

@ -7,7 +7,7 @@ export default Em.Component.extend({
categoryUrl = Discourse.getURL('/c/') + Discourse.Category.slugFor(category),
categoryName = Handlebars.Utils.escapeExpression(category.get('name'));
if (category.get('read_restricted')) { buffer.push("<i class='fa fa-group'></i>"); }
if (category.get('read_restricted')) { buffer.push("<i class='fa fa-lock'></i>"); }
buffer.push("<a href='" + categoryUrl + "'>");
buffer.push("<span class='category-name'>" + categoryName + "</span>");

View File

@ -111,7 +111,7 @@ Discourse.HTML = {
}
if (restricted) {
html += "><div><i class='fa fa-group'></i> " + name + "</div></" + elem + ">";
html += "><div><i class='fa fa-lock'></i> " + name + "</div></" + elem + ">";
} else {
html += ">" + name + "</" + elem + ">";
}
@ -123,7 +123,7 @@ Discourse.HTML = {
categoryStyle = Discourse.HTML.categoryStyle(opts.onlyStripe ? category : parent) || '';
html = "<span class='badge-wrapper'><" + elem + " class='badge-category-parent" + extraClasses + "' style=\"" + categoryStyle +
"\" href=\"" + (opts.link === false ? '' : url) + "\"><span class='category-name'>" +
(Em.get(parent, 'read_restricted') ? "<i class='fa fa-group'></i> " : "") +
(Em.get(parent, 'read_restricted') ? "<i class='fa fa-lock'></i> " : "") +
Em.get(parent, 'name') + "</span></" + elem + ">" +
html + "</span>";
}

View File

@ -1,7 +1,7 @@
{{#if category}}
<a href="#" {{action "expand"}} class="badge-category" {{bind-attr style="badgeStyle"}}>
{{#if category.read_restricted}}
<i class='fa fa-group'></i>
<i class='fa fa-lock'></i>
{{/if}}
{{category.name}}
</a>