diff --git a/app/views/albums/_new_album.haml b/app/views/albums/_new_album.haml index d7bd2d997..e8cd3e778 100644 --- a/app/views/albums/_new_album.haml +++ b/app/views/albums/_new_album.haml @@ -2,14 +2,11 @@ -# licensed under the Affero General Public License version 3 or later. See -# the COPYRIGHT file. -.span-12.last - .modal_title_bar - %h4= t('.add_a_new_album') - = form_for Album.new do |f| - = f.error_messages - %p - = f.label :name - = f.text_field :name - = f.hidden_field :to, :value => aspect - = f.submit t('.create'), :class => 'button' += form_for Album.new do |album| + = album.error_messages + %p + = album.label :name + = album.hidden_field :to, :value => aspect + = album.text_field :name + = album.submit t('.create'), :class => 'button' diff --git a/app/views/albums/index.html.haml b/app/views/albums/index.html.haml index b9e62113f..ea046d7aa 100644 --- a/app/views/albums/index.html.haml +++ b/app/views/albums/index.html.haml @@ -8,22 +8,11 @@ $("#add_album_button").fancybox(); }); -%h2 - = @aspect - .friend_pictures.horizontal - = owner_image_link - - for friend in @friends - = person_image_link(friend) +.span-4.append-1.last + = render "shared/aspect_friends" -.span-24.last - %h3 - = @aspect - Albums - = link_to t('.new_album'), '#new_album_pane', {:class => "button", :id => "add_album_button"} - - .fancybox_content - #new_album_pane - = render "albums/new_album", :aspect => params[:aspect] +.span-15.last + = render "shared/publisher", :type => :album, :aspect => @aspect.id %div - for album in @albums diff --git a/app/views/albums/show.html.haml b/app/views/albums/show.html.haml index d6f834c82..6ab43e69d 100644 --- a/app/views/albums/show.html.haml +++ b/app/views/albums/show.html.haml @@ -9,15 +9,12 @@ }); }); -%h2 - = @aspect - .friend_pictures.horizontal - = owner_image_link - - for friend in @friends - = person_image_link(friend) -%h3 - = link_to "#{@aspect} Albums", albums_path(:aspect => @aspect) += render 'shared/author_info', :post => @album + +%ul#breadcrumb + %li= link_to "Photos", '#' + %li= @album.name .span-19.appends-1.last diff --git a/app/views/aspects/index.html.haml b/app/views/aspects/index.html.haml index 8ffe1a519..dbc8ec95e 100644 --- a/app/views/aspects/index.html.haml +++ b/app/views/aspects/index.html.haml @@ -7,7 +7,7 @@ .span-15.last = render 'aspects/no_friends_message' - = render 'shared/publisher' + = render 'shared/publisher', :type => :status_message, :aspect => @aspect = render 'aspects/no_posts_message' %ul#stream - for post in @posts diff --git a/app/views/aspects/show.html.haml b/app/views/aspects/show.html.haml index 8ffe1a519..dbc8ec95e 100644 --- a/app/views/aspects/show.html.haml +++ b/app/views/aspects/show.html.haml @@ -7,7 +7,7 @@ .span-15.last = render 'aspects/no_friends_message' - = render 'shared/publisher' + = render 'shared/publisher', :type => :status_message, :aspect => @aspect = render 'aspects/no_posts_message' %ul#stream - for post in @posts diff --git a/app/views/photos/show.html.haml b/app/views/photos/show.html.haml index e4ae23170..40fbc119c 100644 --- a/app/views/photos/show.html.haml +++ b/app/views/photos/show.html.haml @@ -55,15 +55,12 @@ });//end document ready -%h2 - = @aspect - .friend_pictures.horizontal - = owner_image_link - - for friend in @friends - = person_image_link(friend) += render 'shared/author_info', :post => @photo -%h3 - = link_to @photo.album.name, @photo.album +%ul#breadcrumb + %li= link_to "Photos", '#' + %li= link_to @album.name, album_path(@album) + %li= @photo.caption = link_to "<< #{t('.prev')}", url_to_prev(@photo, @album), :rel => 'prefetch' | diff --git a/app/views/shared/_author_info.html.haml b/app/views/shared/_author_info.html.haml new file mode 100644 index 000000000..6a619c44b --- /dev/null +++ b/app/views/shared/_author_info.html.haml @@ -0,0 +1,15 @@ +#author_info + = owner_image_link + .from + %h2 + = post.person.real_name + .aspect + ➔ + %ul + - if post.public? + the world + - else + - for aspect in current_user.aspects_with_post( post.id ) + %li= link_to aspect.name, aspect + + = link_to "view profile", person_path(post.person) diff --git a/app/views/shared/_publisher.haml b/app/views/shared/_publisher.haml index 3a5a9f468..832c07916 100644 --- a/app/views/shared/_publisher.haml +++ b/app/views/shared/_publisher.haml @@ -9,7 +9,7 @@ }; }); - $("#publisher textarea").live("focus", function(evt){ + $("#publisher textarea, #publisher input").live("focus", function(evt){ $("#publisher .options_and_submit").fadeIn(50); }); @@ -20,28 +20,41 @@ #publisher = owner_image_tag - = form_for StatusMessage.new, :remote => true do |status| - = status.error_messages - %p - = status.label :message, "Post a message to #{@aspect}" - = status.text_area :message, :rows => 2, :value => params[:prefill] + - if( !defined?(type) || type == :status_message ) + = form_for StatusMessage.new, :remote => true do |status| + = status.error_messages + %p + = status.label :message, "Post a message to #{aspect}" + = status.text_area :message, :rows => 2, :value => params[:prefill] - = status.hidden_field :to, :value => (@aspect == :all ? @aspect : @aspect.id) + = status.hidden_field :to, :value => (aspect == :all ? aspect : aspect.id) - .options_and_submit - - - if @aspect == :all - .public_toggle - = status.check_box( :public, :value => false ) - make public - = link_to '(?)', "#question_mark_pane", :class => 'question_mark' + .options_and_submit + + - if aspect == :all + .public_toggle + = status.check_box( :public, :value => false ) + make public + = link_to '(?)', "#question_mark_pane", :class => 'question_mark' - .fancybox_content - #question_mark_pane - = render 'shared/public_explain' + .fancybox_content + #question_mark_pane + = render 'shared/public_explain' - - if @aspect == :all - = status.submit t('.share'), :title => "Share with all aspects" - - else - = status.submit t('.share'), :title => "Share with #{@aspect}" + - if aspect == :all + = status.submit t('.share'), :title => "Share with all aspects" + - else + = status.submit t('.share'), :title => "Share with #{aspect}" + + - else + = form_for Album.new do |album| + = album.error_messages + %p + = album.label :name + = album.text_field :name + + = album.hidden_field :to, :value => aspect + + .options_and_submit + = album.submit "Create", :class => 'button' diff --git a/app/views/status_messages/show.html.haml b/app/views/status_messages/show.html.haml index 398b3a536..1e0f15438 100644 --- a/app/views/status_messages/show.html.haml +++ b/app/views/status_messages/show.html.haml @@ -3,17 +3,11 @@ -# the COPYRIGHT file. -%h2 - = @aspect - .friend_pictures.horizontal - - for friend in @friends - = person_image_link(friend) += render 'shared/author_info', :post => @status_message .span-14.append-1.last #stream %h1.show_text - = person_image_link(@status_message.person) - = link_to @status_message.person.real_name, @status_message.person = make_links(@status_message.message) = "Posted #{how_long_ago(@status_message)} to" diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index bffe9e526..a33b547dd 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -202,6 +202,71 @@ header .avatar :border-radius 5px + +.from + :font + :family 'Helvetica neue', Arial, Helvetica, sans-serif + :text + :shadow 0 1px #fff + + .aspect + :cursor default + :display inline + :color #bbb + :font + :size 85% + a + :font + :weight normal + :color #bbb + + &:hover + :text + :decoration underline + &:active + :color #999 + ul + :display inline + :margin 0 + :padding 0 + :list + :style none + li + :display inline + &:after + :content "," + &:last-child:after + :content "" + + a + :font + :weight bold + +#author_info + :position relative + :padding + :left 65px + :height 70px + + img + :position absolute + :top 8px + :left 0 + + h2 + :margin + :bottom -2px + a + :font + :weight normal + + .from + :font + :size 14px + + .avatar + :border-radius 5px + li.message :position relative :line-height 19px @@ -220,44 +285,6 @@ li.message :padding :left 65px - .from - :font - :family 'Helvetica neue', Arial, Helvetica, sans-serif - :text - :shadow 0 1px #fff - - .aspect - :cursor default - :display inline - :color #bbb - :font - :size 12px - a - :font - :weight normal - :color #bbb - - &:hover - :text - :decoration underline - &:active - :color #999 - ul - :display inline - :margin 0 - :padding 0 - :list - :style none - li - :display inline - &:after - :content "," - &:last-child:after - :content "" - - a - :font - :weight bold :color #444 :font @@ -639,8 +666,11 @@ label :position relative textarea - :width 515px :height 42px + + input[type='text'], + textarea + :width 515px :margin 0 .options_and_submit @@ -1136,3 +1166,27 @@ header .controls :display inline +ul#breadcrumb + :list + :style none + :margin 0 + :padding 0 + :font + :size 14px + :weight bold + :line + :height 3em + + a + :font + :weight bold + + > li + :display inline + + &:after + :content ' ››' + + &:last-child + &:after + :content ''