Merge branch 'master' of github.com:diaspora/diaspora
This commit is contained in:
commit
78979bca6a
12 changed files with 48 additions and 15 deletions
|
|
@ -24,13 +24,13 @@ class ApplicationController < ActionController::Base
|
|||
def mobile_except_ipad
|
||||
if is_mobile_device?
|
||||
if request.env["HTTP_USER_AGENT"].include? "iPad"
|
||||
session[:mobile_view] = false
|
||||
session[:mobile_view] = false
|
||||
else
|
||||
session[:mobile_view] = true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
def count_requests
|
||||
@request_count = current_user.requests_for_me.count if current_user
|
||||
end
|
||||
|
|
|
|||
|
|
@ -9,6 +9,16 @@ module ApplicationHelper
|
|||
false
|
||||
end
|
||||
|
||||
def page_title text=nil
|
||||
title = ""
|
||||
if text.blank?
|
||||
title = "#{current_user.name} | " if current_user
|
||||
else
|
||||
title = "#{text} | "
|
||||
end
|
||||
title += "DIASPORA*"
|
||||
end
|
||||
|
||||
def aspects_with_post aspects, post
|
||||
aspects.select do |a|
|
||||
post.aspect_ids.include?(a.id)
|
||||
|
|
@ -73,7 +83,7 @@ module ApplicationHelper
|
|||
end
|
||||
|
||||
def how_long_ago(obj)
|
||||
"#{time_ago_in_words(obj.created_at)} #{t('ago')}"
|
||||
"#{time_ago_in_words(obj.created_at, true)} #{t('ago')}"
|
||||
end
|
||||
|
||||
def person_url(person)
|
||||
|
|
|
|||
|
|
@ -5,6 +5,9 @@
|
|||
- content_for :head do
|
||||
= include_javascripts :aspects
|
||||
|
||||
- content_for :page_title do
|
||||
= "Manage aspects"
|
||||
|
||||
#section_header
|
||||
%h2=t('.manage_aspects')
|
||||
.right{:style=>"top:0;"}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,9 @@
|
|||
-# licensed under the Affero General Public License version 3 or later. See
|
||||
-# the COPYRIGHT file.
|
||||
|
||||
- content_for :page_title do
|
||||
= @aspect.name
|
||||
|
||||
.span-24.last
|
||||
%h2{:style=>"position:relative;margin-bottom:0;"}
|
||||
= @aspect
|
||||
|
|
|
|||
|
|
@ -8,10 +8,7 @@
|
|||
%meta{:charset => 'utf-8'}
|
||||
|
||||
%title
|
||||
- if current_user
|
||||
= "#{current_user.name} | DIASPORA*"
|
||||
- else
|
||||
DIASPORA*
|
||||
= page_title yield(:page_title)
|
||||
|
||||
%meta{'http-equiv' => 'X-UA-Compatible', :content => 'IE=edge,chrome=1'}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
-# licensed under the Affero General Public License version 3 or later. See
|
||||
-# the COPYRIGHT file.
|
||||
|
||||
- content_for :page_title do
|
||||
= "Edit profile"
|
||||
|
||||
= form_tag person_path(@person), :method => :put, :multipart => true, :id => 'update_profile_form' do
|
||||
%h3
|
||||
|
|
|
|||
|
|
@ -2,6 +2,9 @@
|
|||
-# licensed under the Affero General Public License version 3 or later. See
|
||||
-# the COPYRIGHT file.
|
||||
|
||||
- content_for :page_title do
|
||||
= "Search"
|
||||
|
||||
.span-15.prepend-5.last
|
||||
%h2
|
||||
-if params[:q].blank?
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
-# licensed under the Affero General Public License version 3 or later. See
|
||||
-# the COPYRIGHT file.
|
||||
|
||||
- content_for :page_title do
|
||||
= @person.name
|
||||
|
||||
.span-24.last
|
||||
#author_info
|
||||
|
|
|
|||
|
|
@ -2,6 +2,9 @@
|
|||
-# licensed under the Affero General Public License version 3 or later. See
|
||||
-# the COPYRIGHT file.
|
||||
|
||||
- content_for :page_title do
|
||||
= "Edit services"
|
||||
|
||||
#section_header
|
||||
%h2
|
||||
= t('settings')
|
||||
|
|
|
|||
|
|
@ -2,6 +2,9 @@
|
|||
-# licensed under the Affero General Public License version 3 or later. See
|
||||
-# the COPYRIGHT file.
|
||||
|
||||
- content_for :page_title do
|
||||
= "Edit account"
|
||||
|
||||
:javascript
|
||||
$(document).ready(function(){
|
||||
$("#settings_nav li > a").live("click", function() {
|
||||
|
|
|
|||
|
|
@ -931,16 +931,21 @@ label
|
|||
#aspect_nav
|
||||
:margin
|
||||
:top 8px
|
||||
:bottom 4px
|
||||
:bottom 0
|
||||
:bottom 0
|
||||
:color #000
|
||||
|
||||
ul
|
||||
:position relative
|
||||
:padding 0
|
||||
:bottom 2px
|
||||
:bottom 3px
|
||||
:margin
|
||||
:bottom 0
|
||||
|
||||
> li
|
||||
:display inline
|
||||
:margin 0
|
||||
:padding 4px 0
|
||||
a
|
||||
:-webkit-border-radius 3px 3px 0 0
|
||||
:-moz-border-radius 3px 3px 0 0
|
||||
|
|
@ -965,6 +970,8 @@ label
|
|||
:text-shadow 0 1px 0 #eee
|
||||
:font
|
||||
:weight bold
|
||||
:padding
|
||||
:bottom 6px
|
||||
:background
|
||||
:color rgb(252,252,252)
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ describe Request do
|
|||
|
||||
describe 'validations' do
|
||||
before do
|
||||
@request = Request.instantiate(:from => user.person, :to => user2.person, :into => aspect)
|
||||
@request = Request.instantiate(:from => user.person, :to => user2.person, :into => aspect)
|
||||
end
|
||||
it 'is valid' do
|
||||
@request.should be_valid
|
||||
|
|
@ -43,14 +43,14 @@ describe Request do
|
|||
end
|
||||
|
||||
it 'is not to yourself' do
|
||||
@request = Request.instantiate(:from => user.person, :to => user.person, :into => aspect)
|
||||
@request = Request.instantiate(:from => user.person, :to => user.person, :into => aspect)
|
||||
@request.should_not be_valid
|
||||
end
|
||||
end
|
||||
|
||||
describe 'scopes' do
|
||||
before do
|
||||
@request = Request.instantiate(:from => user.person, :to => user2.person, :into => aspect)
|
||||
@request = Request.instantiate(:from => user.person, :to => user2.person, :into => aspect)
|
||||
@request.save
|
||||
end
|
||||
describe '.from' do
|
||||
|
|
@ -84,7 +84,7 @@ describe Request do
|
|||
user.request_from_me?(request).should be_true
|
||||
end
|
||||
|
||||
it 'recognized when a request is not from me' do
|
||||
it 'recognized when a request is not from me' do
|
||||
user2.request_from_me?(request).should be_false
|
||||
end
|
||||
end
|
||||
|
|
@ -119,7 +119,7 @@ describe Request do
|
|||
@hash = @hashes.first
|
||||
end
|
||||
it 'gives back requests' do
|
||||
@hash[:request].should == Request.from(@user2).to(@user).first
|
||||
@hash[:request].should == Request.from(@user2).to(@user).first(:sent => false)
|
||||
end
|
||||
it 'gives back people' do
|
||||
@hash[:sender].should == @user2.person
|
||||
|
|
@ -130,7 +130,7 @@ describe Request do
|
|||
end
|
||||
describe 'xml' do
|
||||
before do
|
||||
@request = Request.new(:from => user.person, :to => user2.person, :into => aspect)
|
||||
@request = Request.new(:from => user.person, :to => user2.person, :into => aspect)
|
||||
@xml = @request.to_xml.to_s
|
||||
end
|
||||
describe 'serialization' do
|
||||
|
|
|
|||
Loading…
Reference in a new issue