copy in manage page by clicking 'add a new friend' for now
This commit is contained in:
parent
6626b00961
commit
a0d83e28a1
4 changed files with 11 additions and 5 deletions
|
|
@ -47,7 +47,6 @@ class AspectsController < ApplicationController
|
||||||
|
|
||||||
def show
|
def show
|
||||||
@aspect = current_user.aspect_by_id params[:id]
|
@aspect = current_user.aspect_by_id params[:id]
|
||||||
@friends_not_in_aspect = current_user.friends_not_in_aspect(@aspect)
|
|
||||||
unless @aspect
|
unless @aspect
|
||||||
render :file => "#{Rails.root}/public/404.html", :layout => false, :status => 404
|
render :file => "#{Rails.root}/public/404.html", :layout => false, :status => 404
|
||||||
else
|
else
|
||||||
|
|
@ -90,7 +89,11 @@ class AspectsController < ApplicationController
|
||||||
flash[:error] = I18n.t 'aspects.add_to_aspect.failure'
|
flash[:error] = I18n.t 'aspects.add_to_aspect.failure'
|
||||||
end
|
end
|
||||||
|
|
||||||
redirect_to aspect_path(params[:aspect_id])
|
if params[:manage]
|
||||||
|
redirect_to aspects_manage_path
|
||||||
|
else
|
||||||
|
redirect_to aspect_path(params[:aspect_id])
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def remove_from_aspect
|
def remove_from_aspect
|
||||||
|
|
|
||||||
|
|
@ -67,6 +67,6 @@
|
||||||
|
|
||||||
.fancybox_content
|
.fancybox_content
|
||||||
%div{:id => "add_request_pane_#{aspect.id}"}
|
%div{:id => "add_request_pane_#{aspect.id}"}
|
||||||
= render "requests/new_request", :aspect => aspect
|
= render "requests/new_request", :aspect => aspect, :manage => true
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,7 @@
|
||||||
=t('.add_a_new_friend_to')
|
=t('.add_a_new_friend_to')
|
||||||
%i= aspect.name
|
%i= aspect.name
|
||||||
|
|
||||||
- if @friends_not_in_aspect
|
= render 'shared/add_friend_dropdown', :aspect => aspect, :friends => current_user.friends_not_in_aspect(aspect), :manage => defined?(manage)
|
||||||
= render('shared/add_friend_dropdown', :aspect => aspect, :friends => @friends_not_in_aspect)
|
|
||||||
|
|
||||||
= form_for Request.new do |fr_request|
|
= form_for Request.new do |fr_request|
|
||||||
= fr_request.error_messages
|
= fr_request.error_messages
|
||||||
|
|
@ -25,6 +24,8 @@
|
||||||
|
|
||||||
- if defined?(getting_started)
|
- if defined?(getting_started)
|
||||||
= hidden_field_tag :getting_started, getting_started
|
= hidden_field_tag :getting_started, getting_started
|
||||||
|
- if defined?(manage)
|
||||||
|
= hidden_field_tag :manage, true
|
||||||
|
|
||||||
= fr_request.submit
|
= fr_request.submit
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,4 +2,6 @@
|
||||||
= form_tag '/aspects/add_to_aspect', :id => 'add_to_aspect' do
|
= form_tag '/aspects/add_to_aspect', :id => 'add_to_aspect' do
|
||||||
= select_tag :friend_id, options_from_collection_for_select(friends, "id", "real_name"), :include_blank => true
|
= select_tag :friend_id, options_from_collection_for_select(friends, "id", "real_name"), :include_blank => true
|
||||||
= hidden_field_tag :aspect_id, aspect.id
|
= hidden_field_tag :aspect_id, aspect.id
|
||||||
|
- if defined?(manage)
|
||||||
|
= hidden_field_tag :manage, true
|
||||||
= submit_tag "add to #{aspect.name}"
|
= submit_tag "add to #{aspect.name}"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue