Merge branch 'master' of github.com:diaspora/diaspora
54
'
|
|
@ -1,54 +0,0 @@
|
||||||
-# Copyright (c) 2010, Diaspora Inc. This file is
|
|
||||||
-# licensed under the Affero General Public License version 3 or later. See
|
|
||||||
-# the COPYRIGHT file.
|
|
||||||
|
|
||||||
!!!
|
|
||||||
%html{:lang => I18n.locale.to_s}
|
|
||||||
%head
|
|
||||||
%title
|
|
||||||
= "#{current_user.real_name} | diaspora" if current_user
|
|
||||||
|
|
||||||
/%meta{"http-equiv"=>"Content-Type", :content=>"text/html; charset=utf-8"}/
|
|
||||||
|
|
||||||
= stylesheet_link_tag 'mobile'
|
|
||||||
= stylesheet_link_tag 'http://code.jquery.com/mobile/1.0a1/jquery.mobile-1.0a1.min.css'
|
|
||||||
|
|
||||||
- if current_user
|
|
||||||
%link{:rel => "alternate", :href => "#{current_user.public_url}", :type => "application/atom+xml", :title => "Public Diaspora Feed for #{current_user.real_name}"}
|
|
||||||
|
|
||||||
/= javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"
|
|
||||||
= javascript_include_tag 'vendor/jquery-1.4.2.min', 'rails', 'vendor/jquery_mobile_a1'
|
|
||||||
|
|
||||||
= csrf_meta_tag
|
|
||||||
= yield(:head)
|
|
||||||
|
|
||||||
%body
|
|
||||||
#news{ :data => {:role => "page"}}
|
|
||||||
%div{:data => {:role => 'header', :nobackbtn => 'true'}}
|
|
||||||
foo
|
|
||||||
%header
|
|
||||||
.container
|
|
||||||
#notification
|
|
||||||
- flash.each do |name, msg|
|
|
||||||
= content_tag :div, msg, :id => "flash_#{name}"
|
|
||||||
#diaspora_text{:data => {:role => 'header', :nobackbtn => 'true'}}
|
|
||||||
%h1= link_to "DIASPORA", (current_user ? root_path : new_user_session_path)
|
|
||||||
|
|
||||||
%ul#user_menu
|
|
||||||
.avatar
|
|
||||||
= owner_image_tag
|
|
||||||
= link_to current_user.real_name, '#'
|
|
||||||
%li= link_to t('.view_profile'), current_user.person
|
|
||||||
%li= link_to t('.edit_profile'), edit_person_path(current_user.person)
|
|
||||||
%li= link_to t('.account_settings'), edit_user_path(current_user)
|
|
||||||
%li= link_to t('.logout.'), destroy_user_session_path
|
|
||||||
|
|
||||||
= render "shared/aspect_nav"
|
|
||||||
|
|
||||||
.container
|
|
||||||
.span-24.last
|
|
||||||
= yield
|
|
||||||
|
|
||||||
.span-24.last
|
|
||||||
= render "posts/debug"
|
|
||||||
|
|
||||||
2
.gitmodules
vendored
|
|
@ -1,3 +1,3 @@
|
||||||
[submodule "pkg"]
|
[submodule "pkg"]
|
||||||
path = pkg
|
path = pkg
|
||||||
url = git://github.com/diaspora/diaspora-packages.git
|
url = http://github.com/diaspora/diaspora-packages.git
|
||||||
|
|
|
||||||
|
|
@ -102,6 +102,10 @@ class AspectsController < ApplicationController
|
||||||
else
|
else
|
||||||
flash[:error] = I18n.t 'aspects.remove_from_aspect.failure'
|
flash[:error] = I18n.t 'aspects.remove_from_aspect.failure'
|
||||||
end
|
end
|
||||||
redirect_to aspects_manage_path
|
if params[:manage]
|
||||||
|
redirect_to aspects_manage_path
|
||||||
|
else
|
||||||
|
redirect_to aspect_path(params[:aspect_id])
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@
|
||||||
%span.tip click to edit
|
%span.tip click to edit
|
||||||
|
|
||||||
%ul.tools
|
%ul.tools
|
||||||
%li= link_to t('.add_a_new_friend'), "#add_request_pane_#{aspect.id}", :class => 'add_request_button'
|
%li= link_to t('.add_a_new_friend'), "#manage_aspect_contacts_pane_#{aspect.id}", :class => 'manage_aspect_contacts_button'
|
||||||
%li!= remove_link(aspect)
|
%li!= remove_link(aspect)
|
||||||
|
|
||||||
%ul.dropzone{:data=>{:aspect_id=>aspect.id}}
|
%ul.dropzone{:data=>{:aspect_id=>aspect.id}}
|
||||||
|
|
@ -59,7 +59,7 @@
|
||||||
|
|
||||||
|
|
||||||
.fancybox_content
|
.fancybox_content
|
||||||
%div{:id => "add_request_pane_#{aspect.id}"}
|
%div{:id => "manage_aspect_contacts_pane_#{aspect.id}"}
|
||||||
= render "requests/new_request", :aspect => aspect, :manage => true
|
= render "requests/manage_aspect_contacts", :aspect => aspect, :manage => true
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,12 +5,12 @@
|
||||||
.span-15.last
|
.span-15.last
|
||||||
.modal_title_bar
|
.modal_title_bar
|
||||||
%h4
|
%h4
|
||||||
=t('.add_a_new_friend_to')
|
Manage contacts within
|
||||||
%i= aspect.name
|
%i= aspect.name
|
||||||
|
|
||||||
.span-6.append-1.last
|
.span-6.append-1.last
|
||||||
%h3 Existing contacts
|
%h3 Existing contacts
|
||||||
= render 'shared/add_friend_dropdown', :aspect => aspect, :friends => current_user.friends_not_in_aspect(aspect), :manage => defined?(manage)
|
= render 'shared/contact_list', :aspect => aspect, :contacts => current_user.friends, :manage => defined?(manage)
|
||||||
|
|
||||||
.span-7.last
|
.span-7.last
|
||||||
%h3 Add a new contact
|
%h3 Add a new contact
|
||||||
|
|
@ -3,8 +3,6 @@
|
||||||
-# the COPYRIGHT file.
|
-# the COPYRIGHT file.
|
||||||
|
|
||||||
= form_tag(requests_path) do
|
= form_tag(requests_path) do
|
||||||
- pp person
|
|
||||||
- pp aspects
|
|
||||||
= select_tag(:aspect_id, options_from_collection_for_select(aspects, "id", "name"))
|
= select_tag(:aspect_id, options_from_collection_for_select(aspects, "id", "name"))
|
||||||
= hidden_field_tag :destination_handle, :value => person.diaspora_handle
|
= hidden_field_tag :destination_handle, person.diaspora_handle
|
||||||
= submit_tag t('people.person.add_friend')
|
= submit_tag t('people.person.add_friend')
|
||||||
|
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
||||||
|
|
||||||
:javascript
|
|
||||||
$(".contact_list_search").keyup(function(e){
|
|
||||||
var search = $(this);
|
|
||||||
var list = $(this).siblings("ul").first();
|
|
||||||
var query = new RegExp(search.val(),'i');
|
|
||||||
|
|
||||||
$("li", list).each( function() {
|
|
||||||
var element = $(this);
|
|
||||||
if( !element.text().match(query) ){
|
|
||||||
if( !element.hasClass('invis') ){
|
|
||||||
element.addClass('invis').fadeOut(10);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
element.removeClass('invis').fadeIn(10);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
.contact_list
|
|
||||||
= search_field_tag :hello, "", :class => 'contact_list_search', :results => 5
|
|
||||||
%ul
|
|
||||||
- for person in friends
|
|
||||||
%li
|
|
||||||
= form_tag '/aspects/add_to_aspect' do
|
|
||||||
= person.real_name
|
|
||||||
|
|
||||||
.right
|
|
||||||
= hidden_field_tag :aspect_id, aspect.id
|
|
||||||
= hidden_field_tag :friend_id, person.id
|
|
||||||
- if defined?(manage) && manage
|
|
||||||
= hidden_field_tag :manage, true
|
|
||||||
= submit_tag '+'
|
|
||||||
|
|
||||||
|
|
@ -13,11 +13,11 @@
|
||||||
= person_image_link(friend)
|
= person_image_link(friend)
|
||||||
|
|
||||||
-unless (aspect == :all)
|
-unless (aspect == :all)
|
||||||
= link_to (image_tag('add_friend_button.png', :title => "#{t('.add_to', :aspect => @aspect)}")), "#add_request_pane", :class => 'add_request_button'
|
= link_to (image_tag('add_friend_button.png', :title => "manage #{@aspect}")), "#manage_aspect_contacts_pane", :class => 'manage_aspect_contacts_button'
|
||||||
|
|
||||||
.fancybox_content
|
.fancybox_content
|
||||||
#add_request_pane
|
#manage_aspect_contacts_pane
|
||||||
= render "requests/new_request", :aspect => @aspect
|
= render "requests/manage_aspect_contacts", :aspect => @aspect
|
||||||
-else
|
-else
|
||||||
.clear
|
.clear
|
||||||
%br
|
%br
|
||||||
|
|
|
||||||
55
app/views/shared/_contact_list.html.haml
Normal file
|
|
@ -0,0 +1,55 @@
|
||||||
|
-# Copyright (c) 2010, Diaspora Inc. This file is
|
||||||
|
-# licensed under the Affero General Public License version 3 or later. See
|
||||||
|
-# the COPYRIGHT file.
|
||||||
|
|
||||||
|
|
||||||
|
:javascript
|
||||||
|
$(".contact_list_search").keyup(function(e){
|
||||||
|
var search = $(this);
|
||||||
|
var list = $(this).siblings("ul").first();
|
||||||
|
var query = new RegExp(search.val(),'i');
|
||||||
|
|
||||||
|
$("li", list).each( function() {
|
||||||
|
var element = $(this);
|
||||||
|
if( !element.text().match(query) ){
|
||||||
|
if( !element.hasClass('invis') ){
|
||||||
|
element.addClass('invis').fadeOut(10);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
element.removeClass('invis').fadeIn(10);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
.contact_list
|
||||||
|
= search_field_tag :contact_search, "", :class => 'contact_list_search', :results => 5, :placeholder => "Search contacts"
|
||||||
|
|
||||||
|
%ul
|
||||||
|
- for contact in contacts
|
||||||
|
%li
|
||||||
|
|
||||||
|
- unless contact.aspect_ids.include?(aspect.id)
|
||||||
|
= form_tag '/aspects/add_to_aspect' do
|
||||||
|
= person_image_tag contact.person
|
||||||
|
%span.name
|
||||||
|
= contact.person.real_name
|
||||||
|
.right
|
||||||
|
= hidden_field_tag :aspect_id, aspect.id
|
||||||
|
= hidden_field_tag :friend_id, contact.person.id
|
||||||
|
- if defined?(manage) && manage
|
||||||
|
= hidden_field_tag :manage, true
|
||||||
|
= submit_tag '+', :class => 'add', :title => "Add #{contact.person.real_name} to #{aspect}"
|
||||||
|
|
||||||
|
- else
|
||||||
|
= form_tag '/aspects/remove_from_aspect' do
|
||||||
|
= person_image_tag contact.person
|
||||||
|
%span.name
|
||||||
|
= contact.person.real_name
|
||||||
|
.right
|
||||||
|
= hidden_field_tag :aspect_id, aspect.id
|
||||||
|
= hidden_field_tag :friend_id, contact.person.id
|
||||||
|
- if defined?(manage) && manage
|
||||||
|
= hidden_field_tag :manage, true
|
||||||
|
= submit_tag 'x', :class => 'remove', :title => "Remove #{contact.person.real_name} from #{aspect}"
|
||||||
|
|
||||||
|
|
@ -22,11 +22,11 @@
|
||||||
- for friend in aspect.person_objects
|
- for friend in aspect.person_objects
|
||||||
= person_image_link(friend)
|
= person_image_link(friend)
|
||||||
|
|
||||||
= link_to (image_tag('add_friend_button.png', :title => "add to #{aspect}")), "#add_request_pane", :class => 'add_request_button'
|
= link_to (image_tag('add_friend_button.png', :title => "add to #{aspect}")), '#manage_aspect_contacts_pane', :class => 'manage_aspect_contacts_button'
|
||||||
|
|
||||||
.fancybox_content
|
.fancybox_content
|
||||||
#add_request_pane
|
#manage_aspect_contacts_pane
|
||||||
= render "requests/new_request", :aspect => aspect, :getting_started => 2
|
= render "requests/manage_aspect_contacts", :aspect => aspect, :getting_started => 2
|
||||||
|
|
||||||
= link_to "x", aspect_path(aspect), :method => :delete, :remote => true, :class => "delete right"
|
= link_to "x", aspect_path(aspect), :method => :delete, :remote => true, :class => "delete right"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -298,7 +298,7 @@ en:
|
||||||
last_seen: "last seen: %{how_long_ago}"
|
last_seen: "last seen: %{how_long_ago}"
|
||||||
friends_since: "friends since: %{how_long_ago}"
|
friends_since: "friends since: %{how_long_ago}"
|
||||||
requests:
|
requests:
|
||||||
new_request:
|
manage_aspect_contacts:
|
||||||
add_a_new_friend_to: "Add a new friend to"
|
add_a_new_friend_to: "Add a new friend to"
|
||||||
enter_a_diaspora_username: "Enter a Diaspora username:"
|
enter_a_diaspora_username: "Enter a Diaspora username:"
|
||||||
your_diaspora_username_is: "Your Diaspora username is: %{diaspora_handle}"
|
your_diaspora_username_is: "Your Diaspora username is: %{diaspora_handle}"
|
||||||
|
|
|
||||||
0
log/.gitkeep
Normal file
2
pkg
|
|
@ -1 +1 @@
|
||||||
Subproject commit d243ba8dd60e6ada95907d90aff441c140380415
|
Subproject commit 9d3991fb6ce61f60fe5df9556426adc371fe7b21
|
||||||
|
|
@ -19,7 +19,7 @@ $(document).ready(function(){
|
||||||
|
|
||||||
//buttons//////
|
//buttons//////
|
||||||
$(".add_aspect_button," +
|
$(".add_aspect_button," +
|
||||||
".add_request_button," +
|
".manage_aspect_contacts_button," +
|
||||||
".invite_user_button," +
|
".invite_user_button," +
|
||||||
".add_photo_button," +
|
".add_photo_button," +
|
||||||
".remove_person_button," +
|
".remove_person_button," +
|
||||||
|
|
|
||||||
|
|
@ -1553,12 +1553,18 @@ h3 span.current_gs_step
|
||||||
:max-height 300px
|
:max-height 300px
|
||||||
:overflow auto
|
:overflow auto
|
||||||
|
|
||||||
:border 2px solid #ccc
|
:border 2px solid #eee
|
||||||
|
|
||||||
|
:border-radius 5px
|
||||||
|
|
||||||
:margin
|
:margin
|
||||||
:bottom 1.5em
|
:bottom 1.5em
|
||||||
|
|
||||||
input.contact_list_search
|
input.contact_list_search
|
||||||
:width 100%
|
:width 100%
|
||||||
|
:margin
|
||||||
|
:top 0
|
||||||
|
|
||||||
ul
|
ul
|
||||||
:width 100%
|
:width 100%
|
||||||
:margin 0
|
:margin 0
|
||||||
|
|
@ -1578,8 +1584,24 @@ h3 span.current_gs_step
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
:background
|
:background
|
||||||
:color #eee
|
:color rgb(250,250,250)
|
||||||
|
|
||||||
.right
|
.right
|
||||||
:top -6px
|
:top -6px
|
||||||
|
|
||||||
|
.avatar
|
||||||
|
:height 22px
|
||||||
|
:width 22px
|
||||||
|
:position absolute
|
||||||
|
:top -2px
|
||||||
|
|
||||||
|
span.name
|
||||||
|
:padding
|
||||||
|
:left 30px
|
||||||
|
|
||||||
|
input
|
||||||
|
&.add
|
||||||
|
:color green
|
||||||
|
|
||||||
|
&.remove
|
||||||
|
:color red
|
||||||
|
|
|
||||||
BIN
public/stylesheets/vendor/blank.gif
vendored
Normal file
|
After Width: | Height: | Size: 43 B |
BIN
public/stylesheets/vendor/fancy_close.png
vendored
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
public/stylesheets/vendor/fancy_loading.png
vendored
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
public/stylesheets/vendor/fancy_nav_left.png
vendored
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
public/stylesheets/vendor/fancy_nav_right.png
vendored
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
public/stylesheets/vendor/fancy_shadow_e.png
vendored
Normal file
|
After Width: | Height: | Size: 107 B |
BIN
public/stylesheets/vendor/fancy_shadow_n.png
vendored
Normal file
|
After Width: | Height: | Size: 106 B |
BIN
public/stylesheets/vendor/fancy_shadow_ne.png
vendored
Normal file
|
After Width: | Height: | Size: 347 B |
BIN
public/stylesheets/vendor/fancy_shadow_nw.png
vendored
Normal file
|
After Width: | Height: | Size: 324 B |
BIN
public/stylesheets/vendor/fancy_shadow_s.png
vendored
Normal file
|
After Width: | Height: | Size: 111 B |
BIN
public/stylesheets/vendor/fancy_shadow_se.png
vendored
Normal file
|
After Width: | Height: | Size: 352 B |
BIN
public/stylesheets/vendor/fancy_shadow_sw.png
vendored
Normal file
|
After Width: | Height: | Size: 340 B |
BIN
public/stylesheets/vendor/fancy_shadow_w.png
vendored
Normal file
|
After Width: | Height: | Size: 103 B |
BIN
public/stylesheets/vendor/fancy_title_left.png
vendored
Normal file
|
After Width: | Height: | Size: 503 B |
BIN
public/stylesheets/vendor/fancy_title_main.png
vendored
Normal file
|
After Width: | Height: | Size: 96 B |
BIN
public/stylesheets/vendor/fancy_title_over.png
vendored
Normal file
|
After Width: | Height: | Size: 70 B |
BIN
public/stylesheets/vendor/fancy_title_right.png
vendored
Normal file
|
After Width: | Height: | Size: 506 B |
BIN
public/stylesheets/vendor/fancybox-x.png
vendored
Normal file
|
After Width: | Height: | Size: 203 B |
BIN
public/stylesheets/vendor/fancybox-y.png
vendored
Normal file
|
After Width: | Height: | Size: 176 B |
BIN
public/stylesheets/vendor/fancybox.png
vendored
Normal file
|
After Width: | Height: | Size: 15 KiB |