Add post count to similar posts popup. Fix alignment.

This commit is contained in:
Robin Ward 2013-05-14 16:51:47 -04:00
parent 21b4b8d5d5
commit 05ed2af08f
4 changed files with 26 additions and 14 deletions

View File

@ -2,20 +2,22 @@
<div class='contents'>
<div id='new-user-education' class='composer-popup' style='display: none'>
<a href='#' {{action closeEducation}} class='close'><i class='icon icon-remove-sign'></i></a>
{{{controller.educationContents}}}
</div>
<div class='composer-popup-container'>
<div id='new-user-education' class='composer-popup' style='display: none'>
<a href='#' {{action closeEducation}} class='close'><i class='icon icon-remove-sign'></i></a>
{{{controller.educationContents}}}
</div>
<div id='similar-topics' class='composer-popup' style='display: none'>
<a href='#' {{action closeSimilar}} class='close'><i class='icon icon-remove-sign'></i></a>
<h3>{{i18n composer.similar_topics}}<h3>
<div id='similar-topics' class='composer-popup' style='display: none'>
<a href='#' {{action closeSimilar}} class='close'><i class='icon icon-remove-sign'></i></a>
<h3>{{i18n composer.similar_topics}}<h3>
<ul class='topics'>
{{#each controller.similarTopics}}
<li>{{{topicLink this}}}</li>
{{/each}}
</ul>
<ul class='topics'>
{{#each controller.similarTopics}}
<li>{{{topicLink this}}} <span class='posts-count'>({{{i18n topic.filters.n_posts count="posts_count"}}})</span></li>
{{/each}}
</ul>
</div>
</div>
<div class='control'>

View File

@ -8,6 +8,12 @@
width: 47%;
}
.composer-popup-container {
max-width: 1500px;
margin-left: auto;
margin-right: auto;
}
.composer-popup {
@include box-shadow(3px 3px 3px rgba($black, 0.14));
@ -52,6 +58,11 @@
a[href] {
color: #000;
}
.posts-count {
color: darken(#b5e8fd, 50%);
font-size: 12px;
}
}
.composer-popup:nth-of-type(2) {

View File

@ -2,5 +2,5 @@ require_dependency 'age_words'
# The most basic attributes of a topic that we need to create a link for it.
class BasicTopicSerializer < ApplicationSerializer
attributes :id, :fancy_title, :slug
attributes :id, :fancy_title, :slug, :posts_count
end

View File

@ -3,7 +3,6 @@ require_dependency 'age_words'
class ListableTopicSerializer < BasicTopicSerializer
attributes :reply_count,
:posts_count,
:highest_post_number,
:image_url,
:created_at,