Dodanie toolbara z przyciskami.
[redakcja.git] / redmine / redmine_publications / app / controllers / publications_controller.rb
1
2 class PublicationsController < ApplicationController
3   unloadable
4
5   @@source_file_field_id = 1
6
7   def issues
8         logger.info "Searching for issues with document name = " + params[:pub] + "."
9         joins = "JOIN issue_publications ON (issues.id = issue_publications.issue_id) JOIN publications ON (issue_publications.publication_id = publications.id)"
10
11         conditions = ['publications.source_file = ? ', params[:pub] ]
12         @issues = Issue.all(:joins => joins, :conditions =>  conditions)
13         respond_to do |format|
14           format.html
15           format.xml do 
16             render :xml => @issues
17           end
18
19           format.json do
20             headers['Content-Type'] = 'application/json'
21             render :json => @issues
22           end
23         end
24   end
25
26   def redirect_to_platform
27         render :text => ""
28   end
29
30 end