MS added rails 3rc
This commit is contained in:
parent
6a8291b56f
commit
7a0db375ab
10 changed files with 25 additions and 13 deletions
4
Gemfile
4
Gemfile
|
|
@ -1,8 +1,8 @@
|
|||
source 'http://rubygems.org'
|
||||
source 'http://gemcutter.org'
|
||||
|
||||
gem 'rails', '3.0.0.beta4'
|
||||
gem 'bundler', '0.9.26'
|
||||
gem 'rails', '3.0.0.rc'
|
||||
gem 'bundler', '1.0.0.rc.1'
|
||||
|
||||
#Security
|
||||
gem 'gpgme'
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ class ApplicationController < ActionController::Base
|
|||
protect_from_forgery :except => :receive
|
||||
layout 'application'
|
||||
|
||||
before_filter :set_friends_and_authors, :count_requests
|
||||
before_filter :set_friends_authors_and_status, :count_requests
|
||||
|
||||
layout :layout_by_resource
|
||||
|
||||
|
|
@ -16,9 +16,11 @@ class ApplicationController < ActionController::Base
|
|||
end
|
||||
end
|
||||
|
||||
def set_friends_and_authors
|
||||
def set_friends_authors_and_status
|
||||
@friends = Person.friends.all if current_user
|
||||
@subscribed_persons = Author.all if current_user
|
||||
@latest_status_message = StatusMessage.newest(current_user) if current_user
|
||||
|
||||
end
|
||||
|
||||
def count_requests
|
||||
|
|
|
|||
|
|
@ -4,12 +4,10 @@ class DashboardsController < ApplicationController
|
|||
|
||||
def index
|
||||
@posts = Post.paginate :page => params[:page], :order => 'created_at DESC'
|
||||
@latest_status_message = StatusMessage.newest(current_user)
|
||||
end
|
||||
|
||||
def ostatus
|
||||
@posts = OstatusPost.paginate :page => params[:page], :order => 'created_at DESC'
|
||||
@latest_status_message = StatusMessage.newest(current_user)
|
||||
render :index
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
module StatusMessagesHelper
|
||||
|
||||
def my_latest_message
|
||||
message = @latest_status_message
|
||||
unless message.nil?
|
||||
return message.message#+ " - " + how_long_ago(message)
|
||||
unless @latest_status_message.nil?
|
||||
return @latest_status_message.message
|
||||
else
|
||||
return "No message to display."
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
class Post
|
||||
require 'lib/encryptable'
|
||||
include MongoMapper::Document
|
||||
include ApplicationHelper
|
||||
include ROXML
|
||||
|
|
|
|||
|
|
@ -50,6 +50,8 @@
|
|||
= link_to current_user.real_name, root_path
|
||||
%span#latest_message
|
||||
= my_latest_message
|
||||
%span{:style => "font-size: small"}
|
||||
= " - #{how_long_ago @latest_status_message}"
|
||||
|
||||
%ul.nav
|
||||
%li= link_to "home", root_path
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
%p
|
||||
%label{:for => "status_message_message"} Message
|
||||
= f.text_area :message, :rows => 2
|
||||
%p
|
||||
%p.right
|
||||
= f.submit "Post"
|
||||
|
||||
= form_for Bookmark.new, :remote => true do |f|
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
%p
|
||||
%label{:for => "bookmark_link"} Link
|
||||
= f.text_field :link
|
||||
%p
|
||||
%p.right
|
||||
= f.submit "Post"
|
||||
|
||||
= form_for Blog.new, :remote => true do |f|
|
||||
|
|
@ -32,5 +32,5 @@
|
|||
%p
|
||||
%label{:for => "blog_body"} Body
|
||||
= f.text_area :body
|
||||
%p
|
||||
%p.right
|
||||
= f.submit "Post"
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
|
||||
module Diaspora
|
||||
module Webhooks
|
||||
def self.included(klass)
|
||||
klass.class_eval do
|
||||
#require 'message_handler'
|
||||
require 'message_handler'
|
||||
|
||||
@@queue = MessageHandler.new
|
||||
|
||||
def notify_people
|
||||
|
|
|
|||
|
|
@ -174,6 +174,9 @@ form {
|
|||
#user_name #latest_message {
|
||||
font-weight: normal;
|
||||
color: #999999; }
|
||||
#user_name #latest_message span {
|
||||
size: small;
|
||||
font-style: italic; }
|
||||
#user_name ul {
|
||||
display: inline;
|
||||
margin: 0;
|
||||
|
|
|
|||
|
|
@ -209,6 +209,9 @@ form
|
|||
:font
|
||||
:weight normal
|
||||
:color #999
|
||||
span
|
||||
:size small
|
||||
:font-style italic
|
||||
|
||||
ul
|
||||
:display inline
|
||||
|
|
|
|||
Loading…
Reference in a new issue