RS, DG; Working on group nav, fixed some stuff in photo

This commit is contained in:
Raphael 2010-08-09 16:34:06 -07:00
parent 02f66d4c0e
commit 838fec4921
8 changed files with 19 additions and 24 deletions

View file

@ -31,12 +31,6 @@ module ApplicationHelper
end
end
def link_to_person(user)
person = user.person
puts person.inspect
link_to person.real_name, person_path(person)
end
def owner_image_tag
person_image_tag(User.owner)
end

View file

@ -26,9 +26,9 @@ class Album
def self.mine_or_friends(friend_param, current_user)
if friend_param
Album.where(:person_id.ne => current_user.id)
Album.where(:person_id.ne => current_user.person.id)
else
Album.where(:person_id => current_user.id)
Album.where(:person_id => current_user.person.id)
end
end

View file

@ -5,7 +5,7 @@
.right#add_album_button
= link_to 'New Album', "#", :class => "button"
#add_album_box.contextual_pane
#add_album_pane.contextual_pane
= render "albums/new_album"
.sub_header

View file

@ -5,10 +5,10 @@
= @album.name
-if current_user.owns? @album
.button.right#add_photos_button
.button.right#add_photo_button
= link_to 'Add Photos', '#'
#add_photo_box.contextual_pane
#add_photo_pane.contextual_pane
= render "photos/new_photo", :photo => @photo, :album => @album
.sub_header

View file

@ -33,7 +33,7 @@
#session_action
- if user_signed_in?
= link_to_person current_user
= link_to current_user.real_name, current_user.person
|
= link_to "requests (#{@request_count})", requests_path, :class => new_request(@request_count)
|

View file

@ -2,7 +2,7 @@
= person_image_tag(post.person)
%span.from
= link_to_person post.person
= link_to post.person.real_name, post.person
%b
posted a new photo to
= link_to post.album.name, object_path(post.album)

View file

@ -3,7 +3,10 @@
- for group in @groups
%li= link_to group.name, group_path(group)
%li.new_group= link_to "NEW GROUP", new_group_path
%li#add_group_button.new_group= link_to "NEW GROUP", "#"
#add_group_pane.contextual_pane
= render "groups/new_group"
#friend_pictures
- for friend in @friends

View file

@ -81,21 +81,19 @@ $(document).ready(function(){
});
//buttons//////
$("#add_photos_button").toggle(
function pane_toggler_button( name ) {
$("#add_" + name + "_button").toggle(
function(){
$("#add_photo_box").fadeIn(300);
$("#add_" + name + "_pane").fadeIn(300);
},function(){
$("#add_photo_box").fadeOut(200);
$("#add_" + name +"_pane").fadeOut(200);
}
);
}
$("#add_album_button").toggle(
function(){
$("#add_album_box").fadeIn(300);
},function(){
$("#add_album_box").fadeOut(200);
}
);
pane_toggler_button("album");
pane_toggler_button("group");
pane_toggler_button("photo");
$("input[type='submit']").addClass("button");