r187 - in trunk/jredmine-client/src/main/redmine/jredmine: app/controllers config
Author: tchemit Date: 2011-05-20 14:54:23 +0200 (Fri, 20 May 2011) New Revision: 187 Url: http://nuiton.org/repositories/revision/jredmine/187 Log: Evolution #1543: Make public get_enumeration api Modified: trunk/jredmine-client/src/main/redmine/jredmine/app/controllers/jredmine_controller.rb trunk/jredmine-client/src/main/redmine/jredmine/config/routes.rb Modified: trunk/jredmine-client/src/main/redmine/jredmine/app/controllers/jredmine_controller.rb =================================================================== --- trunk/jredmine-client/src/main/redmine/jredmine/app/controllers/jredmine_controller.rb 2011-05-20 12:32:08 UTC (rev 186) +++ trunk/jredmine-client/src/main/redmine/jredmine/app/controllers/jredmine_controller.rb 2011-05-20 12:54:23 UTC (rev 187) @@ -421,6 +421,12 @@ end end + + # recuperation des valeurs d'une enumeration + def get_enumeration(type = params[:type]) + @result = Enumeration.get_values(type) + render_array_result @result, "enumerations" + end private @@ -458,12 +464,6 @@ end end - # recuperation des valeurs d'une enumration - def get_enumeration(type = params[:type]) - @result = Enumeration.get_values(type) - render_array_result @result, "enumerations" - end - def check_edit # check if user can edit the project allowed = User.current.allowed_to?({:controller => 'projects', :action => "edit"}, @project) Modified: trunk/jredmine-client/src/main/redmine/jredmine/config/routes.rb =================================================================== --- trunk/jredmine-client/src/main/redmine/jredmine/config/routes.rb 2011-05-20 12:32:08 UTC (rev 186) +++ trunk/jredmine-client/src/main/redmine/jredmine/config/routes.rb 2011-05-20 12:54:23 UTC (rev 187) @@ -27,7 +27,7 @@ map.with_options :controller => 'jredmine' do |red| # jredmine : actions with no project context - red.connect 'jredmine/:action', :action => ['ping', 'login', 'logout', 'get_projects', 'get_user_projects', 'get_issue_statuses', 'get_issue_priorities'] + red.connect 'jredmine/:action', :action => ['ping', 'login', 'logout', 'get_projects', 'get_user_projects', 'get_issue_statuses', 'get_issue_priorities', 'get_enumeration'] # jredmine/action/:pid : actions with project context red.connect 'jredmine/:action/:pid', :pid => /.+/
participants (1)
-
tchemit@users.nuiton.org