summaryrefslogtreecommitdiffstats
path: root/redmine
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2006-10-22 14:47:25 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2006-10-22 14:47:25 +0000
commit51e0989c491972578d3f3bb241df8f7dbee4c1ea (patch)
treec535e0ad1615d12ffe70241f814e98133bdda210 /redmine
parent79cbe8d199c3b6ad30e912164fd1294ad9a8acff (diff)
downloadredmine-51e0989c491972578d3f3bb241df8f7dbee4c1ea.tar.gz
redmine-51e0989c491972578d3f3bb241df8f7dbee4c1ea.zip
* 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
Diffstat (limited to 'redmine')
-rw-r--r--redmine/app/controllers/application.rb2
-rw-r--r--redmine/app/controllers/issues_controller.rb10
-rw-r--r--redmine/app/controllers/projects_controller.rb56
-rw-r--r--redmine/app/helpers/application_helper.rb4
-rw-r--r--redmine/app/helpers/custom_fields_helper.rb4
-rw-r--r--redmine/app/helpers/ifpdf_helper.rb43
-rw-r--r--redmine/app/helpers/search_filter_helper.rb5
-rw-r--r--redmine/app/models/enumeration.rb4
-rw-r--r--redmine/app/models/issue.rb5
-rw-r--r--redmine/app/models/project.rb5
-rw-r--r--redmine/app/views/documents/show.rhtml2
-rw-r--r--redmine/app/views/enumerations/new.rhtml2
-rw-r--r--redmine/app/views/issues/_pdf.rfpdf95
-rw-r--r--redmine/app/views/issues/export_pdf.rfpdf8
-rw-r--r--redmine/app/views/issues/show.rhtml22
-rw-r--r--redmine/app/views/mailer/_issue.rhtml1
-rw-r--r--redmine/app/views/mailer/issue_add_de.rhtml3
-rw-r--r--redmine/app/views/mailer/issue_add_es.rhtml3
-rw-r--r--redmine/app/views/mailer/issue_change_status_de.rhtml3
-rw-r--r--redmine/app/views/mailer/issue_change_status_es.rhtml3
-rw-r--r--redmine/app/views/mailer/lost_password_de.rhtml3
-rw-r--r--redmine/app/views/mailer/lost_password_es.rhtml3
-rw-r--r--redmine/app/views/mailer/register_de.rhtml3
-rw-r--r--redmine/app/views/mailer/register_es.rhtml3
-rw-r--r--redmine/app/views/projects/export_issues_pdf.rfpdf10
-rw-r--r--redmine/app/views/projects/list_issues.rhtml23
-rw-r--r--redmine/app/views/reports/issue_report.rhtml18
-rw-r--r--redmine/db/migrate/004_export_pdf.rb11
-rw-r--r--redmine/lang/de.yml3
-rw-r--r--redmine/lang/en.yml3
-rw-r--r--redmine/lang/es.yml3
-rw-r--r--redmine/lang/fr.yml3
-rw-r--r--redmine/public/stylesheets/application.css14
33 files changed, 339 insertions, 41 deletions
diff --git a/redmine/app/controllers/application.rb b/redmine/app/controllers/application.rb
index 3061359b2..e1e842b0b 100644
--- a/redmine/app/controllers/application.rb
+++ b/redmine/app/controllers/application.rb
@@ -88,7 +88,7 @@ class ApplicationController < ActionController::Base
render :nothing => true, :status => 403
false
end
-
+
# store current uri in session.
# return to this location by calling redirect_back_or_default
def store_location
diff --git a/redmine/app/controllers/issues_controller.rb b/redmine/app/controllers/issues_controller.rb
index effd3145e..45a618b01 100644
--- a/redmine/app/controllers/issues_controller.rb
+++ b/redmine/app/controllers/issues_controller.rb
@@ -16,15 +16,23 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class IssuesController < ApplicationController
- layout 'base'
+ layout 'base', :except => :export_pdf
before_filter :find_project, :authorize
helper :custom_fields
include CustomFieldsHelper
+ helper :ifpdf
+ include IfpdfHelper
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
@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
def edit
diff --git a/redmine/app/controllers/projects_controller.rb b/redmine/app/controllers/projects_controller.rb
index a3dac1e04..1d38aad7c 100644
--- a/redmine/app/controllers/projects_controller.rb
+++ b/redmine/app/controllers/projects_controller.rb
@@ -16,7 +16,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class ProjectsController < ApplicationController
- layout 'base'
+ layout 'base', :except => :export_issues_pdf
before_filter :find_project, :authorize, :except => [ :index, :list, :add ]
before_filter :require_admin, :only => [ :add, :destroy ]
@@ -26,7 +26,9 @@ class ProjectsController < ApplicationController
include SearchFilterHelper
helper :custom_fields
include CustomFieldsHelper
-
+ helper :ifpdf
+ include IfpdfHelper
+
def index
list
render :action => 'list' unless request.xhr?
@@ -208,15 +210,23 @@ class ProjectsController < ApplicationController
search_filter_init_list_issues
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_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,
:include => [ :author, :status, :tracker, :project ],
:conditions => search_filter_clause,
:limit => @issue_pages.items_per_page,
:offset => @issue_pages.current.offset
- render :action => "list_issues", :layout => false if request.xhr?
+ render :layout => false if request.xhr?
end
# Export filtered/sorted issues list to CSV
@@ -227,20 +237,44 @@ class ProjectsController < ApplicationController
search_filter_init_list_issues
@issues = Issue.find :all, :order => sort_clause,
- :include => [ :author, :status, :tracker, :project ],
+ :include => [ :author, :status, :tracker, :project, :custom_values ],
:conditions => search_filter_clause
+ ic = Iconv.new('ISO-8859-1', 'UTF-8')
export = StringIO.new
- CSV::Writer.generate(export, ',') do |csv|
- csv << %w(Id Status Tracker Subject Author Created Updated)
+ CSV::Writer.generate(export, l(:general_csv_separator)) do |csv|
+ # 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|
- 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
export.rewind
- send_data(export.read,
- :type => 'text/csv; charset=utf-8; header=present',
- :filename => 'export.csv')
+ send_data(export.read, :type => 'text/csv; header=present', :filename => 'export.csv')
+ end
+
+ # 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
def move_issues
diff --git a/redmine/app/helpers/application_helper.rb b/redmine/app/helpers/application_helper.rb
index 4dc4acc27..835ac4859 100644
--- a/redmine/app/helpers/application_helper.rb
+++ b/redmine/app/helpers/application_helper.rb
@@ -49,7 +49,7 @@ module ApplicationHelper
def link_to_user(user)
link_to user.display_name, :controller => 'account', :action => 'show', :id => user
end
-
+
def format_date(date)
l_date(date) if date
end
@@ -57,7 +57,7 @@ module ApplicationHelper
def format_time(time)
l_datetime(time) if time
end
-
+
def pagination_links_full(paginator, options={}, html_options={})
html = ''
html << link_to_remote(('&#171; ' + l(:label_previous)),
diff --git a/redmine/app/helpers/custom_fields_helper.rb b/redmine/app/helpers/custom_fields_helper.rb
index ac8b55565..8eb16de0d 100644
--- a/redmine/app/helpers/custom_fields_helper.rb
+++ b/redmine/app/helpers/custom_fields_helper.rb
@@ -53,9 +53,11 @@ module CustomFieldsHelper
# Return a string used to display a custom value
def show_value(custom_value)
+ return "" unless custom_value
+
case custom_value.custom_field.field_format
when "date"
- format_date(custom_value.value.to_date)
+ l_date(custom_value.value.to_date) if custom_value.value
when "bool"
l_YesNo(custom_value.value == "1")
else
diff --git a/redmine/app/helpers/ifpdf_helper.rb b/redmine/app/helpers/ifpdf_helper.rb
new file mode 100644
index 000000000..e09136db2
--- /dev/null
+++ b/redmine/app/helpers/ifpdf_helper.rb
@@ -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
diff --git a/redmine/app/helpers/search_filter_helper.rb b/redmine/app/helpers/search_filter_helper.rb
index 62ff5f291..f17ffeebf 100644
--- a/redmine/app/helpers/search_filter_helper.rb
+++ b/redmine/app/helpers/search_filter_helper.rb
@@ -86,6 +86,11 @@ module SearchFilterHelper
] + @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') {
[ [('['+l(:label_all)+']'), "A", nil],
[('['+l(:label_none)+']'), "N", ["issues.assigned_to_id is null"]]
diff --git a/redmine/app/models/enumeration.rb b/redmine/app/models/enumeration.rb
index 122da15c5..b5c8ed6e7 100644
--- a/redmine/app/models/enumeration.rb
+++ b/redmine/app/models/enumeration.rb
@@ -29,6 +29,10 @@ class Enumeration < ActiveRecord::Base
def self.get_values(option)
find(:all, :conditions => ['opt=?', option])
end
+
+ def option_name
+ OPTIONS[self.opt]
+ end
private
def check_integrity
diff --git a/redmine/app/models/issue.rb b/redmine/app/models/issue.rb
index 489dad885..9327aa7bb 100644
--- a/redmine/app/models/issue.rb
+++ b/redmine/app/models/issue.rb
@@ -53,6 +53,11 @@ class Issue < ActiveRecord::Base
def long_id
"%05d" % self.id
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
# Creates an history for the issue
diff --git a/redmine/app/models/project.rb b/redmine/app/models/project.rb
index ee848cb30..ae7436910 100644
--- a/redmine/app/models/project.rb
+++ b/redmine/app/models/project.rb
@@ -43,6 +43,11 @@ class Project < ActiveRecord::Base
:conditions => ["is_for_all=? or project_id=?", true, self.id])
#(CustomField.for_all + custom_fields).uniq
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
def validate
diff --git a/redmine/app/views/documents/show.rhtml b/redmine/app/views/documents/show.rhtml
index 89693de89..2b8da670f 100644
--- a/redmine/app/views/documents/show.rhtml
+++ b/redmine/app/views/documents/show.rhtml
@@ -18,7 +18,7 @@
<br /><br />
-<table class="listTableContent">
+<table class="reportTableContent">
<% for attachment in @attachments %>
<tr class="<%= cycle("odd", "even") %>">
<td><%= format_date(attachment.created_on) %></td>
diff --git a/redmine/app/views/enumerations/new.rhtml b/redmine/app/views/enumerations/new.rhtml
index aa0e68173..0a773519d 100644
--- a/redmine/app/views/enumerations/new.rhtml
+++ b/redmine/app/views/enumerations/new.rhtml
@@ -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") %>
<%= render :partial => 'form' %>
diff --git a/redmine/app/views/issues/_pdf.rfpdf b/redmine/app/views/issues/_pdf.rfpdf
new file mode 100644
index 000000000..d12db0a23
--- /dev/null
+++ b/redmine/app/views/issues/_pdf.rfpdf
@@ -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
+%> \ No newline at end of file
diff --git a/redmine/app/views/issues/export_pdf.rfpdf b/redmine/app/views/issues/export_pdf.rfpdf
new file mode 100644
index 000000000..b3756d8c7
--- /dev/null
+++ b/redmine/app/views/issues/export_pdf.rfpdf
@@ -0,0 +1,8 @@
+<% pdf=IfpdfHelper::IFPDF.new
+ pdf.AliasNbPages
+ pdf.AddPage
+
+ render :partial => 'issues/pdf', :locals => { :pdf => pdf, :issue => @issue }
+%>
+
+<%= pdf.Output %> \ No newline at end of file
diff --git a/redmine/app/views/issues/show.rhtml b/redmine/app/views/issues/show.rhtml
index 3c1a0ed98..d6658bf43 100644
--- a/redmine/app/views/issues/show.rhtml
+++ b/redmine/app/views/issues/show.rhtml
@@ -1,4 +1,9 @@
<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">
<p>
@@ -7,15 +12,18 @@
<b><%=l(:field_assigned_to)%> :</b> <%= @issue.assigned_to ? @issue.assigned_to.display_name : "-" %> &nbsp &nbsp
<b><%=l(:field_category)%> :</b> <%= @issue.category ? @issue.category.name : "-" %>
</p>
-<p><b><%=l(:field_author)%> :</b> <%= @issue.author.display_name %></p>
-<p><b><%=l(:field_subject)%> :</b> <%= @issue.subject %></p>
-<p><b><%=l(:field_description)%> :</b> <%= simple_format auto_link @issue.description %></p>
-<p><b><%=l(:field_due_date)%> :</b> <%= format_date(@issue.due_date) %></p>
-<p><b><%=l(:field_created_on)%> :</b> <%= format_date(@issue.created_on) %></p>
+<div class="tabular">
+<p><label><%=l(:field_author)%> :</label> <%= link_to_user @issue.author %>&nbsp;</p>
+<p><label><%=l(:field_created_on)%> :</label> <%= format_date(@issue.created_on) %>&nbsp;</p>
+<p><label><%=l(:field_subject)%> :</label> <%= @issue.subject %>&nbsp;</p>
+<%= simple_format ("<label>" + l(:field_description) + ": </label>" + auto_link(@issue.description)) %>
+<p><label><%=l(:field_due_date)%> :</label> <%= format_date(@issue.due_date) %>&nbsp;</p>
<% 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 %>
+&nbsp;
+</div>
<% if authorize_for('issues', 'edit') %>
<%= 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? %>
<%= 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]">
<%= options_from_collection_for_select @status_options, "id", "name" %>
</select>
diff --git a/redmine/app/views/mailer/_issue.rhtml b/redmine/app/views/mailer/_issue.rhtml
index 57acb4b8d..c123ae30c 100644
--- a/redmine/app/views/mailer/_issue.rhtml
+++ b/redmine/app/views/mailer/_issue.rhtml
@@ -1,5 +1,6 @@
<%=l(:label_issue)%> #<%= issue.id %> - <%= issue.subject %>
<%=l(:field_author)%>: <%= issue.author.display_name %>
+<%=l(:field_status)%>: <%= issue.status.name %>
<%= issue.description %>
diff --git a/redmine/app/views/mailer/issue_add_de.rhtml b/redmine/app/views/mailer/issue_add_de.rhtml
new file mode 100644
index 000000000..9efec9ad9
--- /dev/null
+++ b/redmine/app/views/mailer/issue_add_de.rhtml
@@ -0,0 +1,3 @@
+Issue #<%= @issue.id %> has been reported.
+----------------------------------------
+<%= render :file => "_issue", :use_full_path => true, :locals => { :issue => @issue } %> \ No newline at end of file
diff --git a/redmine/app/views/mailer/issue_add_es.rhtml b/redmine/app/views/mailer/issue_add_es.rhtml
new file mode 100644
index 000000000..9efec9ad9
--- /dev/null
+++ b/redmine/app/views/mailer/issue_add_es.rhtml
@@ -0,0 +1,3 @@
+Issue #<%= @issue.id %> has been reported.
+----------------------------------------
+<%= render :file => "_issue", :use_full_path => true, :locals => { :issue => @issue } %> \ No newline at end of file
diff --git a/redmine/app/views/mailer/issue_change_status_de.rhtml b/redmine/app/views/mailer/issue_change_status_de.rhtml
new file mode 100644
index 000000000..e3612ea81
--- /dev/null
+++ b/redmine/app/views/mailer/issue_change_status_de.rhtml
@@ -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 } %> \ No newline at end of file
diff --git a/redmine/app/views/mailer/issue_change_status_es.rhtml b/redmine/app/views/mailer/issue_change_status_es.rhtml
new file mode 100644
index 000000000..e3612ea81
--- /dev/null
+++ b/redmine/app/views/mailer/issue_change_status_es.rhtml
@@ -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 } %> \ No newline at end of file
diff --git a/redmine/app/views/mailer/lost_password_de.rhtml b/redmine/app/views/mailer/lost_password_de.rhtml
new file mode 100644
index 000000000..2593edbda
--- /dev/null
+++ b/redmine/app/views/mailer/lost_password_de.rhtml
@@ -0,0 +1,3 @@
+To change your password, use the following link:
+
+http://<%= $RDM_HOST_NAME %>/account/lost_password?token=<%= @token.value %> \ No newline at end of file
diff --git a/redmine/app/views/mailer/lost_password_es.rhtml b/redmine/app/views/mailer/lost_password_es.rhtml
new file mode 100644
index 000000000..2593edbda
--- /dev/null
+++ b/redmine/app/views/mailer/lost_password_es.rhtml
@@ -0,0 +1,3 @@
+To change your password, use the following link:
+
+http://<%= $RDM_HOST_NAME %>/account/lost_password?token=<%= @token.value %> \ No newline at end of file
diff --git a/redmine/app/views/mailer/register_de.rhtml b/redmine/app/views/mailer/register_de.rhtml
new file mode 100644
index 000000000..2c0341b24
--- /dev/null
+++ b/redmine/app/views/mailer/register_de.rhtml
@@ -0,0 +1,3 @@
+To activate your redMine account, use the following link:
+
+http://<%= $RDM_HOST_NAME %>/account/register?token=<%= @token.value %> \ No newline at end of file
diff --git a/redmine/app/views/mailer/register_es.rhtml b/redmine/app/views/mailer/register_es.rhtml
new file mode 100644
index 000000000..2c0341b24
--- /dev/null
+++ b/redmine/app/views/mailer/register_es.rhtml
@@ -0,0 +1,3 @@
+To activate your redMine account, use the following link:
+
+http://<%= $RDM_HOST_NAME %>/account/register?token=<%= @token.value %> \ No newline at end of file
diff --git a/redmine/app/views/projects/export_issues_pdf.rfpdf b/redmine/app/views/projects/export_issues_pdf.rfpdf
new file mode 100644
index 000000000..46af75507
--- /dev/null
+++ b/redmine/app/views/projects/export_issues_pdf.rfpdf
@@ -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 %> \ No newline at end of file
diff --git a/redmine/app/views/projects/list_issues.rhtml b/redmine/app/views/projects/list_issues.rhtml
index 6cd5f8070..3075d077a 100644
--- a/redmine/app/views/projects/list_issues.rhtml
+++ b/redmine/app/views/projects/list_issues.rhtml
@@ -1,4 +1,10 @@
<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">
<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_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_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(:label_subproject_plural)%>:</small><br /><%= search_filter_tag 'subproject_id', :class => 'select-small' %></td>
<td valign="bottom">
@@ -22,13 +29,21 @@
<%= end_form_tag %>
&nbsp;
-
-<%= start_form_tag ({:controller => 'projects', :action => 'move_issues', :id => @project}, :id => 'issues_form' ) %>
<table class="listTableContent">
<tr>
<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>
- </tr>
+ <td colspan="2" align="right">
+ <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">
<td></td>
<%= sort_header_tag('issues.id', :caption => '#') %>
diff --git a/redmine/app/views/reports/issue_report.rhtml b/redmine/app/views/reports/issue_report.rhtml
index e2f8a844d..c13ea8c1b 100644
--- a/redmine/app/views/reports/issue_report.rhtml
+++ b/redmine/app/views/reports/issue_report.rhtml
@@ -1,22 +1,20 @@
<h2><%=l(:label_report_plural)%></h2>
<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 } %>
-<p align="right"><small><%= link_to l(:label_details), :detail => 'tracker' %></small>&nbsp;</p>
-
-<strong><%=l(:field_priority)%></strong>
+<br />
+<strong><%=l(:field_priority)%></strong> <small>[ <%= link_to l(:label_details), :detail => 'priority' %> ]</small>
<%= 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>&nbsp;</p>
-
-<strong><%=l(:field_author)%></strong>
+<br />
+<strong><%=l(:field_author)%></strong> <small>[ <%= link_to l(:label_details), :detail => 'author' %> ]</small>
<%= 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>&nbsp;</p>
+<br />
</div>
<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 } %>
-<p align="right"><small><%= link_to l(:label_details), :detail => 'category' %></small>&nbsp;</p>
+<br />
</div>
diff --git a/redmine/db/migrate/004_export_pdf.rb b/redmine/db/migrate/004_export_pdf.rb
new file mode 100644
index 000000000..66045553f
--- /dev/null
+++ b/redmine/db/migrate/004_export_pdf.rb
@@ -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
diff --git a/redmine/lang/de.yml b/redmine/lang/de.yml
index f2dcf8994..f644fed6e 100644
--- a/redmine/lang/de.yml
+++ b/redmine/lang/de.yml
@@ -44,6 +44,7 @@ general_text_Yes: 'Ja'
general_text_no: 'nein'
general_text_yes: 'ja'
general_lang_de: 'Deutsch'
+general_csv_separator: ';'
notice_account_updated: Konto wurde erfolgreich aktualisiert.
notice_account_invalid_creditentials: Unzulässiger Benutzer oder Passwort
@@ -225,6 +226,7 @@ label_version_new: Neue Version
label_version_plural: Versionen
label_confirmation: Bestätigung
#label_export_csv: Export to CSV
+#label_export_pdf: Export to PDF
label_read: Lesen...
label_public_projects: Öffentliche Projekte
#label_open_issues: Open
@@ -242,6 +244,7 @@ label_previous: Zurück
label_used_by: Benutzt von
#label_details: Details...
#label_add_note: Add a note
+#label_per_page: Per page
button_login: Einloggen
button_submit: Einreichen
diff --git a/redmine/lang/en.yml b/redmine/lang/en.yml
index b02038ea9..3e0923bc5 100644
--- a/redmine/lang/en.yml
+++ b/redmine/lang/en.yml
@@ -44,6 +44,7 @@ general_text_Yes: 'Yes'
general_text_no: 'no'
general_text_yes: 'yes'
general_lang_en: 'English'
+general_csv_separator: ','
notice_account_updated: Account was successfully updated.
notice_account_invalid_creditentials: Invalid user or password
@@ -225,6 +226,7 @@ label_version_new: New version
label_version_plural: Versions
label_confirmation: Confirmation
label_export_csv: Export to CSV
+label_export_pdf: Export to PDF
label_read: Read...
label_public_projects: Public projects
label_open_issues: Open
@@ -242,6 +244,7 @@ label_previous: Previous
label_used_by: Used by
label_details: Details...
label_add_note: Add a note
+label_per_page: Per page
button_login: Login
button_submit: Submit
diff --git a/redmine/lang/es.yml b/redmine/lang/es.yml
index 5b2f69e07..0bf958019 100644
--- a/redmine/lang/es.yml
+++ b/redmine/lang/es.yml
@@ -44,6 +44,7 @@ general_text_Yes: 'Sí'
general_text_no: 'no'
general_text_yes: 'sí'
general_lang_es: 'Español'
+general_csv_separator: ';'
notice_account_updated: Account was successfully updated.
notice_account_invalid_creditentials: Invalid user or password
@@ -225,6 +226,7 @@ label_version_new: Nueva versión
label_version_plural: Versiónes
label_confirmation: Confirmación
label_export_csv: Exportar a CSV
+label_export_pdf: Exportar a PDF
label_read: Leer...
label_public_projects: Proyectos publicos
label_open_issues: Abierta
@@ -242,6 +244,7 @@ label_previous: Precedente
label_used_by: Utilizado por
#label_details: Details...
#label_add_note: Add a note
+#label_per_page: Per page
button_login: Conexión
button_submit: Someter
diff --git a/redmine/lang/fr.yml b/redmine/lang/fr.yml
index c5071a2c5..81d43f747 100644
--- a/redmine/lang/fr.yml
+++ b/redmine/lang/fr.yml
@@ -44,6 +44,7 @@ general_text_Yes: 'Oui'
general_text_no: 'non'
general_text_yes: 'oui'
general_lang_fr: 'Français'
+general_csv_separator: ';'
notice_account_updated: Le compte a été mis à jour avec succès.
notice_account_invalid_creditentials: Identifiant ou mot de passe invalide.
@@ -225,6 +226,7 @@ label_version_new: Nouvelle version
label_version_plural: Versions
label_confirmation: Confirmation
label_export_csv: Exporter en CSV
+label_export_pdf: Exporter en PDF
label_read: Lire...
label_public_projects: Projets publics
label_open_issues: Ouverte
@@ -242,6 +244,7 @@ label_previous: Précédent
label_used_by: Utilisé par
label_details: Détails...
label_add_note: Ajouter une note
+label_per_page: Par page
button_login: Connexion
button_submit: Soumettre
diff --git a/redmine/public/stylesheets/application.css b/redmine/public/stylesheets/application.css
index b93e316e4..3ca0a3150 100644
--- a/redmine/public/stylesheets/application.css
+++ b/redmine/public/stylesheets/application.css
@@ -205,10 +205,14 @@ input.button-small
font-size: 0.8em;
}
+select {
+ vertical-align: middle;
+}
+
select.select-small
{
border: 1px solid #7F9DB9;
- padding: 1px;
+ padding: 1px;
font-size: 0.8em;
}
@@ -244,7 +248,7 @@ table.listTableContent {
}
table.listTableContent td {
- padding:4px;
+ padding:2px;
}
tr.ListHead {
@@ -366,6 +370,12 @@ color:#505050;
line-height:1.5em;
}
+.topright{
+position: absolute;
+right: 25px;
+top: 100px;
+}
+
.login {
width: 50%;
text-align: left;