added an empty message for the case of an aspect with no friends
This commit is contained in:
parent
750b4b4388
commit
45d7d54c66
8 changed files with 47 additions and 26 deletions
18
app/views/aspects/_empty_messages.haml
Normal file
18
app/views/aspects/_empty_messages.haml
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
-# Copyright (c) 2010, Diaspora Inc. This file is
|
||||
-# licensed under the Affero General Public License version 3 or later. See
|
||||
-# the COPYRIGHT file.
|
||||
|
||||
#no_posts.empty_message{:style => ("display:none" unless @posts.count == 0)}
|
||||
.null_arrow ⇧
|
||||
%h3 Nobody has said anything yet. Get the conversation started!
|
||||
|
||||
#no_friends.empty_message{:style => ("display:none" unless @friends.count == 0)}
|
||||
%h3 You have no friends in this aspect.
|
||||
|
||||
- unless (@aspect == :all) || (@aspect == :public)
|
||||
%h4= link_to "Add a friend", "#add_request_pane", :class => "add_request_button"
|
||||
- else
|
||||
%h4= link_to "Add a friend", aspects_manage_path
|
||||
|
||||
%h4= link_to "Invite a friend to join Diaspora!", "#invite_user_pane", :class => "invite_user_button", :class => "invite_user_button", :title => "Invite a friend"
|
||||
|
||||
|
|
@ -8,14 +8,12 @@
|
|||
- content_for :publish do
|
||||
= render "shared/publisher", :aspect_ids => :all, :broadcast => true
|
||||
|
||||
= render 'aspects/empty_messages'
|
||||
|
||||
%ul#stream
|
||||
- for post in @posts
|
||||
= render type_partial(post), :post => post unless post.class == Album
|
||||
|
||||
#empty_message{:style => ("display:none" unless @posts.count == 0)}
|
||||
.null_arrow ⇧
|
||||
%h3 Nobody has said anything yet. Get the conversation started!
|
||||
|
||||
#pagination
|
||||
= will_paginate @posts
|
||||
|
||||
|
|
|
|||
|
|
@ -8,14 +8,12 @@
|
|||
- content_for :publish do
|
||||
= render "shared/publisher", :aspect_ids => :all
|
||||
|
||||
= render 'aspects/empty_messages'
|
||||
|
||||
%ul#stream
|
||||
- for post in @posts
|
||||
= render type_partial(post), :post => post unless post.class == Album
|
||||
|
||||
#empty_message{:style => ("display:none" unless @posts.count == 0)}
|
||||
.null_arrow ⇧
|
||||
%h3 Nobody has said anything yet. Get the conversation started!
|
||||
|
||||
#pagination
|
||||
= will_paginate @posts
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
function processRetraction(post_id){
|
||||
$('#' + post_id ).fadeOut(500).remove();
|
||||
if($("#stream")[0].childElementCount == 0){
|
||||
$("#empty_message").fadeIn(200);
|
||||
$("#no_posts").fadeIn(200);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -68,8 +68,8 @@
|
|||
)
|
||||
};
|
||||
|
||||
if( $("#empty_message").is(":visible") ){
|
||||
$("#empty_message").fadeOut(400, addPostToStream(html)).hide();
|
||||
if( $("#no_posts").is(":visible") ){
|
||||
$("#no_posts").fadeOut(400, addPostToStream(html)).hide();
|
||||
} else {
|
||||
addPostToStream(html);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
%br
|
||||
|
||||
%h4 Invites
|
||||
= link_to "Invite a friend!", "#invite_user_pane", :id => "invite_user_button", :class => "invite_user_button", :title => "Invite a friend"
|
||||
= link_to "Invite a friend!", "#invite_user_pane", :class => "invite_user_button", :class => "invite_user_button", :title => "Invite a friend"
|
||||
%br
|
||||
= "You have #{@invites} invites."
|
||||
.yo{ :style => "display:none;"}
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@ $(document).ready(function(){
|
|||
|
||||
//buttons//////
|
||||
$("#add_aspect_button").fancybox({ 'titleShow' : false });
|
||||
$("#add_request_button").fancybox({ 'titleShow': false });
|
||||
$("#invite_user_button").fancybox({ 'titleShow': false });
|
||||
$(".add_request_button").fancybox({ 'titleShow': false });
|
||||
$(".invite_user_button").fancybox({ 'titleShow': false });
|
||||
$(".add_request_button").fancybox({ 'titleShow': false });
|
||||
|
||||
$("input[type='submit']").addClass("button");
|
||||
|
|
|
|||
|
|
@ -752,20 +752,22 @@ ul#settings_nav {
|
|||
padding: 3px;
|
||||
border-bottom: 1px solid #cccccc; }
|
||||
#left_pane ul li a:hover:after {
|
||||
content: " ►"; }
|
||||
content: " ►"; }
|
||||
|
||||
#empty_message {
|
||||
.empty_message {
|
||||
margin-top: 12px;
|
||||
margin-bottom: 12px;
|
||||
text-align: center;
|
||||
color: #777777;
|
||||
margin-left: 70px;
|
||||
padding: 1em;
|
||||
padding-top: 0;
|
||||
width: 80%;
|
||||
padding: 2em;
|
||||
padding-bottom: 0.7em;
|
||||
width: 520px;
|
||||
border: 2px dashed #777777;
|
||||
border-radius: 5px; }
|
||||
#empty_message h3 {
|
||||
.empty_message h3 {
|
||||
color: #777777; }
|
||||
#empty_message .null_arrow {
|
||||
.empty_message .null_arrow {
|
||||
margin-top: -14px;
|
||||
font-size: 80px;
|
||||
display: inline-block; }
|
||||
|
|
|
|||
|
|
@ -979,11 +979,12 @@ ul#settings_nav
|
|||
|
||||
&:hover
|
||||
&:after
|
||||
:content " ►"
|
||||
:content " ►"
|
||||
|
||||
#empty_message
|
||||
.empty_message
|
||||
:margin
|
||||
:top 12px
|
||||
:bottom 12px
|
||||
:text
|
||||
:align center
|
||||
|
||||
|
|
@ -993,13 +994,17 @@ ul#settings_nav
|
|||
|
||||
:margin
|
||||
:left 70px
|
||||
:padding 1em
|
||||
:top 0
|
||||
:width 80%
|
||||
:padding 2em
|
||||
:bottom 0.7em
|
||||
|
||||
:width 520px
|
||||
|
||||
:border 2px dashed #777
|
||||
:border-radius 5px
|
||||
|
||||
.null_arrow
|
||||
:margin
|
||||
:top -14px
|
||||
:font
|
||||
:size 80px
|
||||
:display inline-block
|
||||
|
|
|
|||
Loading…
Reference in a new issue