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"]
|
||||
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
|
||||
flash[:error] = I18n.t 'aspects.remove_from_aspect.failure'
|
||||
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
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@
|
|||
%span.tip click to edit
|
||||
|
||||
%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)
|
||||
|
||||
%ul.dropzone{:data=>{:aspect_id=>aspect.id}}
|
||||
|
|
@ -59,7 +59,7 @@
|
|||
|
||||
|
||||
.fancybox_content
|
||||
%div{:id => "add_request_pane_#{aspect.id}"}
|
||||
= render "requests/new_request", :aspect => aspect, :manage => true
|
||||
%div{:id => "manage_aspect_contacts_pane_#{aspect.id}"}
|
||||
= render "requests/manage_aspect_contacts", :aspect => aspect, :manage => true
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -5,12 +5,12 @@
|
|||
.span-15.last
|
||||
.modal_title_bar
|
||||
%h4
|
||||
=t('.add_a_new_friend_to')
|
||||
Manage contacts within
|
||||
%i= aspect.name
|
||||
|
||||
.span-6.append-1.last
|
||||
%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
|
||||
%h3 Add a new contact
|
||||
|
|
@ -3,8 +3,6 @@
|
|||
-# the COPYRIGHT file.
|
||||
|
||||
= form_tag(requests_path) do
|
||||
- pp person
|
||||
- pp aspects
|
||||
= 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')
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
-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
|
||||
#add_request_pane
|
||||
= render "requests/new_request", :aspect => @aspect
|
||||
#manage_aspect_contacts_pane
|
||||
= render "requests/manage_aspect_contacts", :aspect => @aspect
|
||||
-else
|
||||
.clear
|
||||
%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
|
||||
= 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
|
||||
#add_request_pane
|
||||
= render "requests/new_request", :aspect => aspect, :getting_started => 2
|
||||
#manage_aspect_contacts_pane
|
||||
= render "requests/manage_aspect_contacts", :aspect => aspect, :getting_started => 2
|
||||
|
||||
= 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}"
|
||||
friends_since: "friends since: %{how_long_ago}"
|
||||
requests:
|
||||
new_request:
|
||||
manage_aspect_contacts:
|
||||
add_a_new_friend_to: "Add a new friend to"
|
||||
enter_a_diaspora_username: "Enter a Diaspora username:"
|
||||
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//////
|
||||
$(".add_aspect_button," +
|
||||
".add_request_button," +
|
||||
".manage_aspect_contacts_button," +
|
||||
".invite_user_button," +
|
||||
".add_photo_button," +
|
||||
".remove_person_button," +
|
||||
|
|
|
|||
|
|
@ -1553,12 +1553,18 @@ h3 span.current_gs_step
|
|||
:max-height 300px
|
||||
:overflow auto
|
||||
|
||||
:border 2px solid #ccc
|
||||
:border 2px solid #eee
|
||||
|
||||
:border-radius 5px
|
||||
|
||||
:margin
|
||||
:bottom 1.5em
|
||||
|
||||
input.contact_list_search
|
||||
:width 100%
|
||||
:margin
|
||||
:top 0
|
||||
|
||||
ul
|
||||
:width 100%
|
||||
:margin 0
|
||||
|
|
@ -1578,8 +1584,24 @@ h3 span.current_gs_step
|
|||
|
||||
&:hover
|
||||
:background
|
||||
:color #eee
|
||||
:color rgb(250,250,250)
|
||||
|
||||
.right
|
||||
: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 |