diff --git a/app/controllers/my_profile/tasks_controller.rb b/app/controllers/my_profile/tasks_controller.rb
new file mode 100644
index 0000000..1f4371d
--- /dev/null
+++ b/app/controllers/my_profile/tasks_controller.rb
@@ -0,0 +1,7 @@
+class TasksController < MyProfileController
+
+ def index
+ @tasks = profile.tasks.pending
+ end
+
+end
diff --git a/app/views/tasks/_add_friend.rhtml b/app/views/tasks/_add_friend.rhtml
new file mode 100644
index 0000000..8ed59fa
--- /dev/null
+++ b/app/views/tasks/_add_friend.rhtml
@@ -0,0 +1,22 @@
+
<%= _('New friend') %>
+
+
+<%= _('%s wants to connect to you as a friend.') % task.requestor.name %>
+
+
+<% labelled_form_for('task', task, :url => { :action => 'close', :id => task.id } ) do |f| %>
+
+
+ <%= radio_button_tag(:action, 'accept', true) %>
+ <%= _('Accept') %>
+
+
+
+ <%= radio_button_tag(:action, 'ignore', false) %>
+ <%= _('Ignore') %>
+
+
+ <% button_bar do %>
+ <%= submit_button(:ok, _('OK')) %>
+ <% end %>
+<% end %>
diff --git a/app/views/tasks/index.rhtml b/app/views/tasks/index.rhtml
new file mode 100644
index 0000000..14430c3
--- /dev/null
+++ b/app/views/tasks/index.rhtml
@@ -0,0 +1,7 @@
+<%= _('Pending tasks') %>
+
+
+ <% @tasks.each do |item| %>
+ - <%= render :partial => partial_for_class(item.class), :locals => { :task => item } %>
+ <% end %>
+
diff --git a/db/migrate/023_add_type_column_for_task.rb b/db/migrate/023_add_type_column_for_task.rb
new file mode 100644
index 0000000..57288c2
--- /dev/null
+++ b/db/migrate/023_add_type_column_for_task.rb
@@ -0,0 +1,9 @@
+class AddTypeColumnForTask < ActiveRecord::Migration
+ def self.up
+ add_column :tasks, :type, :string
+ end
+
+ def self.down
+ remove_column :tasks, :type
+ end
+end
diff --git a/test/functional/tasks_controller_test.rb b/test/functional/tasks_controller_test.rb
new file mode 100644
index 0000000..88acb06
--- /dev/null
+++ b/test/functional/tasks_controller_test.rb
@@ -0,0 +1,33 @@
+require File.dirname(__FILE__) + '/../test_helper'
+require 'tasks_controller'
+
+class TasksController; def rescue_action(e) raise e end; end
+
+class TasksControllerTest < Test::Unit::TestCase
+
+ noosfero_test :profile => 'testuser'
+
+ def setup
+ @controller = TasksController.new
+ @request = ActionController::TestRequest.new
+ @response = ActionController::TestResponse.new
+
+ self.profile = create_user('testuser').person
+ end
+ attr_accessor :profile
+
+ should 'list pending tasks' do
+ get :index
+
+ assert_response :success
+ assert_template 'index'
+ assert_kind_of Array, assigns(:tasks)
+ end
+
+ should 'display form for resolving a task'
+
+ should 'be able to finish a task'
+
+ should 'be able to cancel a task'
+
+end
--
libgit2 0.21.2