Commit d62a7c4c authored by Raphael's avatar Raphael

Fix request views, refactor identical forms into partial.

parent 8232a92c
......@@ -7,6 +7,5 @@
require File.expand_path('../config/application', __FILE__)
require 'rake'
ENV['GNUPGHOME'] = File.expand_path("../../gpg/diaspora-#{Rails.env}/", __FILE__)
Diaspora::Application.load_tasks
......@@ -18,10 +18,7 @@
- elsif current_user.pending_requests.find_by_person_id(person.id)
= link_to =t('.pending_request'), aspects_manage_path
- else
= form_tag(requests_path) do
= select_tag(:aspect_id, @aspects_dropdown_array.join.html_safe)
= hidden_field_tag :destination_handle, :value => person.diaspora_handle
= submit_tag t('.add_friend')
= render :partial => 'requests/new_request_to_person', :locals => {:aspects => @aspects, :person => person}
.info
= person.diaspora_handle
......
......@@ -30,10 +30,7 @@
.description
= t('.request_people')
= form_tag(requests_path) do
= select_tag(:aspect_id, @aspects_dropdown_array.join.html_safe)
= hidden_field_tag :destination_handle, :value => @person.diaspora_handle
= submit_tag t('.add_friend')
= render :partial =>'requests/new_request_to_person', :locals => {:aspects => @aspects, :person => @person}
- else
%h3
......
-# Copyright (c) 2010, Diaspora Inc. This file is
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
= form_tag(requests_path) do
- pp person
- pp aspects
= select_tag(:aspect_id, options_from_collection_for_select(aspects, "id", "name"))
= hidden_field_tag :destination_handle, :value => person.diaspora_handle
= submit_tag t('people.person.add_friend')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment