From 501620e9fbc070a67a04337def09e0fb787d16ef Mon Sep 17 00:00:00 2001
From: Raphael <raphael@joindiaspora.com>
Date: Thu, 15 Jul 2010 18:40:55 -0700
Subject: [PATCH] DG RS; fixed some visual bugs.  request link now turns red on
 new request

---
 app/helpers/application_helper.rb        |  4 ++
 app/views/layouts/application.html.haml  | 16 +++----
 app/views/people/_sidebar.html.haml      |  2 +-
 app/views/requests/_request.html.haml    | 11 +++--
 db/seeds/backer.rb                       |  2 +-
 public/javascripts/view.js               |  6 ---
 public/stylesheets/application.css       | 50 ++++++++++-----------
 public/stylesheets/sass/application.sass | 56 +++++++++++-------------
 8 files changed, 68 insertions(+), 79 deletions(-)

diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 897c4826a7..734961773b 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -48,4 +48,8 @@ module ApplicationHelper
     end
   end
 
+  def new_request(request_count)
+    "new_requests" if request_count > 0
+  end
+
 end
diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml
index 79abadcdf6..c763ace6e9 100644
--- a/app/views/layouts/application.html.haml
+++ b/app/views/layouts/application.html.haml
@@ -2,8 +2,8 @@
 %html
   %head
     %title
-      = current_user.real_name if current_user
-      = " | diaspora"
+      = "#{current_user.real_name} | diaspora" if current_user
+
     %meta{"http-equiv"=>"Content-Type", :content=>"text/html; charset=utf-8"}/
     
     = stylesheet_link_tag "blueprint/screen", :media => 'screen'
@@ -32,7 +32,7 @@
           - if user_signed_in?
             = current_user.real_name
             |
-            = link_to "requests (#{@request_count})", requests_path
+            = link_to "requests (#{@request_count})", requests_path, :class => new_request(@request_count)
             |
             = link_to "logout", destroy_user_session_path
           - else
@@ -41,18 +41,18 @@
 
     = render "shared/publisher"
     .container
-
-      #content.span-24.last
+      .span-24.last
         .span-3.append-1.last
           = link_to owner_picture, root_path
           = render 'people/sidebar' if user_signed_in?
 
-        .span-20
+        .span-20.last
           - if user_signed_in?
             %h1#user_name
-              = link_to current_user.real_name, root_url
+              = link_to current_user.real_name, root_path
               %span.description
                 = my_latest_message
           = yield
-        .span-12
+
+        .span-20.last
           = render "posts/debug"
diff --git a/app/views/people/_sidebar.html.haml b/app/views/people/_sidebar.html.haml
index 387bf5ad66..070647a55d 100644
--- a/app/views/people/_sidebar.html.haml
+++ b/app/views/people/_sidebar.html.haml
@@ -2,4 +2,4 @@
 %ul#friend_stream.nav
   - for friend in @friends
     %li= link_to friend.real_name, person_path(friend)
-= link_to "add a new person", new_request_path
+  %li= link_to "add a new person", new_request_path
diff --git a/app/views/requests/_request.html.haml b/app/views/requests/_request.html.haml
index 39a4114b38..03ab427f3b 100644
--- a/app/views/requests/_request.html.haml
+++ b/app/views/requests/_request.html.haml
@@ -1,9 +1,8 @@
 %li.message{:id => request.id}
 
-  = "from #{request.person.real_name}" 
-  = "#{request.destination_url}"
+  %span.from
+    = link_to "#{request.person.real_name}", '#'
 
-  .destroy_link
-    = link_to 'Accept', request_path(request, :accept => true), :method => :delete 
-    |
-    = link_to 'Ignore', request_path(request), :confirm => 'Are you sure?', :method => :delete
+  %ul.request_buttons
+    %li= link_to 'Accept', request_path(request, :accept => true), :method => :delete 
+    %li= link_to 'Ignore', request_path(request), :confirm => 'Are you sure?', :method => :delete
diff --git a/db/seeds/backer.rb b/db/seeds/backer.rb
index d063797623..c731926017 100644
--- a/db/seeds/backer.rb
+++ b/db/seeds/backer.rb
@@ -52,7 +52,7 @@ def create(backer_number)
 
   # Create seed user
   username = backer_info[backer_number][2].gsub(/ /,'').downcase
-  user = User.create( :email => "#{username}@#{username}joindiaspora.com",
+  user = User.create( :email => "#{username}@#{username}.joindiaspora.com",
                      :password => "#{username+backer_info[backer_number][0].to_s}",
                      :profile => Profile.new( :first_name => backer_info[backer_number][1], :last_name => backer_info[backer_number][2] ),
                     :url=> "#{username}.joindiaspora.com")
diff --git a/public/javascripts/view.js b/public/javascripts/view.js
index 7dcfa9a409..d178b23259 100644
--- a/public/javascripts/view.js
+++ b/public/javascripts/view.js
@@ -29,12 +29,6 @@ $(document).ready(function(){
 	  $(this).fadeTo(80, 1);
 	});
 
-	$('ul.nav li').hover(function(){
-	  $(this).fadeTo(60, 0.5);
-	}, function(){
-	  $(this).fadeTo(80, 1);
-	});
-
 	$('#debug_info').click(function() {
 		$('#debug_more').toggle('fast', function() {
 			
diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css
index 57f5f70fae..5c9e754e2f 100644
--- a/public/stylesheets/application.css
+++ b/public/stylesheets/application.css
@@ -11,12 +11,11 @@ body {
   margin: 0; }
 
 a {
-  color: #316191;
   color: #018790;
   text-decoration: none;
   font-weight: bold; }
   a:hover {
-    color: #bacca4; }
+    color: #018790; }
 
 #flash_notice,
 #flash_error,
@@ -97,6 +96,8 @@ header {
     header #session_action a {
       color: #777777;
       border: none; }
+      header #session_action a.new_requests {
+        color: #df0101; }
 
 #show_filters {
   z-index: 100;
@@ -108,19 +109,6 @@ header {
   border: 1px solid #666666;
   padding: 5px; }
 
-ul#stream_filters {
-  padding: 0;
-  margin: 0;
-    margin-bottom: 20px; }
-  ul#stream_filters li {
-    display: block;
-    padding: 8px 0;
-    border-bottom: 1px #eeeeee solid; }
-  ul#stream_filters a {
-    color: #b1cfe3; }
-    ul#stream_filters a:hover {
-      color: black; }
-
 #main {
   width: 100%; }
 
@@ -134,6 +122,9 @@ ul#stream, ul#friend_stream {
     border-bottom: 1px solid #f1f1f1;
     margin-bottom: 5px; }
 
+ul#friend_stream > li {
+  padding: 0.2em 0; }
+
 li.message {
   position: relative;
   line-height: 140%;
@@ -144,8 +135,6 @@ li.message {
     font-weight: normal;
     margin-right: 0.2em;
     font-size: 110%; }
-    li.message span.from a {
-      font-weight: bold; }
   li.message div.time {
     color: #bababa;
     font-size: 70%; }
@@ -174,8 +163,6 @@ form {
   margin-bottom: 1em; }
   #user_name a {
     color: black; }
-    #user_name a:hover {
-      color: #cc1e14; }
 
 div.comments {
   display: none; }
@@ -214,15 +201,29 @@ img#user_picture {
 .pagination a {
   padding: 3px; }
 
-.destroy_link {
+.destroy_link, .request_button {
   position: absolute;
   right: 0;
-  bottom: 15px;
-  display: none; }
-  .destroy_link a {
+  bottom: 15px; }
+  .destroy_link a, .request_button a {
     color: #999999;
     font-weight: normal; }
 
+.destroy_link {
+  display: none; }
+
+.request_buttons {
+  position: absolute;
+  right: 0;
+  display: inline;
+  list-style: none;
+  margin: 0;
+  padding: 0; }
+  .request_buttons > li {
+    display: inline; }
+    .request_buttons > li:first-child {
+      margin-right: 1em; }
+
 #debug_info {
   margin-top: 20px; }
 
@@ -255,9 +256,6 @@ label {
   top: 3px;
   left: 0.48em; }
 
-ul.nav li > a {
-  display: block; }
-
 #publisher {
   padding: 0.5em 0;
   background-color: #f2f8fc;
diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass
index bda0da42e9..b37dc54e88 100644
--- a/public/stylesheets/sass/application.sass
+++ b/public/stylesheets/sass/application.sass
@@ -10,13 +10,12 @@ body
   :padding 2em
   :margin 0
 a
-  :color #316191
   :color #018790
   :text
     :decoration none
   :font-weight bold
   &:hover
-    :color #BACCA4
+    :color #018790
 
 #flash_notice,
 #flash_error,
@@ -101,7 +100,6 @@ header
       :text
         :shadow none
       
-
   #session_action
     :float right
     :margin
@@ -110,6 +108,8 @@ header
     a
       :color #777
       :border none
+      &.new_requests
+        :color #DF0101
     :padding-right 10px
 
 #show_filters
@@ -121,22 +121,6 @@ header
 #show_filters > a
   :border 1px solid #666
   :padding 5px
-
-ul#stream_filters
-  :padding 0
-  :margin 0
-    :bottom 20px
-  li
-    :display block
-    :padding 8px 0
-    :border
-      :bottom 1px #eee solid
-
-  a
-    :color #B1CFE3
-    &:hover
-      :color #000
-
 #main
   :width 100%
 
@@ -144,7 +128,6 @@ ul#stream, ul#friend_stream
   :margin 0
   :padding 0
   :color #666
-
   > li
     :list-style none
     :padding 1em 0
@@ -152,6 +135,10 @@ ul#stream, ul#friend_stream
       :bottom 1px solid #f1f1f1
     :margin-bottom 5px
 
+ul#friend_stream
+  > li
+    :padding 0.2em 0
+
 li.message
   :position relative
   :line-height 140%
@@ -167,9 +154,6 @@ li.message
       :right 0.2em
     :font
       :size 110%
-    a
-      :font
-        :weight bold
 
   div.time
     :color #bababa
@@ -206,8 +190,6 @@ form
     :bottom 1em
   a
     :color #000
-    &:hover
-      :color #CC1E14
 
 div.comments
   :display none
@@ -258,16 +240,32 @@ img#user_picture
   a
     :padding 3px
   
-.destroy_link
+.destroy_link, .request_button
   :position absolute
   :right 0
   :bottom 15px
-  :display none
   a
     :color #999
     :font
       :weight normal
 
+.destroy_link
+  :display none
+
+.request_buttons
+  :position absolute
+  :right 0
+  :display inline
+  :list-style none
+  :margin 0
+  :padding 0
+
+  > li
+    :display inline
+    &:first-child
+      :margin-right 1em
+
+
 #debug_info
   :margin-top 20px
 
@@ -303,9 +301,6 @@ label
   :top 3px
   :left 0.48em
 
-ul.nav li > a
-  :display block
-
 #publisher
   :padding 0.5em 0
   :background
@@ -350,4 +345,3 @@ ul#publisher_content_pickers li
 .selected
   :border
     :bottom 3px solid #999
-  
-- 
GitLab