Add flair template column headers and bug fixes.

This commit is contained in:
Logan Hanks
2011-08-23 16:11:43 -07:00
parent b2c23e2d3f
commit 4e9cd88fcd
2 changed files with 4 additions and 6 deletions

View File

@@ -2559,8 +2559,8 @@ class FlairSelector(CachedTemplate):
position = getattr(c.site, 'flair_position', 'right')
attr_pattern = 'flair_%s_%%s' % c.site._id
text = getattr(c.user, attr_pattern % 'text')
css_class = getattr(c.user, attr_pattern % 'css_class')
text = getattr(c.user, attr_pattern % 'text', '')
css_class = getattr(c.user, attr_pattern % 'css_class', '')
ids = FlairTemplateBySubredditIndex.get_template_ids(c.site._id)
# TODO(intortus): Maintain sorting.

View File

@@ -22,7 +22,7 @@
<h2>${_("select flair")}</h2>
<ul>
%if c.site.flair_self_assign_enabled:
%if thing.choices and c.site.flair_self_assign_enabled:
%for choice in thing.choices:
<%
li_class = 'flairsample-%s' % thing.position
@@ -34,8 +34,6 @@
</li>
%endfor
%else:
<li class="error">
${_("flair selection unavailable")}
</li>
<li class="error">${_("flair selection unavailable")}</li>
%endif
</ul>