From 7a259d6d53ba1367f530a04cd9e0d145f2f8a181 Mon Sep 17 00:00:00 2001 From: danielvincent Date: Thu, 18 Nov 2010 14:32:51 -0800 Subject: [PATCH] drafted a basic structure --- app/views/aspects/index.html.haml | 19 ++++++++- app/views/shared/_aspect_contacts.haml | 47 +++++++++++++++++----- app/views/shared/_aspect_nav.haml | 12 +----- app/views/shared/_invitations.haml | 2 - app/views/shared/_publisher.haml | 8 ++-- app/views/shared/_stream_element.html.haml | 3 +- public/stylesheets/sass/application.sass | 27 ++++++++++--- 7 files changed, 83 insertions(+), 35 deletions(-) diff --git a/app/views/aspects/index.html.haml b/app/views/aspects/index.html.haml index b4cfa5612..7590049c5 100644 --- a/app/views/aspects/index.html.haml +++ b/app/views/aspects/index.html.haml @@ -2,8 +2,19 @@ -# licensed under the Affero General Public License version 3 or later. See -# the COPYRIGHT file. -.span-4.append-1.last - = render 'shared/aspect_contacts', :contacts => @contacts, :aspect => @aspect +.span-24.last + %h2{:style=>"position:relative;"} + + = current_user.real_name + + .right{:style=>"font-size:12px;"} + = link_to "View Profile", current_user.person + | + = link_to "Edit Profile", edit_person_path(current_user.person) + | + = link_to "Edit Account", edit_user_path(current_user) + | + = link_to "Logout", destroy_user_session_path .span-15.last = render 'aspects/no_contacts_message', :aspect => @aspect, :contact_count => @contacts.count @@ -15,3 +26,7 @@ #pagination = will_paginate @posts + +.span-8.prepend-1.last + = render 'shared/aspect_contacts', :contacts => @contacts, :aspect => @aspect + diff --git a/app/views/shared/_aspect_contacts.haml b/app/views/shared/_aspect_contacts.haml index eedabf538..4e23ae36b 100644 --- a/app/views/shared/_aspect_contacts.haml +++ b/app/views/shared/_aspect_contacts.haml @@ -3,12 +3,11 @@ -# the COPYRIGHT file. -#left_pane - %h2= aspect == :all ? t('.everyone') : aspect +#left_pane{:class => ("everyone" if aspect == :all)} + %h2{:style=>"position:relative;"} + = aspect == :all ? t('.everyone') : aspect .contact_pictures - = owner_image_link - - for contact in contacts = person_image_link(contact.person) @@ -18,14 +17,44 @@ .fancybox_content #manage_aspect_contacts_pane = render "requests/manage_aspect_contacts", :aspect => @aspect + -else - .clear - %br - = link_to t('.add_contacts'), aspects_manage_path + + %br + %br + %br + %br + %br + + %h3{:style=>"position:relative;"} + Aspects + .right{:style=>"font-size:12px;top:7px;"} + = link_to "add aspect", aspects_manage_path + + - for user_aspect in current_user.aspects + + .aspectt + %h4.aspect_title_right + = link_to user_aspect, user_aspect + + %span{:style=>"font-size:12px;color:#888;"} + = "#{user_aspect.contacts.count} contacts" + + - for aspect_contact in user_aspect.contacts[0..8] + = person_image_link(aspect_contact.person) + + %br + %br + %br + + .clearfix %br - %br - %br + + %h3 + Invites and requests + + No new requests %br = render "shared/invitations", :invites => @invites diff --git a/app/views/shared/_aspect_nav.haml b/app/views/shared/_aspect_nav.haml index 5d8a7f24d..48dc1cc8c 100644 --- a/app/views/shared/_aspect_nav.haml +++ b/app/views/shared/_aspect_nav.haml @@ -5,18 +5,8 @@ #aspect_nav %ul %li{:class => ("selected" if @aspect == :all)} - = link_to t('.everyone'), root_url + = link_to "Home", root_url - for aspect in @aspects %li{:class => ("selected" if current_aspect?(aspect))} = link_for_aspect aspect - %li - = link_to '+', '#add_aspect_pane', :class => "add_aspect_button", :title => t('.add_a_new_aspect') - - %ul.right{:style=>"bottom:0;"} - %li{ :style => "margin-right:0;", :class => ("selected" if @aspect == :manage)} - = link_to ( (@request_count == 0)? t('.manage') : "#{t('.manage')} (#{@request_count})"), {:controller => :aspects, :action => :manage}, :class => "edit_aspect_button", :class => new_request(@request_count), :title => t('.manage_your_aspects') - - .fancybox_content - #add_aspect_pane - = render "aspects/new_aspect" diff --git a/app/views/shared/_invitations.haml b/app/views/shared/_invitations.haml index 2ef7683f8..45efb736d 100644 --- a/app/views/shared/_invitations.haml +++ b/app/views/shared/_invitations.haml @@ -1,5 +1,3 @@ -%h4 - = t('.invites') = link_to t('.invite_someone'), "#invite_user_pane", :class => "invite_user_button", :title => t('.invite_someone') = t('.invitations_left', :count => invites) %br diff --git a/app/views/shared/_publisher.haml b/app/views/shared/_publisher.haml index 40703cbdd..56fca3af1 100644 --- a/app/views/shared/_publisher.haml +++ b/app/views/shared/_publisher.haml @@ -25,7 +25,7 @@ = form_for StatusMessage.new, :remote => true do |status| = status.error_messages %p - = status.label :message, t('.post_a_message_to', :aspect => (aspect == :all ? t('.all') : aspect)) + = status.label :message, t('.post_a_message_to', :aspect => (aspect == :all ? "everyone" : aspect)) = status.text_area :message, :rows => 2, :value => params[:prefill] = status.hidden_field :to, :value => (aspect == :all ? aspect : aspect.id) @@ -54,7 +54,7 @@ = render 'shared/public_explain' - #publisher_photo_upload - = t('or') - = render 'photos/new_photo', :aspect_id => (aspect == :all ? aspect : aspect.id) + /#publisher_photo_upload + /= t('or') + /= render 'photos/new_photo', :aspect_id => (aspect == :all ? aspect : aspect.id) diff --git a/app/views/shared/_stream_element.html.haml b/app/views/shared/_stream_element.html.haml index 7169158b8..43b83ef24 100644 --- a/app/views/shared/_stream_element.html.haml +++ b/app/views/shared/_stream_element.html.haml @@ -10,7 +10,8 @@ .from = link_to post.person.real_name, post.person .aspect - ➔ + /➔ + %i sent to %ul - if post.public? %li= t('the_world') diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index abc29bb32..ca10e5280 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -29,9 +29,6 @@ a h1, h2, h3, h4 :color #444 -h3 - :font - :size 18px .hidden :display none @@ -1183,9 +1180,7 @@ ul#settings_nav :padding 0 #left_pane - h2 - :font - :weight 200 + ul :margin 0 :padding 0 @@ -1201,6 +1196,16 @@ ul#settings_nav &:after :content " ►" +#left_pane.everyone + :background + :color rgb(250,250,250) + :border 1px solid #ddd + :padding 11px + + h2,h3 + :border + :bottom 1px solid #666 + .floating.empty_message :margin :bottom 24px @@ -1817,3 +1822,13 @@ ul#press_logos :top 100px :text :align center + + +h3,h4 + :padding + :bottom 5px + +.aspectt + h4 + :margin + :bottom 0