To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / vendor / plugins / redmine_tags / lib / redmine_tags / patches / auto_completes_controller_patch.rb @ 778:c118d3389088
History | View | Annotate | Download (1.62 KB)
| 1 | 593:f12948591050 | chris | # This file is a part of redmine_tags
|
|---|---|---|---|
| 2 | # redMine plugin, that adds tagging support.
|
||
| 3 | #
|
||
| 4 | # Copyright (c) 2010 Aleksey V Zapparov AKA ixti
|
||
| 5 | #
|
||
| 6 | # redmine_tags is free software: you can redistribute it and/or modify
|
||
| 7 | # it under the terms of the GNU General Public License as published by
|
||
| 8 | # the Free Software Foundation, either version 3 of the License, or
|
||
| 9 | # (at your option) any later version.
|
||
| 10 | #
|
||
| 11 | # redmine_tags is distributed in the hope that it will be useful,
|
||
| 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
| 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
| 14 | # GNU General Public License for more details.
|
||
| 15 | #
|
||
| 16 | # You should have received a copy of the GNU General Public License
|
||
| 17 | # along with redmine_tags. If not, see <http://www.gnu.org/licenses/>.
|
||
| 18 | |||
| 19 | require_dependency 'auto_completes_controller'
|
||
| 20 | |||
| 21 | module RedmineTags |
||
| 22 | module Patches |
||
| 23 | module AutoCompletesControllerPatch |
||
| 24 | def self.included(base) |
||
| 25 | base.send(:include, InstanceMethods) |
||
| 26 | end
|
||
| 27 | |||
| 28 | |||
| 29 | module InstanceMethods |
||
| 30 | def issue_tags |
||
| 31 | @name = params[:q].to_s |
||
| 32 | @tags = Issue.available_tags :project_id => @project, :name_like => @name |
||
| 33 | render :layout => false, :partial => 'tag_list' |
||
| 34 | end
|
||
| 35 | 729:291c4d7dc0b6 | luis | |
| 36 | def project_tags |
||
| 37 | @name = params[:q].to_s |
||
| 38 | 746:2ced57750157 | luis | @tags = Project.available_tags :name_like => @name |
| 39 | 729:291c4d7dc0b6 | luis | render :layout => false, :partial => 'tag_list' |
| 40 | end
|
||
| 41 | 778:c118d3389088 | luis | |
| 42 | def project_search_tags |
||
| 43 | @name = params[:q].to_s |
||
| 44 | @tags = Project.available_tags :name_like => @name |
||
| 45 | render :layout => false, :partial => 'search_tag_list' |
||
| 46 | end
|
||
| 47 | 593:f12948591050 | chris | end
|
| 48 | end
|
||
| 49 | end
|
||
| 50 | end |