4/debian-10/plugins/redmine_issue_templates/app/controllers/global_issue_templates_controller.rb
#
# Action for global template : Admin right is required.
#
Action for global template : Admin right is required.
Action for global template : Admin right is required .
def index
    trackers = Tracker.all
    template_map = {}
    trackers.each do |tracker|
      tracker_id = tracker.id
      templates = GlobalIssueTemplate.search_by_tracker(tracker_id).sorted
      template_map[Tracker.find(tracker_id)] = templates if templates.any?
    end
    render layout: !request.xhr?, locals: { template_map: template_map, trackers: trackers }
  end
def index trackers = Tracker . all template_map = { } trackers . each do | tracker | tracker_id = tracker . id templates = GlobalIssueTemplate . search_by_tracker ( tracker_id ) . sorted template_map [ Tracker . find ( tracker_id ) ] = templates if templates . any? end render layout : ! request . xhr? , locals : { template_map : template_map , trackers : trackers } end
Action for global template : Admin right is required.
Action for global template : Admin right is required .