* single/multiple issues pdf export added
* new filter in issues list: "Author" * option to set number of results per page on issues list * localized csv separator (comma/semicolon) * csv output encoded to ISO-8859-1 * fixed: custom fields not in csv exports git-svn-id: http://redmine.rubyforge.org/svn/trunk@37 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
79cbe8d199
commit
51e0989c49
|
@ -88,7 +88,7 @@ class ApplicationController < ActionController::Base
|
||||||
render :nothing => true, :status => 403
|
render :nothing => true, :status => 403
|
||||||
false
|
false
|
||||||
end
|
end
|
||||||
|
|
||||||
# store current uri in session.
|
# store current uri in session.
|
||||||
# return to this location by calling redirect_back_or_default
|
# return to this location by calling redirect_back_or_default
|
||||||
def store_location
|
def store_location
|
||||||
|
|
|
@ -16,15 +16,23 @@
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
class IssuesController < ApplicationController
|
class IssuesController < ApplicationController
|
||||||
layout 'base'
|
layout 'base', :except => :export_pdf
|
||||||
before_filter :find_project, :authorize
|
before_filter :find_project, :authorize
|
||||||
|
|
||||||
helper :custom_fields
|
helper :custom_fields
|
||||||
include CustomFieldsHelper
|
include CustomFieldsHelper
|
||||||
|
helper :ifpdf
|
||||||
|
include IfpdfHelper
|
||||||
|
|
||||||
def show
|
def show
|
||||||
@status_options = @issue.status.workflows.find(:all, :include => :new_status, :conditions => ["role_id=? and tracker_id=?", self.logged_in_user.role_for_project(@project.id), @issue.tracker.id]).collect{ |w| w.new_status } if self.logged_in_user
|
@status_options = @issue.status.workflows.find(:all, :include => :new_status, :conditions => ["role_id=? and tracker_id=?", self.logged_in_user.role_for_project(@project.id), @issue.tracker.id]).collect{ |w| w.new_status } if self.logged_in_user
|
||||||
@custom_values = @issue.custom_values.find(:all, :include => :custom_field)
|
@custom_values = @issue.custom_values.find(:all, :include => :custom_field)
|
||||||
|
end
|
||||||
|
|
||||||
|
def export_pdf
|
||||||
|
@custom_values = @issue.custom_values.find(:all, :include => :custom_field)
|
||||||
|
@options_for_rfpdf ||= {}
|
||||||
|
@options_for_rfpdf[:file_name] = "#{@project.name}_#{@issue.long_id}.pdf"
|
||||||
end
|
end
|
||||||
|
|
||||||
def edit
|
def edit
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
class ProjectsController < ApplicationController
|
class ProjectsController < ApplicationController
|
||||||
layout 'base'
|
layout 'base', :except => :export_issues_pdf
|
||||||
before_filter :find_project, :authorize, :except => [ :index, :list, :add ]
|
before_filter :find_project, :authorize, :except => [ :index, :list, :add ]
|
||||||
before_filter :require_admin, :only => [ :add, :destroy ]
|
before_filter :require_admin, :only => [ :add, :destroy ]
|
||||||
|
|
||||||
|
@ -26,7 +26,9 @@ class ProjectsController < ApplicationController
|
||||||
include SearchFilterHelper
|
include SearchFilterHelper
|
||||||
helper :custom_fields
|
helper :custom_fields
|
||||||
include CustomFieldsHelper
|
include CustomFieldsHelper
|
||||||
|
helper :ifpdf
|
||||||
|
include IfpdfHelper
|
||||||
|
|
||||||
def index
|
def index
|
||||||
list
|
list
|
||||||
render :action => 'list' unless request.xhr?
|
render :action => 'list' unless request.xhr?
|
||||||
|
@ -208,15 +210,23 @@ class ProjectsController < ApplicationController
|
||||||
search_filter_init_list_issues
|
search_filter_init_list_issues
|
||||||
search_filter_update if params[:set_filter]
|
search_filter_update if params[:set_filter]
|
||||||
|
|
||||||
|
@results_per_page_options = [ 15, 25, 50, 100 ]
|
||||||
|
if params[:per_page] and @results_per_page_options.include? params[:per_page].to_i
|
||||||
|
@results_per_page = params[:per_page].to_i
|
||||||
|
session[:results_per_page] = @results_per_page
|
||||||
|
else
|
||||||
|
@results_per_page = session[:results_per_page] || @results_per_page_options.first
|
||||||
|
end
|
||||||
|
|
||||||
@issue_count = Issue.count(:include => [:status, :project], :conditions => search_filter_clause)
|
@issue_count = Issue.count(:include => [:status, :project], :conditions => search_filter_clause)
|
||||||
@issue_pages = Paginator.new self, @issue_count, 15, @params['page']
|
@issue_pages = Paginator.new self, @issue_count, @results_per_page, @params['page']
|
||||||
@issues = Issue.find :all, :order => sort_clause,
|
@issues = Issue.find :all, :order => sort_clause,
|
||||||
:include => [ :author, :status, :tracker, :project ],
|
:include => [ :author, :status, :tracker, :project ],
|
||||||
:conditions => search_filter_clause,
|
:conditions => search_filter_clause,
|
||||||
:limit => @issue_pages.items_per_page,
|
:limit => @issue_pages.items_per_page,
|
||||||
:offset => @issue_pages.current.offset
|
:offset => @issue_pages.current.offset
|
||||||
|
|
||||||
render :action => "list_issues", :layout => false if request.xhr?
|
render :layout => false if request.xhr?
|
||||||
end
|
end
|
||||||
|
|
||||||
# Export filtered/sorted issues list to CSV
|
# Export filtered/sorted issues list to CSV
|
||||||
|
@ -227,20 +237,44 @@ class ProjectsController < ApplicationController
|
||||||
search_filter_init_list_issues
|
search_filter_init_list_issues
|
||||||
|
|
||||||
@issues = Issue.find :all, :order => sort_clause,
|
@issues = Issue.find :all, :order => sort_clause,
|
||||||
:include => [ :author, :status, :tracker, :project ],
|
:include => [ :author, :status, :tracker, :project, :custom_values ],
|
||||||
:conditions => search_filter_clause
|
:conditions => search_filter_clause
|
||||||
|
|
||||||
|
ic = Iconv.new('ISO-8859-1', 'UTF-8')
|
||||||
export = StringIO.new
|
export = StringIO.new
|
||||||
CSV::Writer.generate(export, ',') do |csv|
|
CSV::Writer.generate(export, l(:general_csv_separator)) do |csv|
|
||||||
csv << %w(Id Status Tracker Subject Author Created Updated)
|
# csv header fields
|
||||||
|
headers = [ "#", l(:field_status), l(:field_tracker), l(:field_subject), l(:field_author), l(:field_created_on), l(:field_updated_on) ]
|
||||||
|
for custom_field in @project.all_custom_fields
|
||||||
|
headers << custom_field.name
|
||||||
|
end
|
||||||
|
csv << headers.collect {|c| ic.iconv(c) }
|
||||||
|
# csv lines
|
||||||
@issues.each do |issue|
|
@issues.each do |issue|
|
||||||
csv << [issue.id, issue.status.name, issue.tracker.name, issue.subject, issue.author.display_name, l_datetime(issue.created_on), l_datetime(issue.updated_on)]
|
fields = [issue.id, issue.status.name, issue.tracker.name, issue.subject, issue.author.display_name, l_datetime(issue.created_on), l_datetime(issue.updated_on)]
|
||||||
|
for custom_field in @project.all_custom_fields
|
||||||
|
fields << (show_value issue.custom_value_for(custom_field))
|
||||||
|
end
|
||||||
|
csv << fields.collect {|c| ic.iconv(c.to_s) }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
export.rewind
|
export.rewind
|
||||||
send_data(export.read,
|
send_data(export.read, :type => 'text/csv; header=present', :filename => 'export.csv')
|
||||||
:type => 'text/csv; charset=utf-8; header=present',
|
end
|
||||||
:filename => 'export.csv')
|
|
||||||
|
# Export filtered/sorted issues to PDF
|
||||||
|
def export_issues_pdf
|
||||||
|
sort_init 'issues.id', 'desc'
|
||||||
|
sort_update
|
||||||
|
|
||||||
|
search_filter_init_list_issues
|
||||||
|
|
||||||
|
@issues = Issue.find :all, :order => sort_clause,
|
||||||
|
:include => [ :author, :status, :tracker, :project, :custom_values ],
|
||||||
|
:conditions => search_filter_clause
|
||||||
|
|
||||||
|
@options_for_rfpdf ||= {}
|
||||||
|
@options_for_rfpdf[:file_name] = "export.pdf"
|
||||||
end
|
end
|
||||||
|
|
||||||
def move_issues
|
def move_issues
|
||||||
|
|
|
@ -49,7 +49,7 @@ module ApplicationHelper
|
||||||
def link_to_user(user)
|
def link_to_user(user)
|
||||||
link_to user.display_name, :controller => 'account', :action => 'show', :id => user
|
link_to user.display_name, :controller => 'account', :action => 'show', :id => user
|
||||||
end
|
end
|
||||||
|
|
||||||
def format_date(date)
|
def format_date(date)
|
||||||
l_date(date) if date
|
l_date(date) if date
|
||||||
end
|
end
|
||||||
|
@ -57,7 +57,7 @@ module ApplicationHelper
|
||||||
def format_time(time)
|
def format_time(time)
|
||||||
l_datetime(time) if time
|
l_datetime(time) if time
|
||||||
end
|
end
|
||||||
|
|
||||||
def pagination_links_full(paginator, options={}, html_options={})
|
def pagination_links_full(paginator, options={}, html_options={})
|
||||||
html = ''
|
html = ''
|
||||||
html << link_to_remote(('« ' + l(:label_previous)),
|
html << link_to_remote(('« ' + l(:label_previous)),
|
||||||
|
|
|
@ -53,9 +53,11 @@ module CustomFieldsHelper
|
||||||
|
|
||||||
# Return a string used to display a custom value
|
# Return a string used to display a custom value
|
||||||
def show_value(custom_value)
|
def show_value(custom_value)
|
||||||
|
return "" unless custom_value
|
||||||
|
|
||||||
case custom_value.custom_field.field_format
|
case custom_value.custom_field.field_format
|
||||||
when "date"
|
when "date"
|
||||||
format_date(custom_value.value.to_date)
|
l_date(custom_value.value.to_date) if custom_value.value
|
||||||
when "bool"
|
when "bool"
|
||||||
l_YesNo(custom_value.value == "1")
|
l_YesNo(custom_value.value == "1")
|
||||||
else
|
else
|
||||||
|
|
|
@ -0,0 +1,43 @@
|
||||||
|
# redMine - project management software
|
||||||
|
# Copyright (C) 2006 Jean-Philippe Lang
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License
|
||||||
|
# as published by the Free Software Foundation; either version 2
|
||||||
|
# of the License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
require 'iconv'
|
||||||
|
|
||||||
|
module IfpdfHelper
|
||||||
|
|
||||||
|
class IFPDF < FPDF
|
||||||
|
|
||||||
|
def Cell(w,h=0,txt='',border=0,ln=0,align='',fill=0,link='')
|
||||||
|
@ic ||= Iconv.new('ISO-8859-1', 'UTF-8')
|
||||||
|
super w,h,@ic.iconv(txt),border,ln,align,fill,link
|
||||||
|
end
|
||||||
|
|
||||||
|
def MultiCell(w,h,txt,border=0,align='J',fill=0)
|
||||||
|
@ic ||= Iconv.new('ISO-8859-1', 'UTF-8')
|
||||||
|
super w,h,txt,border,align,fill
|
||||||
|
end
|
||||||
|
|
||||||
|
def Footer
|
||||||
|
SetY(-15)
|
||||||
|
SetX(-30)
|
||||||
|
SetFont('Helvetica', 'I', 8)
|
||||||
|
Cell(0, 5, PageNo().to_s + '/{nb}', 0, 0, 'C')
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
|
@ -86,6 +86,11 @@ module SearchFilterHelper
|
||||||
] + @project.versions.collect {|s| [s.name, s.id, ["issues.fixed_version_id=?", s.id]] }
|
] + @project.versions.collect {|s| [s.name, s.id, ["issues.fixed_version_id=?", s.id]] }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
search_filter_criteria('author_id') {
|
||||||
|
[ [('['+l(:label_all)+']'), "A", nil],
|
||||||
|
] + @project.users.collect {|s| [s.display_name, s.id, ["issues.author_id=?", s.id]] }
|
||||||
|
}
|
||||||
|
|
||||||
search_filter_criteria('assigned_to_id') {
|
search_filter_criteria('assigned_to_id') {
|
||||||
[ [('['+l(:label_all)+']'), "A", nil],
|
[ [('['+l(:label_all)+']'), "A", nil],
|
||||||
[('['+l(:label_none)+']'), "N", ["issues.assigned_to_id is null"]]
|
[('['+l(:label_none)+']'), "N", ["issues.assigned_to_id is null"]]
|
||||||
|
|
|
@ -29,6 +29,10 @@ class Enumeration < ActiveRecord::Base
|
||||||
def self.get_values(option)
|
def self.get_values(option)
|
||||||
find(:all, :conditions => ['opt=?', option])
|
find(:all, :conditions => ['opt=?', option])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def option_name
|
||||||
|
OPTIONS[self.opt]
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
def check_integrity
|
def check_integrity
|
||||||
|
|
|
@ -53,6 +53,11 @@ class Issue < ActiveRecord::Base
|
||||||
def long_id
|
def long_id
|
||||||
"%05d" % self.id
|
"%05d" % self.id
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def custom_value_for(custom_field)
|
||||||
|
self.custom_values.each {|v| return v if v.custom_field_id == custom_field.id }
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
# Creates an history for the issue
|
# Creates an history for the issue
|
||||||
|
|
|
@ -43,6 +43,11 @@ class Project < ActiveRecord::Base
|
||||||
:conditions => ["is_for_all=? or project_id=?", true, self.id])
|
:conditions => ["is_for_all=? or project_id=?", true, self.id])
|
||||||
#(CustomField.for_all + custom_fields).uniq
|
#(CustomField.for_all + custom_fields).uniq
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def all_custom_fields
|
||||||
|
@all_custom_fields ||= IssueCustomField.find(:all, :include => :projects,
|
||||||
|
:conditions => ["is_for_all=? or project_id=?", true, self.id])
|
||||||
|
end
|
||||||
|
|
||||||
protected
|
protected
|
||||||
def validate
|
def validate
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
<br /><br />
|
<br /><br />
|
||||||
|
|
||||||
<table class="listTableContent">
|
<table class="reportTableContent">
|
||||||
<% for attachment in @attachments %>
|
<% for attachment in @attachments %>
|
||||||
<tr class="<%= cycle("odd", "even") %>">
|
<tr class="<%= cycle("odd", "even") %>">
|
||||||
<td><%= format_date(attachment.created_on) %></td>
|
<td><%= format_date(attachment.created_on) %></td>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<h2><%=l(:label_enumeration_new)%></h2>
|
<h2><%= l(@enumeration.option_name) %>: <%=l(:label_enumeration_new)%></h2>
|
||||||
|
|
||||||
<%= start_form_tag({:action => 'create'}, :class => "tabular") %>
|
<%= start_form_tag({:action => 'create'}, :class => "tabular") %>
|
||||||
<%= render :partial => 'form' %>
|
<%= render :partial => 'form' %>
|
||||||
|
|
|
@ -0,0 +1,95 @@
|
||||||
|
<% pdf.SetFont('Arial','B',11)
|
||||||
|
pdf.Cell(190,10, "#{issue.project.name} - #{issue.tracker.name} # #{issue.long_id} - #{issue.subject}")
|
||||||
|
pdf.Ln
|
||||||
|
|
||||||
|
y0 = pdf.GetY
|
||||||
|
|
||||||
|
pdf.SetFont('Arial','B',9)
|
||||||
|
pdf.Cell(35,5, l(:field_status) + ":","LT")
|
||||||
|
pdf.SetFont('Arial','',9)
|
||||||
|
pdf.Cell(60,5, issue.status.name,"RT")
|
||||||
|
pdf.SetFont('Arial','B',9)
|
||||||
|
pdf.Cell(35,5, l(:field_priority) + ":","LT")
|
||||||
|
pdf.SetFont('Arial','',9)
|
||||||
|
pdf.Cell(60,5, issue.priority.name,"RT")
|
||||||
|
pdf.Ln
|
||||||
|
|
||||||
|
pdf.SetFont('Arial','B',9)
|
||||||
|
pdf.Cell(35,5, l(:field_author) + ":","L")
|
||||||
|
pdf.SetFont('Arial','',9)
|
||||||
|
pdf.Cell(60,5, issue.author.name,"R")
|
||||||
|
pdf.SetFont('Arial','B',9)
|
||||||
|
pdf.Cell(35,5, l(:field_category) + ":","L")
|
||||||
|
pdf.SetFont('Arial','',9)
|
||||||
|
pdf.Cell(60,5, (issue.category ? issue.category.name : "-"),"R")
|
||||||
|
pdf.Ln
|
||||||
|
|
||||||
|
pdf.SetFont('Arial','B',9)
|
||||||
|
pdf.Cell(35,5, l(:field_created_on) + ":","L")
|
||||||
|
pdf.SetFont('Arial','',9)
|
||||||
|
pdf.Cell(60,5, format_date(issue.created_on),"R")
|
||||||
|
pdf.SetFont('Arial','B',9)
|
||||||
|
pdf.Cell(35,5, l(:field_assigned_to) + ":","L")
|
||||||
|
pdf.SetFont('Arial','',9)
|
||||||
|
pdf.Cell(60,5, (issue.assigned_to ? issue.assigned_to.name : "-"),"R")
|
||||||
|
pdf.Ln
|
||||||
|
|
||||||
|
pdf.SetFont('Arial','B',9)
|
||||||
|
pdf.Cell(35,5, l(:field_updated_on) + ":","LB")
|
||||||
|
pdf.SetFont('Arial','',9)
|
||||||
|
pdf.Cell(60,5, format_date(issue.updated_on),"RB")
|
||||||
|
pdf.SetFont('Arial','B',9)
|
||||||
|
pdf.Cell(35,5, l(:field_due_date) + ":","LB")
|
||||||
|
pdf.SetFont('Arial','',9)
|
||||||
|
pdf.Cell(60,5, format_date(issue.due_date),"RB")
|
||||||
|
pdf.Ln
|
||||||
|
|
||||||
|
for custom_value in issue.custom_values
|
||||||
|
pdf.SetFont('Arial','B',9)
|
||||||
|
pdf.Cell(35,5, custom_value.custom_field.name + ":","L")
|
||||||
|
pdf.SetFont('Arial','',9)
|
||||||
|
pdf.MultiCell(155,5, (show_value custom_value),"R")
|
||||||
|
end
|
||||||
|
|
||||||
|
pdf.SetFont('Arial','B',9)
|
||||||
|
pdf.Cell(35,5, l(:field_subject) + ":","LTB")
|
||||||
|
pdf.SetFont('Arial','',9)
|
||||||
|
pdf.Cell(155,5, issue.subject,"RTB")
|
||||||
|
pdf.Ln
|
||||||
|
|
||||||
|
pdf.SetFont('Arial','B',9)
|
||||||
|
pdf.Cell(35,5, l(:field_description) + ":")
|
||||||
|
pdf.SetFont('Arial','',9)
|
||||||
|
pdf.MultiCell(155,5, issue.description,"BR")
|
||||||
|
|
||||||
|
pdf.Line(pdf.GetX, y0, pdf.GetX, pdf.GetY)
|
||||||
|
pdf.Line(pdf.GetX, pdf.GetY, 170, pdf.GetY)
|
||||||
|
|
||||||
|
pdf.Ln
|
||||||
|
pdf.SetFont('Arial','B',9)
|
||||||
|
pdf.Cell(190,5, l(:label_history),"B")
|
||||||
|
pdf.Ln
|
||||||
|
for history in issue.histories.find(:all, :include => [:author, :status])
|
||||||
|
pdf.SetFont('Arial','B',8)
|
||||||
|
pdf.Cell(100,5, history.status.name)
|
||||||
|
pdf.SetFont('Arial','',8)
|
||||||
|
pdf.Cell(20,5, format_date(history.created_on))
|
||||||
|
pdf.Cell(70,5, history.author.name,0,0,"R")
|
||||||
|
pdf.SetFont('Arial','',8)
|
||||||
|
pdf.Ln
|
||||||
|
pdf.Cell(10,4, "") and pdf.MultiCell(180,4, history.notes) if history.notes?
|
||||||
|
end
|
||||||
|
pdf.Ln
|
||||||
|
|
||||||
|
pdf.SetFont('Arial','B',9)
|
||||||
|
pdf.Cell(190,5, l(:label_attachment_plural), "B")
|
||||||
|
pdf.Ln
|
||||||
|
for attachment in issue.attachments
|
||||||
|
pdf.SetFont('Arial','',8)
|
||||||
|
pdf.Cell(80,5, attachment.filename)
|
||||||
|
pdf.Cell(20,5, human_size(attachment.filesize))
|
||||||
|
pdf.Cell(20,5, format_date(attachment.created_on))
|
||||||
|
pdf.Cell(70,5, attachment.author.name,0,0,"R")
|
||||||
|
pdf.Ln
|
||||||
|
end
|
||||||
|
%>
|
|
@ -0,0 +1,8 @@
|
||||||
|
<% pdf=IfpdfHelper::IFPDF.new
|
||||||
|
pdf.AliasNbPages
|
||||||
|
pdf.AddPage
|
||||||
|
|
||||||
|
render :partial => 'issues/pdf', :locals => { :pdf => pdf, :issue => @issue }
|
||||||
|
%>
|
||||||
|
|
||||||
|
<%= pdf.Output %>
|
|
@ -1,4 +1,9 @@
|
||||||
<h2><%= @issue.tracker.name %> #<%= @issue.id %> - <%= @issue.subject %></h2>
|
<h2><%= @issue.tracker.name %> #<%= @issue.id %> - <%= @issue.subject %></h2>
|
||||||
|
<div class="topright">
|
||||||
|
<small>
|
||||||
|
<%= link_to 'PDF', :action => 'export_pdf', :id => @issue %>
|
||||||
|
</small>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<p>
|
<p>
|
||||||
|
@ -7,15 +12,18 @@
|
||||||
<b><%=l(:field_assigned_to)%> :</b> <%= @issue.assigned_to ? @issue.assigned_to.display_name : "-" %>    
|
<b><%=l(:field_assigned_to)%> :</b> <%= @issue.assigned_to ? @issue.assigned_to.display_name : "-" %>    
|
||||||
<b><%=l(:field_category)%> :</b> <%= @issue.category ? @issue.category.name : "-" %>
|
<b><%=l(:field_category)%> :</b> <%= @issue.category ? @issue.category.name : "-" %>
|
||||||
</p>
|
</p>
|
||||||
<p><b><%=l(:field_author)%> :</b> <%= @issue.author.display_name %></p>
|
<div class="tabular">
|
||||||
<p><b><%=l(:field_subject)%> :</b> <%= @issue.subject %></p>
|
<p><label><%=l(:field_author)%> :</label> <%= link_to_user @issue.author %> </p>
|
||||||
<p><b><%=l(:field_description)%> :</b> <%= simple_format auto_link @issue.description %></p>
|
<p><label><%=l(:field_created_on)%> :</label> <%= format_date(@issue.created_on) %> </p>
|
||||||
<p><b><%=l(:field_due_date)%> :</b> <%= format_date(@issue.due_date) %></p>
|
<p><label><%=l(:field_subject)%> :</label> <%= @issue.subject %> </p>
|
||||||
<p><b><%=l(:field_created_on)%> :</b> <%= format_date(@issue.created_on) %></p>
|
<%= simple_format ("<label>" + l(:field_description) + ": </label>" + auto_link(@issue.description)) %>
|
||||||
|
<p><label><%=l(:field_due_date)%> :</label> <%= format_date(@issue.due_date) %> </p>
|
||||||
|
|
||||||
<% for custom_value in @custom_values %>
|
<% for custom_value in @custom_values %>
|
||||||
<p><b><%= custom_value.custom_field.name %></b> : <%= show_value custom_value %></p>
|
<p><label><%= custom_value.custom_field.name %> :</label> <%= show_value custom_value %></p>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
<% if authorize_for('issues', 'edit') %>
|
<% if authorize_for('issues', 'edit') %>
|
||||||
<%= start_form_tag ({:controller => 'issues', :action => 'edit', :id => @issue}, :method => "get" ) %>
|
<%= start_form_tag ({:controller => 'issues', :action => 'edit', :id => @issue}, :method => "get" ) %>
|
||||||
|
@ -26,7 +34,7 @@
|
||||||
|
|
||||||
<% if authorize_for('issues', 'change_status') and @status_options and !@status_options.empty? %>
|
<% if authorize_for('issues', 'change_status') and @status_options and !@status_options.empty? %>
|
||||||
<%= start_form_tag ({:controller => 'issues', :action => 'change_status', :id => @issue}) %>
|
<%= start_form_tag ({:controller => 'issues', :action => 'change_status', :id => @issue}) %>
|
||||||
<label for="history_status_id"><%=l(:label_change_status)%> :</label>
|
<%=l(:label_change_status)%> :
|
||||||
<select name="history[status_id]">
|
<select name="history[status_id]">
|
||||||
<%= options_from_collection_for_select @status_options, "id", "name" %>
|
<%= options_from_collection_for_select @status_options, "id", "name" %>
|
||||||
</select>
|
</select>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<%=l(:label_issue)%> #<%= issue.id %> - <%= issue.subject %>
|
<%=l(:label_issue)%> #<%= issue.id %> - <%= issue.subject %>
|
||||||
<%=l(:field_author)%>: <%= issue.author.display_name %>
|
<%=l(:field_author)%>: <%= issue.author.display_name %>
|
||||||
|
<%=l(:field_status)%>: <%= issue.status.name %>
|
||||||
|
|
||||||
<%= issue.description %>
|
<%= issue.description %>
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
Issue #<%= @issue.id %> has been reported.
|
||||||
|
----------------------------------------
|
||||||
|
<%= render :file => "_issue", :use_full_path => true, :locals => { :issue => @issue } %>
|
|
@ -0,0 +1,3 @@
|
||||||
|
Issue #<%= @issue.id %> has been reported.
|
||||||
|
----------------------------------------
|
||||||
|
<%= render :file => "_issue", :use_full_path => true, :locals => { :issue => @issue } %>
|
|
@ -0,0 +1,3 @@
|
||||||
|
Issue #<%= @issue.id %> has been updated to "<%= @issue.status.name %>" status.
|
||||||
|
----------------------------------------
|
||||||
|
<%= render :file => "_issue", :use_full_path => true, :locals => { :issue => @issue } %>
|
|
@ -0,0 +1,3 @@
|
||||||
|
Issue #<%= @issue.id %> has been updated to "<%= @issue.status.name %>" status.
|
||||||
|
----------------------------------------
|
||||||
|
<%= render :file => "_issue", :use_full_path => true, :locals => { :issue => @issue } %>
|
|
@ -0,0 +1,3 @@
|
||||||
|
To change your password, use the following link:
|
||||||
|
|
||||||
|
http://<%= $RDM_HOST_NAME %>/account/lost_password?token=<%= @token.value %>
|
|
@ -0,0 +1,3 @@
|
||||||
|
To change your password, use the following link:
|
||||||
|
|
||||||
|
http://<%= $RDM_HOST_NAME %>/account/lost_password?token=<%= @token.value %>
|
|
@ -0,0 +1,3 @@
|
||||||
|
To activate your redMine account, use the following link:
|
||||||
|
|
||||||
|
http://<%= $RDM_HOST_NAME %>/account/register?token=<%= @token.value %>
|
|
@ -0,0 +1,3 @@
|
||||||
|
To activate your redMine account, use the following link:
|
||||||
|
|
||||||
|
http://<%= $RDM_HOST_NAME %>/account/register?token=<%= @token.value %>
|
|
@ -0,0 +1,10 @@
|
||||||
|
<% pdf=IfpdfHelper::IFPDF.new
|
||||||
|
pdf.AliasNbPages
|
||||||
|
pdf.AddPage
|
||||||
|
@issues.each {|i|
|
||||||
|
render :partial => 'issues/pdf', :locals => { :pdf => pdf, :issue => i }
|
||||||
|
pdf.AddPage
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
|
||||||
|
<%= pdf.Output %>
|
|
@ -1,4 +1,10 @@
|
||||||
<h2><%=l(:label_issue_plural)%></h2>
|
<h2><%=l(:label_issue_plural)%></h2>
|
||||||
|
<div class="topright">
|
||||||
|
<small>
|
||||||
|
<%= link_to 'PDF ', :action => 'export_issues_pdf', :id => @project %> |
|
||||||
|
<%= link_to 'CSV ', :action => 'export_issues_csv', :id => @project %>
|
||||||
|
</small>
|
||||||
|
</div>
|
||||||
|
|
||||||
<form method="post" class="noborder">
|
<form method="post" class="noborder">
|
||||||
<table cellpadding=2>
|
<table cellpadding=2>
|
||||||
|
@ -8,6 +14,7 @@
|
||||||
<td><small><%=l(:field_priority)%>:</small><br /><%= search_filter_tag 'priority_id', :class => 'select-small' %></td>
|
<td><small><%=l(:field_priority)%>:</small><br /><%= search_filter_tag 'priority_id', :class => 'select-small' %></td>
|
||||||
<td><small><%=l(:field_category)%>:</small><br /><%= search_filter_tag 'category_id', :class => 'select-small' %></td>
|
<td><small><%=l(:field_category)%>:</small><br /><%= search_filter_tag 'category_id', :class => 'select-small' %></td>
|
||||||
<td><small><%=l(:field_fixed_version)%>:</small><br /><%= search_filter_tag 'fixed_version_id', :class => 'select-small' %></td>
|
<td><small><%=l(:field_fixed_version)%>:</small><br /><%= search_filter_tag 'fixed_version_id', :class => 'select-small' %></td>
|
||||||
|
<td><small><%=l(:field_author)%>:</small><br /><%= search_filter_tag 'author_id', :class => 'select-small' %></td>
|
||||||
<td><small><%=l(:field_assigned_to)%>:</small><br /><%= search_filter_tag 'assigned_to_id', :class => 'select-small' %></td>
|
<td><small><%=l(:field_assigned_to)%>:</small><br /><%= search_filter_tag 'assigned_to_id', :class => 'select-small' %></td>
|
||||||
<td><small><%=l(:label_subproject_plural)%>:</small><br /><%= search_filter_tag 'subproject_id', :class => 'select-small' %></td>
|
<td><small><%=l(:label_subproject_plural)%>:</small><br /><%= search_filter_tag 'subproject_id', :class => 'select-small' %></td>
|
||||||
<td valign="bottom">
|
<td valign="bottom">
|
||||||
|
@ -22,13 +29,21 @@
|
||||||
<%= end_form_tag %>
|
<%= end_form_tag %>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<%= start_form_tag ({:controller => 'projects', :action => 'move_issues', :id => @project}, :id => 'issues_form' ) %>
|
|
||||||
<table class="listTableContent">
|
<table class="listTableContent">
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="6" align="left"><small><%= check_all_links 'issues_form' %></small></td>
|
<td colspan="6" align="left"><small><%= check_all_links 'issues_form' %></small></td>
|
||||||
<td colspan="2" align="right"><small><%= link_to l(:label_export_csv), :action => 'export_issues_csv', :id => @project.id %></small></td>
|
<td colspan="2" align="right">
|
||||||
</tr>
|
<small><%= l(:label_per_page) %>:</small>
|
||||||
|
<%= start_form_tag %>
|
||||||
|
<%= select_tag 'per_page', options_for_select(@results_per_page_options, @results_per_page), :class => 'select-small'%>
|
||||||
|
<%= submit_tag l(:button_apply), :class => 'button-small'%>
|
||||||
|
<%= end_form_tag %>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<%= start_form_tag ({:controller => 'projects', :action => 'move_issues', :id => @project}, :id => 'issues_form' ) %>
|
||||||
|
<table class="listTableContent">
|
||||||
|
|
||||||
<tr class="ListHead">
|
<tr class="ListHead">
|
||||||
<td></td>
|
<td></td>
|
||||||
<%= sort_header_tag('issues.id', :caption => '#') %>
|
<%= sort_header_tag('issues.id', :caption => '#') %>
|
||||||
|
|
|
@ -1,22 +1,20 @@
|
||||||
<h2><%=l(:label_report_plural)%></h2>
|
<h2><%=l(:label_report_plural)%></h2>
|
||||||
|
|
||||||
<div class="splitcontentleft">
|
<div class="splitcontentleft">
|
||||||
<strong><%=l(:field_tracker)%></strong>
|
<strong><%=l(:field_tracker)%></strong> <small>[ <%= link_to l(:label_details), :detail => 'author' %> ]</small>
|
||||||
<%= render :partial => 'simple', :locals => { :data => @issues_by_tracker, :field_name => "tracker_id", :rows => @trackers } %>
|
<%= render :partial => 'simple', :locals => { :data => @issues_by_tracker, :field_name => "tracker_id", :rows => @trackers } %>
|
||||||
<p align="right"><small><%= link_to l(:label_details), :detail => 'tracker' %></small> </p>
|
<br />
|
||||||
|
<strong><%=l(:field_priority)%></strong> <small>[ <%= link_to l(:label_details), :detail => 'priority' %> ]</small>
|
||||||
<strong><%=l(:field_priority)%></strong>
|
|
||||||
<%= render :partial => 'simple', :locals => { :data => @issues_by_priority, :field_name => "priority_id", :rows => @priorities } %>
|
<%= render :partial => 'simple', :locals => { :data => @issues_by_priority, :field_name => "priority_id", :rows => @priorities } %>
|
||||||
<p align="right"><small><%= link_to l(:label_details), :detail => 'priority' %></small> </p>
|
<br />
|
||||||
|
<strong><%=l(:field_author)%></strong> <small>[ <%= link_to l(:label_details), :detail => 'author' %> ]</small>
|
||||||
<strong><%=l(:field_author)%></strong>
|
|
||||||
<%= render :partial => 'simple', :locals => { :data => @issues_by_author, :field_name => "author_id", :rows => @authors } %>
|
<%= render :partial => 'simple', :locals => { :data => @issues_by_author, :field_name => "author_id", :rows => @authors } %>
|
||||||
<p align="right"><small><%= link_to l(:label_details), :detail => 'author' %></small> </p>
|
<br />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="splitcontentright">
|
<div class="splitcontentright">
|
||||||
<strong><%=l(:field_category)%></strong>
|
<strong><%=l(:field_category)%></strong> <small>[ <%= link_to l(:label_details), :detail => 'category' %> ]</small>
|
||||||
<%= render :partial => 'simple', :locals => { :data => @issues_by_category, :field_name => "category_id", :rows => @categories } %>
|
<%= render :partial => 'simple', :locals => { :data => @issues_by_category, :field_name => "category_id", :rows => @categories } %>
|
||||||
<p align="right"><small><%= link_to l(:label_details), :detail => 'category' %></small> </p>
|
<br />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
class ExportPdf < ActiveRecord::Migration
|
||||||
|
def self.up
|
||||||
|
Permission.create :controller => "projects", :action => "export_issues_pdf", :description => "label_export_pdf", :sort => 1002, :is_public => true, :mail_option => 0, :mail_enabled => 0
|
||||||
|
Permission.create :controller => "issues", :action => "export_pdf", :description => "label_export_pdf", :sort => 1015, :is_public => true, :mail_option => 0, :mail_enabled => 0
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.down
|
||||||
|
Permission.find(:first, :conditions => ["controller=? and action=?", 'projects', 'export_issues_pdf']).destroy
|
||||||
|
Permission.find(:first, :conditions => ["controller=? and action=?", 'issues', 'export_pdf']).destroy
|
||||||
|
end
|
||||||
|
end
|
|
@ -44,6 +44,7 @@ general_text_Yes: 'Ja'
|
||||||
general_text_no: 'nein'
|
general_text_no: 'nein'
|
||||||
general_text_yes: 'ja'
|
general_text_yes: 'ja'
|
||||||
general_lang_de: 'Deutsch'
|
general_lang_de: 'Deutsch'
|
||||||
|
general_csv_separator: ';'
|
||||||
|
|
||||||
notice_account_updated: Konto wurde erfolgreich aktualisiert.
|
notice_account_updated: Konto wurde erfolgreich aktualisiert.
|
||||||
notice_account_invalid_creditentials: Unzulässiger Benutzer oder Passwort
|
notice_account_invalid_creditentials: Unzulässiger Benutzer oder Passwort
|
||||||
|
@ -225,6 +226,7 @@ label_version_new: Neue Version
|
||||||
label_version_plural: Versionen
|
label_version_plural: Versionen
|
||||||
label_confirmation: Bestätigung
|
label_confirmation: Bestätigung
|
||||||
#label_export_csv: Export to CSV
|
#label_export_csv: Export to CSV
|
||||||
|
#label_export_pdf: Export to PDF
|
||||||
label_read: Lesen...
|
label_read: Lesen...
|
||||||
label_public_projects: Öffentliche Projekte
|
label_public_projects: Öffentliche Projekte
|
||||||
#label_open_issues: Open
|
#label_open_issues: Open
|
||||||
|
@ -242,6 +244,7 @@ label_previous: Zurück
|
||||||
label_used_by: Benutzt von
|
label_used_by: Benutzt von
|
||||||
#label_details: Details...
|
#label_details: Details...
|
||||||
#label_add_note: Add a note
|
#label_add_note: Add a note
|
||||||
|
#label_per_page: Per page
|
||||||
|
|
||||||
button_login: Einloggen
|
button_login: Einloggen
|
||||||
button_submit: Einreichen
|
button_submit: Einreichen
|
||||||
|
|
|
@ -44,6 +44,7 @@ general_text_Yes: 'Yes'
|
||||||
general_text_no: 'no'
|
general_text_no: 'no'
|
||||||
general_text_yes: 'yes'
|
general_text_yes: 'yes'
|
||||||
general_lang_en: 'English'
|
general_lang_en: 'English'
|
||||||
|
general_csv_separator: ','
|
||||||
|
|
||||||
notice_account_updated: Account was successfully updated.
|
notice_account_updated: Account was successfully updated.
|
||||||
notice_account_invalid_creditentials: Invalid user or password
|
notice_account_invalid_creditentials: Invalid user or password
|
||||||
|
@ -225,6 +226,7 @@ label_version_new: New version
|
||||||
label_version_plural: Versions
|
label_version_plural: Versions
|
||||||
label_confirmation: Confirmation
|
label_confirmation: Confirmation
|
||||||
label_export_csv: Export to CSV
|
label_export_csv: Export to CSV
|
||||||
|
label_export_pdf: Export to PDF
|
||||||
label_read: Read...
|
label_read: Read...
|
||||||
label_public_projects: Public projects
|
label_public_projects: Public projects
|
||||||
label_open_issues: Open
|
label_open_issues: Open
|
||||||
|
@ -242,6 +244,7 @@ label_previous: Previous
|
||||||
label_used_by: Used by
|
label_used_by: Used by
|
||||||
label_details: Details...
|
label_details: Details...
|
||||||
label_add_note: Add a note
|
label_add_note: Add a note
|
||||||
|
label_per_page: Per page
|
||||||
|
|
||||||
button_login: Login
|
button_login: Login
|
||||||
button_submit: Submit
|
button_submit: Submit
|
||||||
|
|
|
@ -44,6 +44,7 @@ general_text_Yes: 'Sí'
|
||||||
general_text_no: 'no'
|
general_text_no: 'no'
|
||||||
general_text_yes: 'sí'
|
general_text_yes: 'sí'
|
||||||
general_lang_es: 'Español'
|
general_lang_es: 'Español'
|
||||||
|
general_csv_separator: ';'
|
||||||
|
|
||||||
notice_account_updated: Account was successfully updated.
|
notice_account_updated: Account was successfully updated.
|
||||||
notice_account_invalid_creditentials: Invalid user or password
|
notice_account_invalid_creditentials: Invalid user or password
|
||||||
|
@ -225,6 +226,7 @@ label_version_new: Nueva versión
|
||||||
label_version_plural: Versiónes
|
label_version_plural: Versiónes
|
||||||
label_confirmation: Confirmación
|
label_confirmation: Confirmación
|
||||||
label_export_csv: Exportar a CSV
|
label_export_csv: Exportar a CSV
|
||||||
|
label_export_pdf: Exportar a PDF
|
||||||
label_read: Leer...
|
label_read: Leer...
|
||||||
label_public_projects: Proyectos publicos
|
label_public_projects: Proyectos publicos
|
||||||
label_open_issues: Abierta
|
label_open_issues: Abierta
|
||||||
|
@ -242,6 +244,7 @@ label_previous: Precedente
|
||||||
label_used_by: Utilizado por
|
label_used_by: Utilizado por
|
||||||
#label_details: Details...
|
#label_details: Details...
|
||||||
#label_add_note: Add a note
|
#label_add_note: Add a note
|
||||||
|
#label_per_page: Per page
|
||||||
|
|
||||||
button_login: Conexión
|
button_login: Conexión
|
||||||
button_submit: Someter
|
button_submit: Someter
|
||||||
|
|
|
@ -44,6 +44,7 @@ general_text_Yes: 'Oui'
|
||||||
general_text_no: 'non'
|
general_text_no: 'non'
|
||||||
general_text_yes: 'oui'
|
general_text_yes: 'oui'
|
||||||
general_lang_fr: 'Français'
|
general_lang_fr: 'Français'
|
||||||
|
general_csv_separator: ';'
|
||||||
|
|
||||||
notice_account_updated: Le compte a été mis à jour avec succès.
|
notice_account_updated: Le compte a été mis à jour avec succès.
|
||||||
notice_account_invalid_creditentials: Identifiant ou mot de passe invalide.
|
notice_account_invalid_creditentials: Identifiant ou mot de passe invalide.
|
||||||
|
@ -225,6 +226,7 @@ label_version_new: Nouvelle version
|
||||||
label_version_plural: Versions
|
label_version_plural: Versions
|
||||||
label_confirmation: Confirmation
|
label_confirmation: Confirmation
|
||||||
label_export_csv: Exporter en CSV
|
label_export_csv: Exporter en CSV
|
||||||
|
label_export_pdf: Exporter en PDF
|
||||||
label_read: Lire...
|
label_read: Lire...
|
||||||
label_public_projects: Projets publics
|
label_public_projects: Projets publics
|
||||||
label_open_issues: Ouverte
|
label_open_issues: Ouverte
|
||||||
|
@ -242,6 +244,7 @@ label_previous: Précédent
|
||||||
label_used_by: Utilisé par
|
label_used_by: Utilisé par
|
||||||
label_details: Détails...
|
label_details: Détails...
|
||||||
label_add_note: Ajouter une note
|
label_add_note: Ajouter une note
|
||||||
|
label_per_page: Par page
|
||||||
|
|
||||||
button_login: Connexion
|
button_login: Connexion
|
||||||
button_submit: Soumettre
|
button_submit: Soumettre
|
||||||
|
|
|
@ -205,10 +205,14 @@ input.button-small
|
||||||
font-size: 0.8em;
|
font-size: 0.8em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
select {
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
select.select-small
|
select.select-small
|
||||||
{
|
{
|
||||||
border: 1px solid #7F9DB9;
|
border: 1px solid #7F9DB9;
|
||||||
padding: 1px;
|
padding: 1px;
|
||||||
font-size: 0.8em;
|
font-size: 0.8em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -244,7 +248,7 @@ table.listTableContent {
|
||||||
}
|
}
|
||||||
|
|
||||||
table.listTableContent td {
|
table.listTableContent td {
|
||||||
padding:4px;
|
padding:2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
tr.ListHead {
|
tr.ListHead {
|
||||||
|
@ -366,6 +370,12 @@ color:#505050;
|
||||||
line-height:1.5em;
|
line-height:1.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.topright{
|
||||||
|
position: absolute;
|
||||||
|
right: 25px;
|
||||||
|
top: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
.login {
|
.login {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
|
Loading…
Reference in New Issue