diff --git a/app/assets/templates/wallpaper-form_tpl.jst.hbs b/app/assets/templates/wallpaper-form_tpl.jst.hbs
deleted file mode 100644
index 8af11ab1e..000000000
--- a/app/assets/templates/wallpaper-form_tpl.jst.hbs
+++ /dev/null
@@ -1,13 +0,0 @@
-
diff --git a/app/controllers/people_controller.rb b/app/controllers/people_controller.rb
index 7bf708867..473165f83 100644
--- a/app/controllers/people_controller.rb
+++ b/app/controllers/people_controller.rb
@@ -66,20 +66,6 @@ class PeopleController < ApplicationController
respond_with @people
end
- def hashes_for_people(people, aspects)
- ids = people.map{|p| p.id}
- contacts = {}
- Contact.unscoped.where(:user_id => current_user.id, :person_id => ids).each do |contact|
- contacts[contact.person_id] = contact
- end
-
- people.map{|p|
- {:person => p,
- :contact => contacts[p.id],
- :aspects => aspects}
- }
- end
-
def show
@person = Person.find_from_guid_or_username(params)
@@ -162,6 +148,8 @@ class PeopleController < ApplicationController
end
end
+ private
+
def redirect_if_tag_search
if search_query.starts_with?('#')
if search_query.length > 1
@@ -173,7 +161,19 @@ class PeopleController < ApplicationController
end
end
- private
+ def hashes_for_people(people, aspects)
+ ids = people.map{|p| p.id}
+ contacts = {}
+ Contact.unscoped.where(:user_id => current_user.id, :person_id => ids).each do |contact|
+ contacts[contact.person_id] = contact
+ end
+
+ people.map{|p|
+ {:person => p,
+ :contact => contacts[p.id],
+ :aspects => aspects}
+ }
+ end
def search_query
@search_query ||= params[:q] || params[:term] || ''
diff --git a/app/helpers/layout_helper.rb b/app/helpers/layout_helper.rb
index 8e6983ce1..781fa5679 100644
--- a/app/helpers/layout_helper.rb
+++ b/app/helpers/layout_helper.rb
@@ -65,7 +65,7 @@ module LayoutHelper
end
def include_base_css_framework(use_bootstrap=false)
- if use_bootstrap || @aspect == :getting_started || @page == :experimental
+ if use_bootstrap || @aspect == :getting_started
stylesheet_link_tag 'bootstrap-complete'
else
stylesheet_link_tag 'blueprint', :media => 'screen'
diff --git a/app/helpers/people_helper.rb b/app/helpers/people_helper.rb
index c698a1ea6..f40bc0821 100644
--- a/app/helpers/people_helper.rb
+++ b/app/helpers/people_helper.rb
@@ -16,15 +16,6 @@ module PeopleHelper
end
end
- def request_partial single_aspect_form
- if single_aspect_form
- 'requests/new_request_with_aspect_to_person'
-
- else
- 'requests/new_request_to_person'
- end
- end
-
def search_or_index
if search_query
I18n.t 'people.helper.results_for',:params => search_query
diff --git a/app/models/user.rb b/app/models/user.rb
index c505e0bfa..cdef755d7 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -227,14 +227,6 @@ class User < ActiveRecord::Base
where(conditions).first
end
- # @param [Person] person
- # @return [Boolean] whether this user can add person as a contact.
- def can_add?(person)
- return false if self.person == person
- return false if self.contact_for(person).present?
- true
- end
-
def confirm_email(token)
return false if token.blank? || token != confirm_email_token
self.email = unconfirmed_email
diff --git a/app/views/aspects/_aspect_contacts.haml b/app/views/aspects/_aspect_contacts.haml
deleted file mode 100644
index 17e3f890d..000000000
--- a/app/views/aspects/_aspect_contacts.haml
+++ /dev/null
@@ -1,30 +0,0 @@
--# Copyright (c) 2010-2011, Diaspora Inc. This file is
--# licensed under the Affero General Public License version 3 or later. See
--# the COPYRIGHT file.
-
-- content_for :head do
- =javascript_include_tag 'aspect-contacts'
- :javascript
- EditPane.setTranslations({
- doneEditing: "#{t('.done_editing')}",
- editAspect:"#{t('aspects.show.edit_aspect')}"
- });
-
- - if aspect.contacts.count == 0
- :javascript
- $(document).ready(function(){
- EditPane.fadeIn();
- });
-
-#left_pane
- .section.contact_pictures
- - for contact in contacts
- = person_image_link(contact[:person])
-
- %br
- %br
- %br
- .section
- %h3= t('shared.invitations.invites')
- = render "shared/invitations"
-
diff --git a/app/views/aspects/_aspect_list_item.haml b/app/views/aspects/_aspect_list_item.haml
deleted file mode 100644
index 00d90df89..000000000
--- a/app/views/aspects/_aspect_list_item.haml
+++ /dev/null
@@ -1,9 +0,0 @@
--# Copyright (c) 2010-2011, Diaspora Inc. This file is
--# licensed under the Affero General Public License version 3 or later. See
--# the COPYRIGHT file.
-
-%li{:data=>{:guid=>aspect.id}}
- %span.name
- = link_to aspect.name, aspect
- .right
- = aspect_membership_button(aspect, contact, person)
diff --git a/app/views/aspects/index.mobile.haml b/app/views/aspects/index.mobile.haml
deleted file mode 100644
index 4c5ab0cb9..000000000
--- a/app/views/aspects/index.mobile.haml
+++ /dev/null
@@ -1,18 +0,0 @@
--# Copyright (c) 2010-2011, Diaspora Inc. This file is
--# licensed under the Affero General Public License version 3 or later. See
--# the COPYRIGHT file.
-
-%h2{:style => "padding:0 10px;display:none;"}
- - if @stream.for_all_aspects?
- = t('all_aspects')
- - else
- = @stream.aspect
-
-#main_stream.stream
- = render 'shared/stream', :posts => @stream.stream_posts
- -if @stream.stream_posts.length > 0
- #pagination
- %a.more-link.paginate{:href => next_page_path}
- %h1
- = t("more")
-
diff --git a/app/views/aspects/update.js.erb b/app/views/aspects/update.js.erb
deleted file mode 100644
index 52aee29be..000000000
--- a/app/views/aspects/update.js.erb
+++ /dev/null
@@ -1,5 +0,0 @@
-$(document).ready(function() {
- var newName = "<%= @aspect.name %>"
- $("#aspect_name").val( newName );
- $("*[data-guid='<%= @aspect.id %>']").find('.name').html( newName );
-});
diff --git a/app/views/invitations/edit.html.haml b/app/views/invitations/edit.html.haml
deleted file mode 100644
index e208b613f..000000000
--- a/app/views/invitations/edit.html.haml
+++ /dev/null
@@ -1,47 +0,0 @@
-= javascript_include_tag "validation"
-= javascript_tag "Diaspora.Page = 'InvitationsEdit';"
-
-.span-7.append-1.prepend-3
- %br
- %br
- %br
- %br
- %h1
- = t('welcome')
- %h3.accept_invitation_text
- = t('.accept_your_invitation')
- - flash.each do |name, msg|
- %p{:class => "login_#{name}"}= msg
-
- = image_tag 'diaspora_collage.png', :style => "margin-left:-50px;"
-
-.span-10
- %br
- %br
- %br
- %br
- = form_for(resource, :as => resource_name, :url => invitation_path(resource_name), :html => {:method => :put, :class => 'accept_invitation_form'}, :validate => true) do |f|
- %fieldset
- .clearfix
- %b
- = t('username')
- = f.text_field :username, :title => t('registrations.new.enter_username')
- %span.host_uri
- = diaspora_id_host
- .clearfix
- %b
- = t('email')
- = f.email_field :email, :title => t('registrations.new.enter_email')
- .clearfix
- %b
- = t('password')
- = f.password_field :password, :title => t('registrations.new.enter_password')
- .clearfix
- %b
- = t('password_confirmation')
- = f.password_field :password_confirmation, :title => t('registrations.new.enter_password_again')
- = f.hidden_field :invitation_token
-
- .submit_field
- = f.submit t('registrations.new.create_my_account'), :class => 'in_aspects'
-
diff --git a/app/views/invitations/edit.mobile.haml b/app/views/invitations/edit.mobile.haml
deleted file mode 100644
index decfe4197..000000000
--- a/app/views/invitations/edit.mobile.haml
+++ /dev/null
@@ -1,26 +0,0 @@
--# Copyright (c) 2010-2011, Diaspora Inc. This file is
--# licensed under the Affero General Public License version 3 or later. See
--# the COPYRIGHT file.
-
-
-#login_form
- %h3
- = t('.your_account_awaits')
- = form_for(resource, :as => resource_name, :url => invitation_path(resource_name), :html => {:method => :put }) do |f|
- %p
- = f.label :username , t('username')
- = f.text_field :username, :title => t('registrations.new.enter_username')
- %p
- = f.label :email , t('email')
- = f.text_field :email, :title => t('registrations.new.enter_email')
- %p
- = f.label :password , t('password')
- = f.password_field :password, :title => t('registrations.new.enter_password')
- %p
- = f.label :password_confirmation , t('password_confirmation')
- = f.password_field :password_confirmation, :title => t('registrations.new.enter_password_again')
- = f.hidden_field :invitation_token
-
- = f.submit t('registrations.new.create_my_account')
- %br
- = render :partial => "devise/shared/links"
diff --git a/app/views/invitations/token_not_found.html.haml b/app/views/invitations/token_not_found.html.haml
deleted file mode 100644
index 81712492c..000000000
--- a/app/views/invitations/token_not_found.html.haml
+++ /dev/null
@@ -1,3 +0,0 @@
-.span-15.last
- %h2
- = t('devise.invitations.invitation_token_invalid')
diff --git a/app/views/likes/_likes_container.haml b/app/views/likes/_likes_container.haml
deleted file mode 100644
index 1c175bf55..000000000
--- a/app/views/likes/_likes_container.haml
+++ /dev/null
@@ -1,12 +0,0 @@
--# Copyright (c) 2010-2011, Diaspora Inc. This file is
--# licensed under the Affero General Public License version 3 or later. See
--# the COPYRIGHT file.
-
-- if likes_count > 0
- = image_tag('icons/heart.png')
- - if target_type == "Comment"
- = link_to t('likes.likes.people_like_this_comment', :count => likes_count), comment_likes_path(target_id), :class => "expand_likes"
- - else
- = link_to t('likes.likes.people_like_this', :count => likes_count), post_likes_path(target_id), :class => "expand_likes"
- %span.hidden.likes_list
-
diff --git a/app/views/notifications/_popup.haml b/app/views/notifications/_popup.haml
deleted file mode 100644
index e92758203..000000000
--- a/app/views/notifications/_popup.haml
+++ /dev/null
@@ -1,6 +0,0 @@
--# Copyright (c) 2010-2011, Diaspora Inc. This file is
--# licensed under the Affero General Public License version 3 or later. See
--# the COPYRIGHT file.
-.notification
- = person_image_tag(person)
- = notification_message_for(note)
diff --git a/app/views/people/_add_contact_small.haml b/app/views/people/_add_contact_small.haml
deleted file mode 100644
index 16f548a0e..000000000
--- a/app/views/people/_add_contact_small.haml
+++ /dev/null
@@ -1,9 +0,0 @@
-- if current_user.can_add?(person)
- .add_contact
- = link_to image_tag("icons/monotone_plus_add_round.png"),
- {:controller => "contacts",
- :action => "new",
- :person_id => person.id},
- :alt => t('.add_contact_from_tag'),
- :class => 'button',
- :rel => 'facebox'
diff --git a/app/views/people/_aspect_list.haml b/app/views/people/_aspect_list.haml
deleted file mode 100644
index 90bb6b5ac..000000000
--- a/app/views/people/_aspect_list.haml
+++ /dev/null
@@ -1,20 +0,0 @@
--# Copyright (c) 2010-2011, Diaspora Inc. This file is
--# licensed under the Affero General Public License version 3 or later. See
--# the COPYRIGHT file.
-
-- content_for :head do
- =javascript_include_tag 'contact-list'
-.aspects
-
- / TODO(*) add following method in contact
- - if contact && contact.persisted?
- .badges{:class => ("hidden" if !contact.persisted?)}
- = aspect_badges(aspects_with_person, :link => true)
- %p
- = link_to t('.edit_membership'),
- {:controller => "contacts",
- :action => "edit",
- :id => contact.id,
- :person_id => person.id},
- :class => 'button',
- :rel => 'facebox'
diff --git a/app/views/people/_profile_photo_upload.html.haml b/app/views/people/_profile_photo_upload.html.haml
deleted file mode 100644
index 4586ff2c2..000000000
--- a/app/views/people/_profile_photo_upload.html.haml
+++ /dev/null
@@ -1,14 +0,0 @@
--# Copyright (c) 2010-2011, Diaspora Inc. This file is
--# licensed under the Affero General Public License version 3 or later. See
--# the COPYRIGHT file.
-
-
-#profile_photo_upload
- = owner_image_tag(:thumb_medium)
- = file_field_tag 'profile[image]'
-
- -if !@aspect.nil? && @aspect != :getting_started
- %p
- \...#{t('photos.new_profile_photo.or_select_one')}
- = link_to t('_photos'), person_photos_path(@person)
-
diff --git a/app/views/people/experimental.erb b/app/views/people/experimental.erb
deleted file mode 100644
index e69de29bb..000000000
diff --git a/app/views/requests/_new_request_to_person.haml b/app/views/requests/_new_request_to_person.haml
deleted file mode 100644
index 31a75df78..000000000
--- a/app/views/requests/_new_request_to_person.haml
+++ /dev/null
@@ -1,11 +0,0 @@
--# Copyright (c) 2010-2011, Diaspora Inc. This file is
--# licensed under the Affero General Public License version 3 or later. See
--# the COPYRIGHT file.
-
-%div{:id => destination_handle}
- = form_for(Request.new, :remote => true ) do |request|
- = request.select(:into, options_from_collection_for_select(aspects, "id", "name"))
- = request.hidden_field :to, :value => destination_handle
- = request.submit t('people.person.add_contact'), 'data-disable-with' => t('requests.create.sending')
- .message.hidden
- %i= t('.sent')
diff --git a/app/views/requests/_new_request_with_aspect_to_person.haml b/app/views/requests/_new_request_with_aspect_to_person.haml
deleted file mode 100644
index 2edeb9f76..000000000
--- a/app/views/requests/_new_request_with_aspect_to_person.haml
+++ /dev/null
@@ -1,11 +0,0 @@
--# Copyright (c) 2010-2011, Diaspora Inc. This file is
--# licensed under the Affero General Public License version 3 or later. See
--# the COPYRIGHT file.
-
-%div{:id => destination_handle}
- = form_for Request.new, :remote => true do |request|
- = request.hidden_field :into, :value => "changeme"
- = request.hidden_field :to, :value => destination_handle
- = request.submit '+', :class => 'add', 'data-disable-with' => t('requests.create.sending')
- .message.hidden
- %i= t('requests.new_request_to_person.sent')
diff --git a/app/views/shared/_author_info.html.haml b/app/views/shared/_author_info.html.haml
deleted file mode 100644
index 168107638..000000000
--- a/app/views/shared/_author_info.html.haml
+++ /dev/null
@@ -1,9 +0,0 @@
-#author_info.show
- = person_image_link(person)
- .from
- %h5
- = person.name
-
- #person_nav_links
- = link_to t('layouts.header.profile'), local_or_remote_person_path(person)
- = link_to t('_photos'), person_photos_path(person)
diff --git a/app/views/shared/_author_info.mobile.haml b/app/views/shared/_author_info.mobile.haml
deleted file mode 100644
index e36dc40cc..000000000
--- a/app/views/shared/_author_info.mobile.haml
+++ /dev/null
@@ -1,6 +0,0 @@
-#author_info.show
- .thumb_small= person_image_tag(person, :thumb_small)
- = link_to person.name, person
- %br
- .diaspora_handle
- = person.diaspora_handle
diff --git a/app/views/shared/_mail_signup_form.erb b/app/views/shared/_mail_signup_form.erb
deleted file mode 100644
index e6ae05cb4..000000000
--- a/app/views/shared/_mail_signup_form.erb
+++ /dev/null
@@ -1,126 +0,0 @@
-
-
-<%= javascript_include_tag :mailchimp %>
-
-
-
-
-
-
-
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb
index 905ec7295..f167d441d 100644
--- a/spec/models/user_spec.rb
+++ b/spec/models/user_spec.rb
@@ -407,28 +407,6 @@ describe User do
end
end
- describe "#can_add?" do
- it "returns true if there is no existing connection" do
- alice.can_add?(eve.person).should be_true
- end
-
- it "returns false if the user and the person are the same" do
- alice.can_add?(alice.person).should be_false
- end
-
- it "returns false if the users are already connected" do
- alice.can_add?(bob.person).should be_false
- end
-
- it "returns false if the user has already sent a request to that person" do
- alice.share_with(eve.person, alice.aspects.first)
- alice.reload
- eve.reload
- alice.can_add?(eve.person).should be_false
- end
- end
-
-
describe '#process_invite_acceptence' do
it 'sets the inviter on user' do
inv = InvitationCode.create(:user => bob)