# File app/controllers/issues_controller.rb, line 111 def bulk_update result = IssuesBulkUpdateContext.new(project, current_user, params).execute redirect_to :back, notice: "#{result[:count]} issues updated" end
# File app/controllers/issues_controller.rb, line 48 def create @issue = @project.issues.new(params[:issue]) @issue.author = current_user @issue.save respond_to do |format| format.html do if @issue.valid? redirect_to project_issue_path(@project, @issue) else render :new end end format.js end end
# File app/controllers/issues_controller.rb, line 80 def destroy @issue.destroy respond_to do |format| format.html { redirect_to project_issues_path } format.js { render nothing: true } end end
# File app/controllers/issues_controller.rb, line 35 def edit respond_with(@issue) end
# File app/controllers/issues_controller.rb, line 19 def index @issues = issues_filtered @issues = @issues.page(params[:page]).per(20) respond_to do |format| format.html # index.html.erb format.js format.atom { render layout: false } end end
# File app/controllers/issues_controller.rb, line 30 def new @issue = @project.issues.new(params[:issue]) respond_with(@issue) end
# File app/controllers/issues_controller.rb, line 101 def search terms = params['terms'] @issues = issues_filtered @issues = @issues.where("title LIKE ?", "%#{terms}%") unless terms.blank? @issues = @issues.page(params[:page]).per(100) render partial: 'issues' end
# File app/controllers/issues_controller.rb, line 39 def show @note = @project.notes.new(noteable: @issue) respond_to do |format| format.html format.js end end
# File app/controllers/issues_controller.rb, line 89 def sort return render_404 unless can?(current_user, :admin_issue, @project) @issues = @project.issues.where(id: params['issue']) @issues.each do |issue| issue.position = params['issue'].index(issue.id.to_s) + 1 issue.save end render nothing: true end
# File app/controllers/issues_controller.rb, line 65 def update @issue.update_attributes(params[:issue].merge(author_id_of_changes: current_user.id)) respond_to do |format| format.js format.html do if @issue.valid? redirect_to [@project, @issue] else render :edit end end end end
# File app/controllers/issues_controller.rb, line 118 def issue @issue ||= @project.issues.find(params[:id]) end
# File app/controllers/issues_controller.rb, line 134 def issues_filtered @issues = IssuesListContext.new(project, current_user, params).execute end
# File app/controllers/issues_controller.rb, line 130 def module_enabled return render_404 unless @project.issues_enabled end