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

View File

@ -8,6 +8,12 @@
width: 47%; width: 47%;
} }
.composer-popup-container {
max-width: 1500px;
margin-left: auto;
margin-right: auto;
}
.composer-popup { .composer-popup {
@include box-shadow(3px 3px 3px rgba($black, 0.14)); @include box-shadow(3px 3px 3px rgba($black, 0.14));
@ -52,6 +58,11 @@
a[href] { a[href] {
color: #000; color: #000;
} }
.posts-count {
color: darken(#b5e8fd, 50%);
font-size: 12px;
}
} }
.composer-popup:nth-of-type(2) { .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. # The most basic attributes of a topic that we need to create a link for it.
class BasicTopicSerializer < ApplicationSerializer class BasicTopicSerializer < ApplicationSerializer
attributes :id, :fancy_title, :slug attributes :id, :fancy_title, :slug, :posts_count
end end

View File

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