diff --git a/app/models/user.rb b/app/models/user.rb index 6466e5d3ebdc54a57c30d89bdd601b2eda4d6faf..1fbc1a8490c41c5207aa2fdd280c9a59e5205b53 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -255,12 +255,15 @@ class User end def terse_url - terse= self.url.gsub(/https?:\/\//, '') - terse.gsub!(/www\./, '') + terse = self.url.gsub(/(https?:|www\.)\/\//, '') terse = terse.chop! if terse[-1, 1] == '/' terse end + def diaspora_handle + "#{self.username}@#{self.terse_url}" + end + def do_bad_things self.password_confirmation = self.password end diff --git a/app/views/people/index.html.haml b/app/views/people/index.html.haml index bbd50ddd045b8be9e6d5ee5da96fbb38bdda013d..e550ae090336c885eb10510f25ebab45f1b0fbeb 100644 --- a/app/views/people/index.html.haml +++ b/app/views/people/index.html.haml @@ -18,7 +18,11 @@ %th url - for person in @people %tr - %td= person.real_name + - if current_user.friends.include? person + %td= link_to person.real_name, person + - else + %td= person.real_name + %td= person.email %td= person.url diff --git a/app/views/requests/_new_request.haml b/app/views/requests/_new_request.haml index 13aba98d947fe715594abe7bb1352ad4ddc5c6d7..87b9776b81fdb7a16f30355bb1bec8781ec62734 100644 --- a/app/views/requests/_new_request.haml +++ b/app/views/requests/_new_request.haml @@ -5,9 +5,12 @@ = form_for Request.new do |f| = f.error_messages - Enter a Diaspora URL, Diaspora username, or random email address: + Enter a Diaspora username: + %br + %i= "Your Diaspora username is: #{current_user.diaspora_handle}" + %p - = f.label :destination_url, "Your Diaspora URL is: #{current_user.username}@#{request.host}" + = f.label :destination_url, "Friend's username" = f.text_field :destination_url = f.hidden_field :group_id, :value => @group.id = f.submit diff --git a/app/views/shared/_group_nav.haml b/app/views/shared/_group_nav.haml index 70968780ae6923e2ab4f57eba7ebda667b067ea2..6e400001dccb3658655711eb6b9f174839da0791 100644 --- a/app/views/shared/_group_nav.haml +++ b/app/views/shared/_group_nav.haml @@ -1,7 +1,5 @@ #group_nav %ul - %li{:class => ("selected" if @group == :all)} - = link_to "All Groups", root_url - for group in @groups %li{:id => group.id, :class => ("selected" if current_group?(group))} %span.group_name @@ -9,9 +7,12 @@ %li.new_group= link_to("+", "#add_group_pane", :id => "add_group_button") - %li - %span{:class => 'âš™'} - = link_to "âš™", edit_group_path(Group.first), :class => "edit_group_button", :title => "Manage your facets." + #group_edit_button + = link_to "edit", edit_group_path(Group.first), :class => "edit_group_button", :title => "Manage your facets." + + %ul{ :style => "position:absolute;right:0;bottom:0;"} + %li{:class => ("selected" if @group == :all)} + = link_to "All Groups", root_url .yo{ :style => "display:none;"} #add_group_pane diff --git a/app/views/users/edit.html.haml b/app/views/users/edit.html.haml index e4c884d83015839f5e61bd1f96fba9941749322d..d8866d2757511304fe25ec3ae932ce56b34aac30 100644 --- a/app/views/users/edit.html.haml +++ b/app/views/users/edit.html.haml @@ -25,8 +25,13 @@ = link_to image_tag(photo.url(:thumb_medium)), "#" =will_paginate @photos - %h3 Info + + %p + %b + DIASPORA USERNAME: + = @user.diaspora_handle + %p = p.label :first_name = p.text_field :first_name, :value => @profile.first_name @@ -38,10 +43,6 @@ = f.label :email = f.text_field :email - %p - = f.label :url - = f.text_field :url - #submit_block = link_to "Cancel", root_path or diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 75ba1f34c7950b9d350772aa5ce2d9691439a1e1..709db609b39e9eedafa12ace0d10b033a5ef263b 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -448,12 +448,22 @@ h1.big_text { display: none; } #group_nav { + position: relative; color: black; } + #group_nav #group_edit_button { + display: inline; + margin-top: 1px; + font-size: 12px; } + #group_nav #group_edit_button a { + color: #999999; } #group_nav ul { margin-bottom: 0; + margin-right: 0; padding: 0; padding-bottom: 0px; padding-top: 35px; + padding-right: 0; + display: inline-block; list-style: none; font-size: 14px; } #group_nav ul > li { @@ -462,6 +472,8 @@ h1.big_text { margin-right: 0.5em; padding: 3px 8px; border: 1px solid #555555; } + #group_nav ul > li.last-child { + margin-right: 0; } #group_nav ul > li a { color: #999999; } #group_nav ul > li a:hover { diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index b774327f6c0d56f43f62fa362f4d5b57c2c74e48..2e9454234ab56f0047667ff5969d3c4b0ad2a3b4 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -567,13 +567,28 @@ h1.big_text :display none #group_nav + :position relative :color #000 + + #group_edit_button + :display inline + :margin + :top 1px + :font + :size 12px + + a + :color #999 + ul :margin :bottom 0 + :right 0 :padding 0 :bottom 0px :top 35px + :right 0 + :display inline-block :list :style none :font @@ -589,6 +604,10 @@ h1.big_text :border 1px solid #555 + &.last-child + :margin + :right 0 + a :color #999 &:hover @@ -602,6 +621,7 @@ h1.big_text a :color #999 + .selected :font diff --git a/public/stylesheets/sass/ui.sass b/public/stylesheets/sass/ui.sass index ee01e08bc5d203f09d6408725eaa4b3a9ccca153..e680232e6852940ee846f7ecc9ba7581dd2f4ca5 100644 --- a/public/stylesheets/sass/ui.sass +++ b/public/stylesheets/sass/ui.sass @@ -89,8 +89,6 @@ ul.button_set .right :position absolute :right 0 - :margin - :top 5px .contextual_pane :z-index 20 diff --git a/public/stylesheets/ui.css b/public/stylesheets/ui.css index dd791bafb2974a21fc21fcd4d28520e50977235c..6a0dd88506bc16d1bbf02c729fe9e9425bc3a1f4 100644 --- a/public/stylesheets/ui.css +++ b/public/stylesheets/ui.css @@ -57,8 +57,7 @@ ul.button_set { .right { position: absolute; - right: 0; - margin-top: 5px; } + right: 0; } .contextual_pane { z-index: 20;