Basic contacts index page on the mobile site
This commit is contained in:
parent
3658481c38
commit
091cdd6f94
4 changed files with 29 additions and 7 deletions
|
|
@ -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 },
|
||||||
|
|
|
||||||
24
app/views/contacts/index.mobile.haml
Normal file
24
app/views/contacts/index.mobile.haml
Normal 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')
|
||||||
|
|
||||||
|
|
@ -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'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue