Skip to content
Extraits de code Groupes Projets
Valider 5ef32b7d rédigé par danielvincent's avatar danielvincent
Parcourir les fichiers

DG IZ; a user can repost. aspects are not sent through the websocket. post...

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
parent 89419752
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -37,4 +37,13 @@ class ApplicationController < ActionController::Base ...@@ -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 @@ ...@@ -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 @@ ...@@ -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'
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter