tracks/tracks/app/controllers/application.rb
bsag 2f2909e930 Fixed 2 bugs in 1.02:
* Added the border=0 back to the images for edit and delete actions, which I had accidentally removed at some point (fixed ticket:11)
  * Removed Redcloth requiring code in config/environment.rb, as Rails now requires Redcloth itself (fixed ticket:10)


git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@45 a4c988fc-2ded-0310-b66e-134b36920a42
2005-03-12 11:53:59 +00:00

24 lines
No EOL
709 B
Ruby

# The filters added to this controller will be run for all controllers in the application.
# Likewise will all the methods added be available for all controllers.
require_dependency "login_system"
require 'date'
$notes_img = "<img src=\"/images/notes.png\" width=\"10\" height=\"10\" border=\"0\" />"
$done_img = "<img src=\"/images/done.png\" width=\"16\" height=\"16\" border=\"0\" />"
class ApplicationController < ActionController::Base
helper :application
include LoginSystem
def count_shown_items(hidden)
count = 0
sub = 0
hidden.each do |h|
sub = Todo.find_all("done=0 AND context_id=#{h.id}").length + sub
end
total = Todo.find_all("done=0").length - sub
end
end