Merge branch 'empty-page'
Conflicts: public/stylesheets/application.css
This commit is contained in:
commit
51c5b73256
9 changed files with 135 additions and 51 deletions
|
|
@ -8,9 +8,6 @@
|
|||
$("#add_album_button").fancybox();
|
||||
});
|
||||
|
||||
= content_for :page_title do
|
||||
= link_to "◂ #{t('.home')}", aspects_path, :aspect => params[:aspect]
|
||||
|
||||
- content_for :left_pane do
|
||||
= render "shared/aspect_friends"
|
||||
|
||||
|
|
@ -31,6 +28,3 @@
|
|||
#pagination
|
||||
= will_paginate @albums
|
||||
|
||||
#content_bottom
|
||||
.back
|
||||
= link_to "⇧ #{t('.home')}", root_path
|
||||
|
|
|
|||
20
app/views/aspects/_empty_messages.haml
Normal file
20
app/views/aspects/_empty_messages.haml
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
-# 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=t('.start_talking')
|
||||
|
||||
#no_friends.empty_message{:style => ("display:none" unless @friends.count == 0)}
|
||||
|
||||
- if (@aspect == :all) || (@aspect == :public)
|
||||
%h3=t('.nobody')
|
||||
%h4= link_to t('.add_friend'), aspects_manage_path
|
||||
%h4= link_to t('.invite'), aspects_manage_path
|
||||
- else
|
||||
%h3=t('.nobody_in_aspect', :aspect_name => @aspect.name)
|
||||
%h4= link_to t('.add_friend_to', :aspect_name => @aspect.name), "#add_request_pane", :class => "add_request_button"
|
||||
%h4= link_to t('.invite', :aspect_name => @aspect.name), "#invite_user_pane", :class => "invite_user_button", :class => "invite_user_button", :title => t('.invite')
|
||||
|
||||
|
||||
|
|
@ -2,18 +2,18 @@
|
|||
-# licensed under the Affero General Public License version 3 or later. See
|
||||
-# the COPYRIGHT file.
|
||||
|
||||
- content_for :page_title do
|
||||
= link_to t('.photos'), albums_path(:aspect => @aspect)
|
||||
|
||||
- content_for :left_pane do
|
||||
= render "shared/aspect_friends"
|
||||
|
||||
- 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
|
||||
|
||||
#pagination
|
||||
= will_paginate @posts
|
||||
|
||||
|
|
|
|||
|
|
@ -2,18 +2,18 @@
|
|||
-# licensed under the Affero General Public License version 3 or later. See
|
||||
-# the COPYRIGHT file.
|
||||
|
||||
- content_for :page_title do
|
||||
= link_to t('.photos'), albums_path(:aspect => @aspect)
|
||||
|
||||
- content_for :left_pane do
|
||||
= render "shared/aspect_friends"
|
||||
|
||||
- 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
|
||||
|
||||
#pagination
|
||||
= will_paginate @posts
|
||||
|
||||
|
|
|
|||
|
|
@ -37,9 +37,10 @@
|
|||
|
||||
});
|
||||
function processRetraction(post_id){
|
||||
$('#' + post_id ).fadeOut(500, function(){
|
||||
$(this).remove;
|
||||
});
|
||||
$('#' + post_id ).fadeOut(500).remove();
|
||||
if($("#stream")[0].childElementCount == 0){
|
||||
$("#no_posts").fadeIn(200);
|
||||
}
|
||||
}
|
||||
|
||||
function processComment(post_id, html){
|
||||
|
|
@ -59,14 +60,23 @@
|
|||
|
||||
function processPost(className, html, aspectIds){
|
||||
if(onPageForAspects(aspectIds)){
|
||||
$("#stream").prepend(
|
||||
$(html).fadeIn("fast", function(){
|
||||
$("#stream label:first").inFieldLabels();
|
||||
})
|
||||
);
|
||||
var addPostToStream = function (html){
|
||||
$("#stream").prepend(
|
||||
$(html).fadeIn("fast", function(){
|
||||
$("#stream label:first").inFieldLabels();
|
||||
})
|
||||
)
|
||||
};
|
||||
|
||||
if( $("#no_posts").is(":visible") ){
|
||||
$("#no_posts").fadeOut(400, addPostToStream(html)).hide();
|
||||
} else {
|
||||
addPostToStream(html);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function processPhotoInAlbum(photoHash){
|
||||
if (location.href.indexOf(photoHash['album_id']) == -1){
|
||||
return ;
|
||||
|
|
|
|||
|
|
@ -2,30 +2,41 @@
|
|||
-# licensed under the Affero General Public License version 3 or later. See
|
||||
-# the COPYRIGHT file.
|
||||
|
||||
#friend_pictures
|
||||
= owner_image_link
|
||||
- for friend in @friends
|
||||
= person_image_link(friend)
|
||||
- if @logged_in && (@aspect == :public)
|
||||
%h3 Facebook Friends
|
||||
- @fb_friends = MiniFB.get(@access_token, 'me', :type => "friends")
|
||||
- @fb_friends[:data].each do |friend|
|
||||
= image_tag( "http://graph.facebook.com/#{friend[:id]}/picture" )
|
||||
-unless (@aspect == :all) || (@aspect == :public)
|
||||
= link_to (image_tag('add_friend_button.png', :height => "50px", :width => "50px")), "#add_request_pane", :id => 'add_request_button'
|
||||
|
||||
.yo{:style => 'display:none'}
|
||||
#add_request_pane
|
||||
= render "requests/new_request", :aspect => @aspect
|
||||
-else
|
||||
.clear
|
||||
%br
|
||||
= link_to t('.add_friends'), aspects_manage_path
|
||||
#left_pane
|
||||
#friend_pictures
|
||||
= owner_image_link
|
||||
- for friend in @friends
|
||||
= person_image_link(friend)
|
||||
- if @logged_in && (@aspect == :public)
|
||||
%h3 Facebook Friends
|
||||
- @fb_friends = MiniFB.get(@access_token, 'me', :type => "friends")
|
||||
- @fb_friends[:data].each do |friend|
|
||||
= image_tag( "http://graph.facebook.com/#{friend[:id]}/picture" )
|
||||
-unless (@aspect == :all) || (@aspect == :public)
|
||||
= link_to (image_tag('add_friend_button.png', :height => "50px", :width => "50px")), "#add_request_pane", :id => 'add_request_button'
|
||||
|
||||
.yo{:style => 'display:none'}
|
||||
#add_request_pane
|
||||
= render "requests/new_request", :aspect => @aspect
|
||||
-else
|
||||
.clear
|
||||
%br
|
||||
= link_to t('.add_friends'), aspects_manage_path
|
||||
|
||||
%br
|
||||
%br
|
||||
%ul
|
||||
%li= link_to 'stream', aspect_path(@aspect)
|
||||
%li= link_to t('.photos'), albums_path(:aspect => @aspect)
|
||||
|
||||
%br
|
||||
|
||||
%h4 Invites
|
||||
= 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;"}
|
||||
#invite_user_pane
|
||||
= render "invitations/new"
|
||||
|
||||
%br
|
||||
= link_to "Invite a friend!", "#invite_user_pane", :id => "invite_user_button", :class => "invite_user_button", :title => "Invite a friend"
|
||||
%br
|
||||
= "You have #{@invites} invites."
|
||||
.yo{ :style => "display:none;"}
|
||||
#invite_user_pane
|
||||
= render "invitations/new"
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ en:
|
|||
share: "Share"
|
||||
aspect_friends:
|
||||
add_friends: "add friends"
|
||||
photos: "photos"
|
||||
albums:
|
||||
album:
|
||||
you: "you"
|
||||
|
|
@ -69,10 +70,13 @@ en:
|
|||
friends_albums: "Friends Albums"
|
||||
your_albums: "Your Albums"
|
||||
aspects:
|
||||
index:
|
||||
photos: "photos"
|
||||
show:
|
||||
photos: "photos"
|
||||
empty_messages:
|
||||
start_talking: "Nobody has said anything yet. Get the conversation started!"
|
||||
nobody: "We know you have friends, bring them to Diaspora!"
|
||||
nobody_in_aspect: "Your aspect '%{aspect_name}' is empty."
|
||||
add_friend: "Add a friend"
|
||||
add_friend_to: "Add a someone to %{aspect_name}"
|
||||
invite: "Invite a someone to join Diaspora!"
|
||||
manage:
|
||||
add_a_new_aspect: "Add a new aspect"
|
||||
add_a_new_friend: "Add a new friend"
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -964,3 +964,48 @@ ul#settings_nav
|
|||
#aspect_list
|
||||
:margin 0
|
||||
:padding 0
|
||||
|
||||
#left_pane
|
||||
ul
|
||||
:margin 0
|
||||
:padding 0
|
||||
:list
|
||||
:style none
|
||||
li a
|
||||
:display block
|
||||
:padding 3px
|
||||
:border
|
||||
:bottom 1px solid #ccc
|
||||
|
||||
&:hover
|
||||
&:after
|
||||
:content " ►"
|
||||
|
||||
.empty_message
|
||||
:margin
|
||||
:top 12px
|
||||
:bottom 12px
|
||||
:text
|
||||
:align center
|
||||
|
||||
:color #777
|
||||
h3
|
||||
:color #777
|
||||
|
||||
:margin
|
||||
:left 70px
|
||||
: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