Commit 726cd88ce2a64d225f386d9cc6379c115237b3b7

Authored by Michel Felipe
Committed by Victor Costa
1 parent 78331cae

Added field created_at above the task title on tasks list

app/views/tasks/_task.html.erb
... ... @@ -22,6 +22,8 @@
22 22 %>
23 23 </div><!-- class="task_decisions" -->
24 24  
  25 + <div class="task_date"><%= show_time(task.created_at) %></div>
  26 +
25 27 <%= render :partial => 'task_title', :locals => {:task => task} %>
26 28  
27 29 <div class="task_information">
... ...
public/stylesheets/tasks.css
... ... @@ -17,6 +17,11 @@
17 17 font-size: 120%;
18 18 }
19 19  
  20 +.task_date {
  21 + color: gray;
  22 + font-size: 12px;
  23 +}
  24 +
20 25 .task_icon {
21 26 float: left;
22 27 margin-right: 10px;
... ...
test/functional/tasks_controller_test.rb
... ... @@ -49,6 +49,12 @@ class TasksControllerTest &lt; ActionController::TestCase
49 49 assert_kind_of Array, assigns(:tasks)
50 50 end
51 51  
  52 + should 'display task created_at' do
  53 + Task.create!(:requestor => fast_create(Person), :target => profile, :spam => false)
  54 + get :index
  55 + assert_select '.task_date'
  56 + end
  57 +
52 58 should 'list processed tasks without spam' do
53 59 requestor = fast_create(Person)
54 60 task_spam = create(Task, :status => Task::Status::FINISHED, :requestor => requestor, :target => profile, :spam => true)
... ...