diff --git a/app/assets/stylesheets/mobile/mobile.css.scss b/app/assets/stylesheets/mobile/mobile.css.scss index 29a5b9a71..65497f600 100644 --- a/app/assets/stylesheets/mobile/mobile.css.scss +++ b/app/assets/stylesheets/mobile/mobile.css.scss @@ -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; diff --git a/app/views/people/show.mobile.haml b/app/views/people/show.mobile.haml index 3794a2c94..ad142c8e7 100644 --- a/app/views/people/show.mobile.haml +++ b/app/views/people/show.mobile.haml @@ -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) - diff --git a/app/views/shared/_stream_more_button.mobile.haml b/app/views/shared/_stream_more_button.mobile.haml new file mode 100644 index 000000000..5195a9354 --- /dev/null +++ b/app/views/shared/_stream_more_button.mobile.haml @@ -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") diff --git a/app/views/streams/main_stream.mobile.haml b/app/views/streams/main_stream.mobile.haml index 7aeb527fe..2cd8c0dbc 100644 --- a/app/views/streams/main_stream.mobile.haml +++ b/app/views/streams/main_stream.mobile.haml @@ -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' diff --git a/app/views/tags/show.mobile.haml b/app/views/tags/show.mobile.haml index a99d0387c..581af773a 100644 --- a/app/views/tags/show.mobile.haml +++ b/app/views/tags/show.mobile.haml @@ -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' diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index 515745b8a..d0e76e4b1 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -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: diff --git a/features/support/env.rb b/features/support/env.rb index dca7bceed..cd22cd58d 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -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'