Add 'no posts yet' message to empty streams

parent 23d8af9e
......@@ -16,6 +16,7 @@ app.views.InfScroll = app.views.Base.extend({
this.bind("loadMore", this.fetchAndshowLoader, this);"fetched", this.finishedLoading, this);"allItemsLoaded", this.showNoPostsInfo, this);"allItemsLoaded", this.unbindInfScroll, this);
this.collection.bind("add", this.addPostView, this);
......@@ -50,6 +51,13 @@ app.views.InfScroll = app.views.Base.extend({
showNoPostsInfo: function() {
if (this.postViews.length === 0) {
var noPostsInfo = new app.views.NoPostsInfo();
unbindInfScroll : function() {
app.views.NoPostsInfo = app.views.Base.extend({
templateName: "no_posts_info"
......@@ -189,4 +189,9 @@
.leaflet-control-zoom {
display: block;
.no-posts-info {
margin-bottom: 10px;
margin-top: 10px;
<div class="stream_element">
<div class="no-posts-info text-center">
<strong>{{ t "stream.no_posts_yet" }}</strong>
......@@ -236,6 +236,7 @@ en:
disable_post_notifications: "Disable notifications for this post"
permalink: "Permalink"
via: "via <%= provider %>"
no_posts_yet: "There are no posts yet."
zero: "<%= count %> Likes"
......@@ -41,3 +41,7 @@ Feature: posting
When I go to the followed tags stream page
And I unfollow the "boss" tag
Then I should not see "#tag-following-boss" within "#tags_list"
Scenario: Go to a tags page with no posts
When I go to the tag page for "NoPosts"
Then I should not see any posts in my stream
......@@ -15,6 +15,7 @@ Feature: new user registration
Then I should be on the stream page
And I close the publisher
And I should not see "awesome_button"
And I should not see any posts in my stream
Scenario: new user tries to XSS itself
When I fill in the following:
......@@ -7,7 +7,7 @@ Then /^the first comment field should be open/ do
Then /^the first comment field should be closed$/ do
page.should have_css(".stream_element")
page.should have_css(".stream_element .media")
page.should_not have_selector("#main_stream .stream_element .new_comment", match: :first)
......@@ -15,8 +15,9 @@ Then /^I should not see an uploaded image within the photo drop zone$/ do
Then /^I should not see any posts in my stream$/ do
page.assert_selector("#paginate .loader", visible: :hidden)
page.assert_selector(".stream_element", count: 0)
expect(page).not_to have_selector("#paginate .loader")
expect(page).not_to have_selector(".stream_element .media")
expect(page).to have_selector(".stream_element .no-posts-info")
Then /^I should not see any picture in my stream$/ do
......@@ -113,10 +113,6 @@ module PublishingCukeHelpers
def stream_posts
def comment_on_show_page(comment_text)
within("#single-post-interactions") do
describe("app.views.NoPostsInfo", function() {
describe("render", function() {
beforeEach(function() {
this.view = new app.views.NoPostsInfo();
it("renders the no posts info message", function() {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment