Basic contacts index page on the mobile site

This commit is contained in:
Raphael Sofaer 2011-08-10 16:23:33 -07:00
parent 3658481c38
commit 091cdd6f94
4 changed files with 29 additions and 7 deletions

View file

@ -22,6 +22,7 @@ class ContactsController < ApplicationController
respond_to do |format| respond_to do |format|
format.html { @contacts = sort_and_paginate_profiles(@contacts) } format.html { @contacts = sort_and_paginate_profiles(@contacts) }
format.mobile { @contacts = sort_and_paginate_profiles(@contacts) }
format.json { format.json {
@people = Person.joins(:contacts => :aspect_memberships). @people = Person.joins(:contacts => :aspect_memberships).
where(:contacts => { :user_id => current_user.id }, where(:contacts => { :user_id => current_user.id },

View file

@ -0,0 +1,24 @@
-# Copyright (c) 2010, Diaspora Inc. This file is
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
- content_for :page_title do
= t('.title')
- content_for :head do
= include_javascripts :people
#section_header
%h2
= t('.title')
.span-18.last
#people_stream.stream.contacts
- if @contacts.size > 0
- for contact in @contacts
= render 'people/person', :person => contact.person, :contact => contact
= will_paginate @contacts
- else
%h3.no_contacts
= t('.no_contacts')

View file

@ -3,11 +3,6 @@
-# the COPYRIGHT file. -# the COPYRIGHT file.
.stream_element{:id => person.id} .stream_element{:id => person.id}
.right{:style=>"display:inline;"}
= render :partial => 'people/relationship_action',
:locals => { :person => person, :contact => contact, :request => request}
= person_image_link(person) = person_image_link(person)
.content .content
@ -15,5 +10,4 @@
=person_link(person) =person_link(person)
.info .info
= person.diaspora_handle = link_to person.diaspora_handle, person_path(person), :class => 'black'

View file

@ -126,6 +126,9 @@ a
p p
:margin 0 auto :margin 0 auto
:line-height 1.4em :line-height 1.4em
.black
:color #333
.reshare .reshare
.content .content