[noosfero/noosfero][master] Added field created_at above the task title on tasks list

Victor Costa gitlab at gitlab.com
Thu May 28 10:47:27 BRT 2015


Victor Costa pushed to branch master at Noosfero / noosfero


Commits:
726cd88c by Michel Felipe at 2015-05-28T10:35:23Z
Added field created_at above the task title on tasks list

- - - - -


3 changed files:

- app/views/tasks/_task.html.erb
- public/stylesheets/tasks.css
- test/functional/tasks_controller_test.rb


Changes:

=====================================
app/views/tasks/_task.html.erb
=====================================
--- a/app/views/tasks/_task.html.erb
+++ b/app/views/tasks/_task.html.erb
@@ -22,6 +22,8 @@
     %>
   </div><!-- class="task_decisions" -->
 
+  <div class="task_date"><%= show_time(task.created_at) %></div>
+
   <%= render :partial => 'task_title', :locals => {:task => task} %>
 
   <div class="task_information">


=====================================
public/stylesheets/tasks.css
=====================================
--- a/public/stylesheets/tasks.css
+++ b/public/stylesheets/tasks.css
@@ -17,6 +17,11 @@
   font-size: 120%;
 }
 
+.task_date {
+  color: gray;
+  font-size: 12px;
+}
+
 .task_icon {
   float: left;
   margin-right: 10px;


=====================================
test/functional/tasks_controller_test.rb
=====================================
--- a/test/functional/tasks_controller_test.rb
+++ b/test/functional/tasks_controller_test.rb
@@ -49,6 +49,12 @@ class TasksControllerTest < ActionController::TestCase
     assert_kind_of Array, assigns(:tasks)
   end
 
+  should 'display task created_at' do
+    Task.create!(:requestor => fast_create(Person), :target => profile, :spam => false)
+    get :index
+    assert_select '.task_date'
+  end
+
   should 'list processed tasks without spam' do
     requestor = fast_create(Person)
     task_spam = create(Task, :status => Task::Status::FINISHED, :requestor => requestor, :target => profile, :spam => true)



View it on GitLab: https://gitlab.com/noosfero/noosfero/commit/726cd88ce2a64d225f386d9cc6379c115237b3b7
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20150528/578b006c/attachment.html>


More information about the Noosfero-dev mailing list