DG IZ; a user can repost. aspects are not sent through the websocket. post does not show where it curently is going in its partial
This commit is contained in:
parent
8941975224
commit
5ef32b7d55
3 changed files with 18 additions and 1 deletions
|
|
@ -37,4 +37,13 @@ class ApplicationController < ActionController::Base
|
||||||
@request_count = Request.for_user(current_user).size if current_user
|
@request_count = Request.for_user(current_user).size if current_user
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def repost
|
||||||
|
@post = current_user.find_visible_post_by_id params[:id]
|
||||||
|
if current_user.repost( @post, :to => params[:aspect_ids] )
|
||||||
|
flash[:notice] = "Item re-shared."
|
||||||
|
else
|
||||||
|
flash[:error] = "Failed to re-share."
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -22,3 +22,9 @@
|
||||||
- if current_user.owns?(post)
|
- if current_user.owns?(post)
|
||||||
.destroy_link
|
.destroy_link
|
||||||
= link_to 'Delete', status_message_path(post), :confirm => 'Are you sure?', :method => :delete, :remote => true, :class => "delete"
|
= link_to 'Delete', status_message_path(post), :confirm => 'Are you sure?', :method => :delete, :remote => true, :class => "delete"
|
||||||
|
|
||||||
|
%b reshare:
|
||||||
|
-if @aspects
|
||||||
|
- for aspect in @aspects
|
||||||
|
= link_to aspect, repost_path( :id => post.id, :aspect_ids => aspect.id )
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,12 +7,14 @@
|
||||||
Diaspora::Application.routes.draw do
|
Diaspora::Application.routes.draw do
|
||||||
resources :people, :only => [:index, :show, :destroy]
|
resources :people, :only => [:index, :show, :destroy]
|
||||||
resources :users, :except => [:create, :new, :show]
|
resources :users, :except => [:create, :new, :show]
|
||||||
resources :status_messages, :only => [:create, :destroy, :show]
|
resources :status_messages
|
||||||
resources :comments, :except => [:index]
|
resources :comments, :except => [:index]
|
||||||
resources :requests, :except => [:edit, :update]
|
resources :requests, :except => [:edit, :update]
|
||||||
resources :photos, :except => [:index]
|
resources :photos, :except => [:index]
|
||||||
resources :albums
|
resources :albums
|
||||||
|
|
||||||
|
match 'repost', :to => 'application#repost', :as => 'repost'
|
||||||
|
|
||||||
match 'aspects/move_friends', :to => 'aspects#move_friends', :as => 'move_friends'
|
match 'aspects/move_friends', :to => 'aspects#move_friends', :as => 'move_friends'
|
||||||
match 'aspects/move_friend', :to => 'aspects#move_friend', :as => 'move_friend'
|
match 'aspects/move_friend', :to => 'aspects#move_friend', :as => 'move_friend'
|
||||||
match 'aspects/manage', :to => 'aspects#manage'
|
match 'aspects/manage', :to => 'aspects#manage'
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue