cleaned up right pane on aspects#all. moved edit_contacts_pane out to a partial -- translation locations need updating.
This commit is contained in:
parent
b56af997cb
commit
7c6d5b8d27
13 changed files with 112 additions and 87 deletions
|
|
@ -86,10 +86,6 @@ module ApplicationHelper
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def new_request(request_count)
|
|
||||||
"new_requests" if request_count > 0 #Should not be Il8ned
|
|
||||||
end
|
|
||||||
|
|
||||||
def post_yield_tag(post)
|
def post_yield_tag(post)
|
||||||
(':' + post.id.to_s).to_sym
|
(':' + post.id.to_s).to_sym
|
||||||
end
|
end
|
||||||
|
|
@ -184,6 +180,6 @@ module ApplicationHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
def info_text(text)
|
def info_text(text)
|
||||||
"<span class='what_is_this' title='#{text}'>?</span>".html_safe
|
image_tag 'icons/monotone_question.png', :class => 'what_is_this', :title => text
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -3,4 +3,19 @@
|
||||||
# the COPYRIGHT file.
|
# the COPYRIGHT file.
|
||||||
|
|
||||||
module RequestsHelper
|
module RequestsHelper
|
||||||
|
|
||||||
|
def new_request?(request_count)
|
||||||
|
'new_requests' if request_count > 0
|
||||||
|
end
|
||||||
|
|
||||||
|
def new_request_link(request_count)
|
||||||
|
if request_count > 0
|
||||||
|
if request_count > 1
|
||||||
|
link_to t('.new_requests', :count => @request_count), aspects_manage_path
|
||||||
|
else
|
||||||
|
link_to t('.new_request', :count => @request_count), aspects_manage_path
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,8 @@ module SocketsHelper
|
||||||
v = render_to_string(:partial => 'shared/stream_element', :locals => {:post => object, :current_user => user})
|
v = render_to_string(:partial => 'shared/stream_element', :locals => {:post => object, :current_user => user})
|
||||||
elsif object.is_a? Person
|
elsif object.is_a? Person
|
||||||
v = render_to_string(:partial => type_partial(object), :locals => {:single_aspect_form => opts[:single_aspect_form], :person => object, :aspects => user.aspects, :current_user => user})
|
v = render_to_string(:partial => type_partial(object), :locals => {:single_aspect_form => opts[:single_aspect_form], :person => object, :aspects => user.aspects, :current_user => user})
|
||||||
|
elsif object.is_a? Comment
|
||||||
|
v = render_to_string(:partial => type_partial(object), :locals => {:comment => object, :person => object.person, :current_user => user})
|
||||||
else
|
else
|
||||||
v = render_to_string(:partial => type_partial(object), :locals => {:post => object, :current_user => user}) unless object.is_a? Retraction
|
v = render_to_string(:partial => type_partial(object), :locals => {:post => object, :current_user => user}) unless object.is_a? Retraction
|
||||||
end
|
end
|
||||||
|
|
|
||||||
15
app/views/aspects/_edit_aspect_pane.html.haml
Normal file
15
app/views/aspects/_edit_aspect_pane.html.haml
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
-# Copyright (c) 2010, Diaspora Inc. This file is
|
||||||
|
-# licensed under the Affero General Public License version 3 or later. See
|
||||||
|
-# the COPYRIGHT file.
|
||||||
|
|
||||||
|
#edit_aspect_pane
|
||||||
|
- if @contacts.count > 0
|
||||||
|
%h4= t('.add_existing')
|
||||||
|
= render 'shared/contact_list', :aspect => aspect, :contacts => contacts, :manage => defined?(manage)
|
||||||
|
|
||||||
|
= render 'shared/add_contact', :aspect => aspect
|
||||||
|
|
||||||
|
%hr
|
||||||
|
.big_buttons
|
||||||
|
= button_to t('.remove_aspect'), aspect, :method => "delete", :confirm => t('.confirm_remove_aspect')
|
||||||
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
#section_header
|
#section_header
|
||||||
%h2=t('.manage_aspects')
|
%h2=t('.manage_aspects')
|
||||||
.right
|
.right{:style=>"top:0;"}
|
||||||
= link_to("+ #{t('.add_a_new_aspect')}", "#add_aspect_pane", :class => "new_aspect add_aspect_button button", :title => t('.add_a_new_aspect'))
|
= link_to("+ #{t('.add_a_new_aspect')}", "#add_aspect_pane", :class => "new_aspect add_aspect_button button", :title => t('.add_a_new_aspect'))
|
||||||
|
|
||||||
.span-4.append-1.last
|
.span-4.append-1.last
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@
|
||||||
#aspect_nav
|
#aspect_nav
|
||||||
%ul
|
%ul
|
||||||
%li{:class => ("selected" if @aspect == :all)}
|
%li{:class => ("selected" if @aspect == :all)}
|
||||||
= link_to ((@request_count == 0)? t('_home') : "#{t('_home')} (#{@request_count})"), root_path, :class => new_request(@request_count)
|
= link_to ((@request_count == 0)? t('_home') : "#{t('_home')} (#{@request_count})"), root_path, :class => new_request?(@request_count)
|
||||||
|
|
||||||
- for aspect in @aspects
|
- for aspect in @aspects
|
||||||
%li{:class => ("selected" if current_aspect?(aspect))}
|
%li{:class => ("selected" if current_aspect?(aspect))}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
.span-24.last
|
.span-24.last
|
||||||
#author_info
|
#author_info
|
||||||
.from{:style=>"padding-left:0;display:block;"}
|
.from{:style=>"padding-left:0;display:block;"}
|
||||||
%h2
|
%h2{:style=>"display:block;"}
|
||||||
= @person.real_name
|
= @person.real_name
|
||||||
.right{:style => "top:0;"}
|
.right{:style => "top:0;"}
|
||||||
%span.description
|
%span.description
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
= submit_tag t('.create_request')
|
= submit_tag t('.create_request')
|
||||||
|
|
||||||
%p{:style => "margin:12px 0 24px 0px;color:#999;text-align:center;"}
|
%p{:style => "margin:12px 0 24px 0px;color:#999;text-align:center;"}
|
||||||
= t '.your_diaspora_username_is', :diaspora_handle => current_user.diaspora_handle
|
= t('.your_diaspora_username_is', :diaspora_handle => current_user.diaspora_handle)
|
||||||
|
|
||||||
#loader.hidden
|
#loader.hidden
|
||||||
= image_tag 'ajax-loader.gif'
|
= image_tag 'ajax-loader.gif'
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,6 @@
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
- if aspect != :all && aspect.contacts.count == 0
|
- if aspect != :all && aspect.contacts.count == 0
|
||||||
:javascript
|
:javascript
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
|
|
@ -50,28 +49,14 @@
|
||||||
- if (aspect == :all) && @request_count > 0
|
- if (aspect == :all) && @request_count > 0
|
||||||
#new_request_pane{:class => "everyone"}
|
#new_request_pane{:class => "everyone"}
|
||||||
%h1.new_request{:style => 'text-align:center'}
|
%h1.new_request{:style => 'text-align:center'}
|
||||||
- if @request_count > 1
|
= new_request_link(@request_count)
|
||||||
= link_to t('.new_requests', :count => @request_count), aspects_manage_path
|
|
||||||
- else
|
|
||||||
= link_to t('.new_request', :count => @request_count), aspects_manage_path
|
|
||||||
|
|
||||||
#left_pane{:class => ("everyone" if aspect == :all)}
|
#left_pane{:class => ("everyone" if aspect == :all)}
|
||||||
|
|
||||||
- if aspect == :all
|
- if aspect == :all
|
||||||
%h2= t('.all_contacts')
|
%h3= t('.all_contacts')
|
||||||
|
|
||||||
- unless aspect == :all
|
.section.contact_pictures
|
||||||
#edit_aspect_pane
|
|
||||||
- if @contacts.count > 0
|
|
||||||
%h4= t('.add_existing')
|
|
||||||
= render 'shared/contact_list', :aspect => aspect, :contacts => @contacts, :manage => defined?(manage)
|
|
||||||
|
|
||||||
= render 'shared/add_contact', :aspect => aspect
|
|
||||||
|
|
||||||
%hr
|
|
||||||
.big_buttons
|
|
||||||
= button_to t('.remove_aspect'), aspect, :method => "delete", :confirm => t('.confirm_remove_aspect')
|
|
||||||
|
|
||||||
.contact_pictures
|
|
||||||
- for contact in contacts
|
- for contact in contacts
|
||||||
= person_image_link(contact.person)
|
= person_image_link(contact.person)
|
||||||
|
|
||||||
|
|
@ -81,37 +66,29 @@
|
||||||
= form_tag(people_path, :method => 'get') do
|
= form_tag(people_path, :method => 'get') do
|
||||||
= text_field_tag 'q', nil, :placeholder => t('search'), :type => 'search', :results => 5
|
= text_field_tag 'q', nil, :placeholder => t('search'), :type => 'search', :results => 5
|
||||||
|
|
||||||
|
-if aspect == :all
|
||||||
-if aspect == :all
|
.section.aspect_listings
|
||||||
%br
|
%h3
|
||||||
%br
|
|
||||||
%br
|
|
||||||
%br
|
|
||||||
|
|
||||||
%h3{:style=>"position:relative;"}
|
|
||||||
= link_to(t('.aspects'), aspects_manage_path)
|
= link_to(t('.aspects'), aspects_manage_path)
|
||||||
.right{:style=>"font-size:12px;top:7px;"}
|
.right{:style=>"font-size:12px;top:7px;"}
|
||||||
= link_to t('.add_aspect'), '#add_aspect_pane', :class => "add_aspect_button"
|
= link_to t('.add_aspect'), '#add_aspect_pane', :class => "add_aspect_button"
|
||||||
|
|
||||||
- for user_aspect in current_user.aspects
|
%ul
|
||||||
|
- for user_aspect in current_user.aspects
|
||||||
%div{:style=>"border-bottom:1px solid #eee;padding:6px;"}
|
%li
|
||||||
%h4.aspect_title_right{:style => "margin-bottom:0;"}
|
%h4
|
||||||
= link_to user_aspect, user_aspect
|
= link_to user_aspect, user_aspect
|
||||||
%span{:style=>"font-size:12px;color:#888;"}
|
%span
|
||||||
= "#{user_aspect.contacts.count} #{t('.contacts')}"
|
= "#{user_aspect.contacts.count} #{t('.contacts')}"
|
||||||
|
|
||||||
- if user_aspect.contacts.count > 0
|
|
||||||
- for aspect_contact in user_aspect.contacts[0..7]
|
|
||||||
= person_image_link(aspect_contact.person)
|
|
||||||
|
|
||||||
.clearfix
|
|
||||||
|
|
||||||
%br
|
|
||||||
%br
|
|
||||||
%br
|
|
||||||
%br
|
|
||||||
|
|
||||||
|
- if user_aspect.contacts.count > 0
|
||||||
|
- for aspect_contact in user_aspect.contacts[0..7]
|
||||||
|
= person_image_link(aspect_contact.person)
|
||||||
|
.section
|
||||||
%h3= t('.invites')
|
%h3= t('.invites')
|
||||||
= render "shared/invitations", :invites => @invites
|
= render "shared/invitations", :invites => @invites
|
||||||
|
|
||||||
|
-else
|
||||||
|
= render 'aspects/edit_aspect_pane', :aspect => aspect, :contacts => @contacts
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,3 +7,4 @@
|
||||||
= render "invitations/new"
|
= render "invitations/new"
|
||||||
- else
|
- else
|
||||||
= t('.dont_have_now')
|
= t('.dont_have_now')
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -83,10 +83,7 @@ en:
|
||||||
done_editing: "done editing"
|
done_editing: "done editing"
|
||||||
new_requests: "%{count} new requests!"
|
new_requests: "%{count} new requests!"
|
||||||
new_request: "%{count} new request!"
|
new_request: "%{count} new request!"
|
||||||
add_existing: "Add an existing contact"
|
|
||||||
contacts: "contacts"
|
contacts: "contacts"
|
||||||
remove_aspect: "Remove Aspect"
|
|
||||||
confirm_remove_aspect: "Remove aspect?"
|
|
||||||
no_contacts: "You currently have no contacts. Find your contacts here."
|
no_contacts: "You currently have no contacts. Find your contacts here."
|
||||||
aspects: "Aspects"
|
aspects: "Aspects"
|
||||||
add_aspect: "add aspect"
|
add_aspect: "add aspect"
|
||||||
|
|
@ -163,6 +160,10 @@ en:
|
||||||
work: "Work"
|
work: "Work"
|
||||||
index:
|
index:
|
||||||
handle_explanation: "This is your diaspora handle. Like an email address, you can give this to people to reach you."
|
handle_explanation: "This is your diaspora handle. Like an email address, you can give this to people to reach you."
|
||||||
|
edit_aspect_pane:
|
||||||
|
remove_aspect: "Remove Aspect"
|
||||||
|
confirm_remove_aspect: "Remove aspect?"
|
||||||
|
add_existing: "Add an existing contact"
|
||||||
users:
|
users:
|
||||||
edit:
|
edit:
|
||||||
export_data: "Export Data"
|
export_data: "Export Data"
|
||||||
|
|
|
||||||
BIN
public/images/icons/monotone_question.png
Normal file
BIN
public/images/icons/monotone_question.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 746 B |
|
|
@ -28,6 +28,7 @@ a
|
||||||
|
|
||||||
h1, h2, h3, h4
|
h1, h2, h3, h4
|
||||||
:color #444
|
:color #444
|
||||||
|
:position relative
|
||||||
|
|
||||||
h4
|
h4
|
||||||
:margin
|
:margin
|
||||||
|
|
@ -1176,16 +1177,13 @@ ul#settings_nav
|
||||||
a
|
a
|
||||||
:padding 2px
|
:padding 2px
|
||||||
|
|
||||||
|
|
||||||
.settings_pane
|
.settings_pane
|
||||||
:display none
|
:display none
|
||||||
|
|
||||||
|
|
||||||
#fancybox-close:hover
|
#fancybox-close:hover
|
||||||
:background
|
:background
|
||||||
:color transparent
|
:color transparent
|
||||||
|
|
||||||
|
|
||||||
.contact_pictures
|
.contact_pictures
|
||||||
:margin
|
:margin
|
||||||
:top 12px
|
:top 12px
|
||||||
|
|
@ -1220,23 +1218,55 @@ ul#settings_nav
|
||||||
|
|
||||||
h2,h3
|
h2,h3
|
||||||
:border
|
:border
|
||||||
:bottom 1px solid #666
|
:bottom 1px solid #999
|
||||||
|
|
||||||
#edit_aspect_pane
|
h2,h3,h4
|
||||||
h4
|
|
||||||
:font
|
:font
|
||||||
:weight bold
|
:weight bold
|
||||||
:text
|
:text
|
||||||
:shadow 0 1px #fff
|
:shadow 0 1px #fff
|
||||||
|
|
||||||
|
h4 > span
|
||||||
|
:font
|
||||||
|
:weight normal
|
||||||
|
:size 12px
|
||||||
|
:color #999
|
||||||
|
|
||||||
|
.avatar
|
||||||
|
:margin-right -1px
|
||||||
|
:width 30px
|
||||||
|
:height 30px
|
||||||
|
|
||||||
|
#edit_aspect_pane
|
||||||
:margin
|
:margin
|
||||||
:top 12px
|
:top 12px
|
||||||
:background -webkit-gradient(linear, 0% 0%, 0% 100%, from(#FBFBFB), to(#F5F5F5))
|
:background -webkit-gradient(linear, 0% 0%, 0% 100%, from(#FBFBFB), to(#F5F5F5))
|
||||||
|
:background -moz-linear-gradient(top, #FBFBFB, #F5F5F5)
|
||||||
|
|
||||||
:border 1px solid #eee
|
:border 1px solid #eee
|
||||||
:top 1px solid #fff
|
:top 1px solid #fff
|
||||||
:bottom 1px solid #fff
|
:bottom 1px solid #fff
|
||||||
|
|
||||||
|
#left_pane.everyone
|
||||||
|
.aspect_listings
|
||||||
|
a
|
||||||
|
:font
|
||||||
|
:weight bold
|
||||||
|
|
||||||
|
.section
|
||||||
|
:margin
|
||||||
|
:bottom 24px
|
||||||
|
|
||||||
|
.aspect_listings
|
||||||
|
ul
|
||||||
|
:padding 0
|
||||||
|
:margin 0
|
||||||
|
> li
|
||||||
|
:padding 6px
|
||||||
|
:border
|
||||||
|
:bottom 1px solid #ddd
|
||||||
|
|
||||||
|
|
||||||
.floating.empty_message
|
.floating.empty_message
|
||||||
:margin
|
:margin
|
||||||
:bottom 24px
|
:bottom 24px
|
||||||
|
|
@ -1598,6 +1628,9 @@ ul#request_result
|
||||||
:margin
|
:margin
|
||||||
:bottom 1.5em
|
:bottom 1.5em
|
||||||
|
|
||||||
|
:-webkit-box-shadow 0 1px #fff
|
||||||
|
:-moz-box-shadow 0 1px #fff
|
||||||
|
|
||||||
input.contact_list_search
|
input.contact_list_search
|
||||||
:width 100%
|
:width 100%
|
||||||
:margin
|
:margin
|
||||||
|
|
@ -1651,8 +1684,14 @@ ul#request_result
|
||||||
&:active
|
&:active
|
||||||
:background -webkit-gradient( linear, left bottom, left top, color-stop(0, rgb(130,55,55)), color-stop(1, rgb(199,119,119)))
|
:background -webkit-gradient( linear, left bottom, left top, color-stop(0, rgb(130,55,55)), color-stop(1, rgb(199,119,119)))
|
||||||
:background -moz-linear-gradient(top, rgb(199,119,119), rgb(130,55,55))
|
:background -moz-linear-gradient(top, rgb(199,119,119), rgb(130,55,55))
|
||||||
|
|
||||||
|
|
||||||
|
#edit_aspect_pane .contact_list
|
||||||
|
.avatar
|
||||||
|
:height 22px
|
||||||
|
:width 22px
|
||||||
|
:position absolute
|
||||||
|
:top 6px
|
||||||
|
|
||||||
footer
|
footer
|
||||||
:margin
|
:margin
|
||||||
:top 40px
|
:top 40px
|
||||||
|
|
@ -1930,32 +1969,11 @@ h3,h4
|
||||||
:border-radius 5px
|
:border-radius 5px
|
||||||
|
|
||||||
.what_is_this
|
.what_is_this
|
||||||
:display inline-block
|
|
||||||
:cursor default
|
|
||||||
:font
|
|
||||||
:size 8px
|
|
||||||
:color #fff
|
|
||||||
|
|
||||||
:background
|
|
||||||
:color #ccc
|
|
||||||
|
|
||||||
:-webkit-border-radius 10px
|
|
||||||
:-moz-border-radius 10px
|
|
||||||
:border-radius 10px
|
|
||||||
|
|
||||||
:width 12px
|
|
||||||
:height 12px
|
|
||||||
:max-width 12px
|
|
||||||
:max-height 12px
|
|
||||||
:text
|
|
||||||
:indent 4px
|
|
||||||
|
|
||||||
:position relative
|
:position relative
|
||||||
:top -4px
|
:top 3px
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
:background
|
:opacity 0.5
|
||||||
:color #107FC9
|
|
||||||
|
|
||||||
#edit_aspect_trigger
|
#edit_aspect_trigger
|
||||||
:font
|
:font
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue