diff --git a/Gemfile b/Gemfile index 06598a446..441e441a3 100644 --- a/Gemfile +++ b/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' diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 4a33a2b42..a2a4ee3b5 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -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 diff --git a/app/controllers/dashboards_controller.rb b/app/controllers/dashboards_controller.rb index e09e182f8..414f5956a 100644 --- a/app/controllers/dashboards_controller.rb +++ b/app/controllers/dashboards_controller.rb @@ -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 diff --git a/app/helpers/status_messages_helper.rb b/app/helpers/status_messages_helper.rb index 522b990a4..57d0f2f17 100644 --- a/app/helpers/status_messages_helper.rb +++ b/app/helpers/status_messages_helper.rb @@ -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 diff --git a/app/models/post.rb b/app/models/post.rb index 1be97bd05..f270666fa 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -1,4 +1,5 @@ class Post + require 'lib/encryptable' include MongoMapper::Document include ApplicationHelper include ROXML diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index a567062a5..36ebdbc8c 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -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 diff --git a/app/views/shared/_publisher.haml b/app/views/shared/_publisher.haml index 2ac0bcc65..bd43ee7cb 100644 --- a/app/views/shared/_publisher.haml +++ b/app/views/shared/_publisher.haml @@ -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" diff --git a/lib/diaspora/webhooks.rb b/lib/diaspora/webhooks.rb index fc20841a4..c303fa5a7 100644 --- a/lib/diaspora/webhooks.rb +++ b/lib/diaspora/webhooks.rb @@ -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 diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index c0467eeea..c50e1e9ff 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -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; diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index 408841d47..3490e3b39 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -209,6 +209,9 @@ form :font :weight normal :color #999 + span + :size small + :font-style italic ul :display inline