##// END OF EJS Templates
Introduce virtual MenuNodes (#15880)....
Introduce virtual MenuNodes (#15880). They are characterized by having a blank url. they will only be rendered if the user is authorized to see at least one of its children. they render as links which do nothing when clicked. Patch by Jan Schulz-Hofen. git-svn-id: http://svn.redmine.org/redmine/trunk@15501 e93f8b46-1217-0410-a6f0-8f06a7374b81

File last commit:

r14856:cda9c63d9c21
r15119:53710d80fc88
Show More
journal_detail.rb
50 lines | 1.3 KiB | text/x-ruby | RubyLexer
/ app / models / journal_detail.rb
Jean-Philippe Lang
Keep track of issue description changes (#746)....
r4834 # Redmine - project management software
Jean-Philippe Lang
Updates copyright for 2016....
r14856 # Copyright (C) 2006-2016 Jean-Philippe Lang
Jean-Philippe Lang
improved issues change history...
r52 #
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
Toshi MARUYAMA
remove trailing white-spaces from app/models/journal_detail.rb....
r6407 #
Jean-Philippe Lang
improved issues change history...
r52 # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
Toshi MARUYAMA
remove trailing white-spaces from app/models/journal_detail.rb....
r6407 #
Jean-Philippe Lang
improved issues change history...
r52 # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class JournalDetail < ActiveRecord::Base
belongs_to :journal
Jean-Philippe Lang
Merged rails-4.1 branch (#14534)....
r13100 attr_protected :id
Toshi MARUYAMA
remove trailing white-spaces from app/models/journal_detail.rb....
r6407
Jean-Philippe Lang
Avoid lots of CustomField.find_by_id calls when displaying an issue history with custom fields (#15072)....
r11987 def custom_field
if property == 'cf'
@custom_field ||= CustomField.find_by_id(prop_key)
end
end
Jean-Philippe Lang
Upgrade to Rails 4.2.0 (#14534)....
r13510 def value=(arg)
write_attribute :value, normalize(arg)
end
Toshi MARUYAMA
remove trailing white-spaces from app/models/journal_detail.rb....
r6407
Jean-Philippe Lang
Upgrade to Rails 4.2.0 (#14534)....
r13510 def old_value=(arg)
write_attribute :old_value, normalize(arg)
Jean-Philippe Lang
Private issues (#7414)....
r5346 end
Toshi MARUYAMA
remove trailing white-spaces from app/models/journal_detail.rb....
r6407
Jean-Philippe Lang
Upgrade to Rails 4.2.0 (#14534)....
r13510 private
Jean-Philippe Lang
Private issues (#7414)....
r5346 def normalize(v)
Jean-Philippe Lang
Make sure that dates are stored as YYYY-MM-DD in journal details (#12713)....
r10887 case v
when true
Jean-Philippe Lang
Private issues (#7414)....
r5346 "1"
Jean-Philippe Lang
Make sure that dates are stored as YYYY-MM-DD in journal details (#12713)....
r10887 when false
Jean-Philippe Lang
Private issues (#7414)....
r5346 "0"
Jean-Philippe Lang
Make sure that dates are stored as YYYY-MM-DD in journal details (#12713)....
r10887 when Date
v.strftime("%Y-%m-%d")
Jean-Philippe Lang
Private issues (#7414)....
r5346 else
v
end
end
Jean-Philippe Lang
improved issues change history...
r52 end