mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-23 01:06:11 +01:00
first steps towards review view
This commit is contained in:
parent
01bcc7a48c
commit
5f0bcebca9
5 changed files with 17 additions and 2 deletions
|
|
@ -33,6 +33,10 @@ class ProjectsController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
def review
|
||||
puts "MUAUAUAUAUAUAUAUA"
|
||||
end
|
||||
|
||||
def done
|
||||
@source_view = params['_source_view'] || 'project_list'
|
||||
@page_title = t('projects.list_completed_projects')
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ module ProjectsHelper
|
|||
|
||||
def needsreview_class(item)
|
||||
### FIXME: need to check to do this with active projects only
|
||||
if item.last_reviewed < current_user.time - (prefs.review_period).days
|
||||
if item.needs_review?(current_user)
|
||||
return "needsreview"
|
||||
else
|
||||
return "needsnoreview"
|
||||
|
|
|
|||
|
|
@ -107,6 +107,11 @@ class Project < ActiveRecord::Base
|
|||
end
|
||||
end
|
||||
|
||||
def needs_review?(current_user)
|
||||
return (last_reviewed < current_user.time ) # - current_user.prefs.review_period.days)
|
||||
end
|
||||
|
||||
|
||||
def name=(value)
|
||||
self[:name] = value.gsub(/\s{2,}/, " ").strip
|
||||
end
|
||||
|
|
|
|||
|
|
@ -18,6 +18,6 @@
|
|||
</div>
|
||||
|
||||
<div id="list-<%= state %>-projects" class="project-list">
|
||||
<%= render :partial => 'project_listing', :collection => project_state_group %>
|
||||
<%= render :partial => 'projects/project_listing', :collection => project_state_group %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue