Revision 1073:3af6f66496a5 vendor/plugins/redmine_tags/lib/redmine_tags/patches

View differences:

vendor/plugins/redmine_tags/lib/redmine_tags/patches/project_patch.rb
13 13
          unloadable
14 14

  
15 15
          attr_accessor :tag_list
16

  
17 16
          acts_as_taggable
18 17

  
19 18
        end
20 19
      end
21 20

  
22
      def before_save_with_save_tags()
23
#        debugger
24
        logger.error { "GONNA SAVE TAG LIST" }
25

  
26

  
27
#        params[:tag_list]
28
        
29
        
30
        # logger.error { @project.name }
31

  
32
    #    if params && params[:project] && !params[:project][:tag_list].nil?
33
    #      old_tags = context[:project].tag_list.to_s
34
    #      context[:project].tag_list = params[:project][:tag_list]
35
    #      new_tags = context[:project].tag_list.to_s
36
    #
37
    #      unless (old_tags == new_tags || context[:project].current_journal.blank?)
38
    #        context[:project].current_journal.details << JournalDetail.new(:property => 'attr',
39
    #                                                                     :prop_key => 'tag_list',
40
    #                                                                     :old_value => old_tags,
41
    #                                                                     :value => new_tags)
42
    #      end
43
    #    end
44
      end
45
      
46 21
      module InstanceMethods
47
        
48 22
      end
49 23

  
50 24
      module ClassMethods
......
64 38
          name_like = options[:name_like]
65 39
          options = {}
66 40
          visible   = ARCondition.new
67
                  
41

  
68 42
          visible << ["#{Project.table_name}.is_public = '1'"]
69 43

  
70 44
          if name_like
......
73 47

  
74 48
          options[:conditions] = visible.conditions
75 49

  
76
          self.all_tag_counts(options)          
50
          self.all_tag_counts(options)
77 51
        end
78 52
      end
79 53
    end
vendor/plugins/redmine_tags/lib/redmine_tags/patches/projects_controller_patch.rb
12 12
          skip_before_filter :find_project, :only => [:set_fieldset_status]
13 13
          before_filter :add_tags_to_project, :only => [:save, :update]
14 14

  
15
          helper :tags
16
          include TagsHelper
17

  
18 15
          alias :index filtered_index
19 16
        end
20 17
      end
vendor/plugins/redmine_tags/lib/redmine_tags/patches/projects_helper_patch.rb
4 4

  
5 5
      def self.included(base) # :nodoc:
6 6
        base.send(:include, InstanceMethods)
7
        # base.send(:include, TagsHelper)
7
        base.send(:include, TagsHelper)
8

  
8 9
        base.class_eval do
9 10
          unloadable
10 11
        end

Also available in: Unified diff