42 lines
1.6 KiB
Text
42 lines
1.6 KiB
Text
-# Copyright 2010 Diaspora Inc.
|
|
-#
|
|
-# This file is part of Diaspora.
|
|
-#
|
|
-# Diaspora is free software: you can redistribute it and/or modify
|
|
-# it under the terms of the GNU Affero General Public License as published by
|
|
-# the Free Software Foundation, either version 3 of the License, or
|
|
-# (at your option) any later version.
|
|
-#
|
|
-# Diaspora is distributed in the hope that it will be useful,
|
|
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
-# GNU Affero General Public License for more details.
|
|
-#
|
|
-# You should have received a copy of the GNU Affero General Public License
|
|
-# along with Diaspora. If not, see <http://www.gnu.org/licenses/>.
|
|
-#
|
|
|
|
|
|
:javascript
|
|
$(document).ready(function(){
|
|
$(".aspect_selector").change( function() {
|
|
var id = $(this).children(":selected").val();
|
|
$(this).parent().children(".accept").html( "<a href=\"/requests/#{request.id}/?accept=true&aspect_id="+id+"\" data-method=\"delete\" rel=\"nofollow\" class=\"button\">Accept</a>");
|
|
});
|
|
});
|
|
|
|
|
|
%li.message{:id => request.id}
|
|
|
|
%span.from
|
|
= link_to "#{request.person.real_name}", '#'
|
|
|
|
%ul.request_buttons
|
|
%select{ :class => "aspect_selector", :style=>"display:inline;"}
|
|
%option Add to aspect
|
|
%option
|
|
- for aspect in current_user.aspects
|
|
%option{:value => aspect.id}= aspect.name
|
|
%li.accept= link_to 'Accept', request_path(request, :accept => true), :method => :delete, :class => "button"
|
|
%li.ignore= link_to 'Ignore', request_path(request), :confirm => 'Are you sure?', :method => :delete, :class => "button"
|
|
|