mobile more-link only if there may be a next page; added message for end of stream

This commit is contained in:
Faldrian 2014-11-16 01:36:10 +01:00
parent 7f51d8710e
commit 21806a2c9b
7 changed files with 23 additions and 18 deletions

View file

@ -192,7 +192,7 @@ h3 {
}
}
.more-link {
.more-link, .no-more-posts {
-webkit-box-shadow: inset 0 1px 5px #777, 0 1px 1px rgba(0,0,0,0.4);
display: block;
text-align: center;
@ -204,10 +204,12 @@ h3 {
color: rgba(220,220,220,0.8);
}
h1 {
h1, h2 {
color: $text-grey;
padding: 20px;
text-shadow: 0 2px 0 #fff; } }
text-shadow: 0 2px 0 #fff;
}
}
.info {
color: #ccc;

View file

@ -22,10 +22,7 @@
- else
#main_stream.stream
= render 'shared/stream', :posts => @stream.stream_posts
#pagination
%a.more-link.paginate{:href => next_page_path}
%h1
= t("more")
= render 'shared/stream_more_button'
- else
#main_stream
.dull
@ -33,4 +30,3 @@
= t('.ignoring', :name => @person.first_name)
- elsif user_signed_in? && (current_user.person != @person)
= t('.has_not_shared_with_you_yet', :name => @person.first_name)

View file

@ -0,0 +1,10 @@
-if @stream.stream_posts.length == 15
#pagination
%a.more-link.paginate{:href => next_page_path}
%h1
= t("more")
-else
#pagination
%div.no-more-posts
%h2
= t("stream_helper.no_more_posts")

View file

@ -10,8 +10,4 @@
#main_stream.stream
= render 'shared/stream', :posts => @stream.stream_posts
-if @stream.stream_posts.length > 0
#pagination
%a.more-link.paginate{:href => next_page_path}
%h1
= t("more")
= render 'shared/stream_more_button'

View file

@ -7,9 +7,5 @@
#main_stream.stream
= render 'shared/stream', :posts => @stream.stream_posts
-if @stream.stream_posts.length > 0
#pagination
%a.more-link.paginate{:href => next_page_path}
%h1
= t("more")
= render 'shared/stream_more_button'

View file

@ -1188,6 +1188,7 @@ en:
one: "Show one more comment"
other: "Show %{count} more comments"
hide_comments: "Hide all comments"
no_more_posts: "You have reached the end of the stream."
tags:
show:

View file

@ -2,6 +2,10 @@ require 'rubygems'
prefork = proc do
ENV["RAILS_ENV"] ||= "test"
# Have all rests run with english browser locale
ENV['LANG'] = 'C'
require 'cucumber/rails'
require 'capybara/rails'