Compare commits
113 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
66866954f6 | ||
|
|
c9ed3fdae3 | ||
|
|
7b164b5cd4 | ||
|
|
dd54b1aacb | ||
|
|
8fa96feb1f | ||
|
|
ddd0796e40 | ||
|
|
4ef86b965b | ||
|
|
1cc6dd871b | ||
|
|
4564519a56 | ||
|
|
5a241fd12e | ||
|
|
840fcf2fa9 | ||
|
|
75e3ab737c | ||
|
|
516cedaa47 | ||
|
|
3881ade96d | ||
|
|
f4842d6eed | ||
|
|
10e77d865b | ||
|
|
92725e5803 | ||
|
|
73510949ba | ||
|
|
08ff4dfb21 | ||
|
|
2e72f2eca8 | ||
|
|
9845bbddce | ||
|
|
81b3ad5b87 | ||
|
|
6c4f196f6e | ||
|
|
022b4ae57c | ||
|
|
d185e2f9e0 | ||
|
|
2b7c31feb5 | ||
|
|
7dd312b1ac | ||
|
|
4ff7b395dd | ||
|
|
66044c620b | ||
|
|
52c1718ee8 | ||
|
|
8b180aa606 | ||
|
|
ccaf6c8df0 | ||
|
|
879a614cde | ||
|
|
8c3dc34359 | ||
|
|
f82654f158 | ||
|
|
c365614548 | ||
|
|
a3c2c4a48a | ||
|
|
8316e78667 | ||
|
|
4a988b0f92 | ||
|
|
b5e80bf90f | ||
|
|
da426fa652 | ||
|
|
39e65a41a2 | ||
|
|
1eb17b08f9 | ||
|
|
318c8717b8 | ||
|
|
7184632b84 | ||
|
|
1e4a7d55e0 | ||
|
|
5101c55e10 | ||
|
|
c1537b5291 | ||
|
|
4c767d636a | ||
|
|
aa91ca0a8d | ||
|
|
d3b831bf7b | ||
|
|
fa688d48e6 | ||
|
|
671a0fa101 | ||
|
|
99f006f2c9 | ||
|
|
f9c400a727 | ||
|
|
fe22797d69 | ||
|
|
d29ba0b80f | ||
|
|
18fd46ab6b | ||
|
|
ec7ac956e4 | ||
|
|
99c560295f | ||
|
|
90c7cf9763 | ||
|
|
3dc9ceaadf | ||
|
|
23f6185bfe | ||
|
|
1cb0294388 | ||
|
|
2d47a6d71c | ||
|
|
22c2209cf9 | ||
|
|
471679b0f0 | ||
|
|
862c9d76e6 | ||
|
|
2c187c43bf | ||
|
|
486b4e9ea2 | ||
|
|
5f361e71df | ||
|
|
13881f5a5b | ||
|
|
c38a2112c6 | ||
|
|
a9fc777b20 | ||
|
|
ab15456119 | ||
|
|
0d55613359 | ||
|
|
845460b165 | ||
|
|
7c27fb7c1d | ||
|
|
e51c20c496 | ||
|
|
190fef513f | ||
|
|
b9ef10fe3f | ||
|
|
2b9777555f | ||
|
|
1f79394ac4 | ||
|
|
e2e111f95e | ||
|
|
8985d05a66 | ||
|
|
4e03668eec | ||
|
|
2789b08dd0 | ||
|
|
66a02688ad | ||
|
|
681bbf02ae | ||
|
|
c80de840d1 | ||
|
|
bd3458da6e | ||
|
|
4ccbc65628 | ||
|
|
9a2753931b | ||
|
|
0b4d4db131 | ||
|
|
a1b12335ab | ||
|
|
a8137d5d17 | ||
|
|
1e5362b1f7 | ||
|
|
51ea8b0295 | ||
|
|
f35194e604 | ||
|
|
3ef57c1ac3 | ||
|
|
69b7f9e9a2 | ||
|
|
220641909c | ||
|
|
31bc6054a3 | ||
|
|
94391723c0 | ||
|
|
5fd3decb16 | ||
|
|
d7c015a884 | ||
|
|
8ed55e8d7a | ||
|
|
979892a109 | ||
|
|
776d5ce554 | ||
|
|
28ea323791 | ||
|
|
18787caab9 | ||
|
|
390d6023c6 | ||
|
|
e1ef9a5c72 |
@@ -1,5 +1,5 @@
|
||||
# redMine - project management software
|
||||
# Copyright (C) 2006 Jean-Philippe Lang
|
||||
# Copyright (C) 2006-2007 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
|
||||
@@ -22,7 +22,7 @@ class AccountController < ApplicationController
|
||||
|
||||
# prevents login action to be filtered by check_if_login_required application scope filter
|
||||
skip_before_filter :check_if_login_required, :only => [:login, :lost_password, :register]
|
||||
before_filter :require_login, :except => [:show, :login, :lost_password, :register]
|
||||
before_filter :require_login, :only => :logout
|
||||
|
||||
# Show user's account
|
||||
def show
|
||||
@@ -52,14 +52,15 @@ class AccountController < ApplicationController
|
||||
# Log out current user and redirect to welcome page
|
||||
def logout
|
||||
self.logged_in_user = nil
|
||||
redirect_to :controller => ''
|
||||
redirect_to :controller => 'welcome'
|
||||
end
|
||||
|
||||
# Enable user to choose a new password
|
||||
def lost_password
|
||||
redirect_to :controller => 'welcome' and return unless Setting.lost_password?
|
||||
if params[:token]
|
||||
@token = Token.find_by_action_and_value("recovery", params[:token])
|
||||
redirect_to :controller => '' and return unless @token and !@token.expired?
|
||||
redirect_to :controller => 'welcome' and return unless @token and !@token.expired?
|
||||
@user = @token.user
|
||||
if request.post?
|
||||
@user.password, @user.password_confirmation = params[:new_password], params[:new_password_confirmation]
|
||||
@@ -82,8 +83,6 @@ class AccountController < ApplicationController
|
||||
# create a new token for password recovery
|
||||
token = Token.new(:user => user, :action => "recovery")
|
||||
if token.save
|
||||
# send token to user via email
|
||||
Mailer.set_language_if_valid(user.language)
|
||||
Mailer.deliver_lost_password(token)
|
||||
flash[:notice] = l(:notice_account_lost_email_sent)
|
||||
redirect_to :action => 'login'
|
||||
@@ -95,12 +94,12 @@ class AccountController < ApplicationController
|
||||
|
||||
# User self-registration
|
||||
def register
|
||||
redirect_to :controller => '' and return if $RDM_SELF_REGISTRATION == false
|
||||
redirect_to :controller => 'welcome' and return unless Setting.self_registration?
|
||||
if params[:token]
|
||||
token = Token.find_by_action_and_value("register", params[:token])
|
||||
redirect_to :controller => '' and return unless token and !token.expired?
|
||||
redirect_to :controller => 'welcome' and return unless token and !token.expired?
|
||||
user = token.user
|
||||
redirect_to :controller => '' and return unless user.status == User::STATUS_REGISTERED
|
||||
redirect_to :controller => 'welcome' and return unless user.status == User::STATUS_REGISTERED
|
||||
user.status = User::STATUS_ACTIVE
|
||||
if user.save
|
||||
token.destroy
|
||||
@@ -110,7 +109,7 @@ class AccountController < ApplicationController
|
||||
end
|
||||
else
|
||||
if request.get?
|
||||
@user = User.new(:language => $RDM_DEFAULT_LANG)
|
||||
@user = User.new(:language => Setting.default_language)
|
||||
@custom_values = UserCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x, :customized => @user) }
|
||||
else
|
||||
@user = User.new(params[:user])
|
||||
@@ -122,10 +121,9 @@ class AccountController < ApplicationController
|
||||
@user.custom_values = @custom_values
|
||||
token = Token.new(:user => @user, :action => "register")
|
||||
if @user.save and token.save
|
||||
Mailer.set_language_if_valid(@user.language)
|
||||
Mailer.deliver_register(token)
|
||||
flash[:notice] = l(:notice_account_register_done)
|
||||
redirect_to :controller => ''
|
||||
redirect_to :controller => 'welcome' and return
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -51,6 +51,5 @@ class AdminController < ApplicationController
|
||||
end
|
||||
|
||||
def info
|
||||
@adapter_name = ActiveRecord::Base.connection.adapter_name
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# redMine - project management software
|
||||
# Copyright (C) 2006 Jean-Philippe Lang
|
||||
# Copyright (C) 2006-2007 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
|
||||
@@ -33,7 +33,7 @@ class ApplicationController < ActionController::Base
|
||||
|
||||
# check if login is globally required to access the application
|
||||
def check_if_login_required
|
||||
require_login if $RDM_LOGIN_REQUIRED
|
||||
require_login if Setting.login_required?
|
||||
end
|
||||
|
||||
def set_localization
|
||||
@@ -48,7 +48,7 @@ class ApplicationController < ActionController::Base
|
||||
end
|
||||
rescue
|
||||
nil
|
||||
end || $RDM_DEFAULT_LANG
|
||||
end || Setting.default_language
|
||||
set_language_if_valid(lang)
|
||||
end
|
||||
|
||||
@@ -92,16 +92,16 @@ class ApplicationController < ActionController::Base
|
||||
# store current uri in session.
|
||||
# return to this location by calling redirect_back_or_default
|
||||
def store_location
|
||||
session[:return_to] = request.request_uri
|
||||
session[:return_to_params] = params
|
||||
end
|
||||
|
||||
# move to the last store_location call or to the passed default one
|
||||
def redirect_back_or_default(default)
|
||||
if session[:return_to].nil?
|
||||
if session[:return_to_params].nil?
|
||||
redirect_to default
|
||||
else
|
||||
redirect_to_url session[:return_to]
|
||||
session[:return_to] = nil
|
||||
redirect_to session[:return_to_params]
|
||||
session[:return_to_params] = nil
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -25,7 +25,8 @@ class CustomFieldsController < ApplicationController
|
||||
end
|
||||
|
||||
def list
|
||||
@custom_field_pages, @custom_fields = paginate :custom_fields, :per_page => 15
|
||||
@custom_fields_by_type = CustomField.find(:all).group_by {|f| f.type.to_s }
|
||||
@tab = params[:tab] || 'IssueCustomField'
|
||||
render :action => "list", :layout => false if request.xhr?
|
||||
end
|
||||
|
||||
@@ -44,9 +45,9 @@ class CustomFieldsController < ApplicationController
|
||||
end
|
||||
if request.post? and @custom_field.save
|
||||
flash[:notice] = l(:notice_successful_create)
|
||||
redirect_to :action => 'list'
|
||||
redirect_to :action => 'list', :tab => @custom_field.type
|
||||
end
|
||||
@trackers = Tracker.find(:all)
|
||||
@trackers = Tracker.find(:all, :order => 'position')
|
||||
end
|
||||
|
||||
def edit
|
||||
@@ -56,14 +57,14 @@ class CustomFieldsController < ApplicationController
|
||||
@custom_field.trackers = params[:tracker_ids] ? Tracker.find(params[:tracker_ids]) : []
|
||||
end
|
||||
flash[:notice] = l(:notice_successful_update)
|
||||
redirect_to :action => 'list'
|
||||
redirect_to :action => 'list', :tab => @custom_field.type
|
||||
end
|
||||
@trackers = Tracker.find(:all)
|
||||
@trackers = Tracker.find(:all, :order => 'position')
|
||||
end
|
||||
|
||||
def destroy
|
||||
CustomField.find(params[:id]).destroy
|
||||
redirect_to :action => 'list'
|
||||
@custom_field = CustomField.find(params[:id]).destroy
|
||||
redirect_to :action => 'list', :tab => @custom_field.type
|
||||
rescue
|
||||
flash[:notice] = "Unable to delete custom field"
|
||||
redirect_to :action => 'list'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# redMine - project management software
|
||||
# Copyright (C) 2006 Jean-Philippe Lang
|
||||
# Copyright (C) 2006-2007 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
|
||||
@@ -46,9 +46,13 @@ class DocumentsController < ApplicationController
|
||||
|
||||
def add_attachment
|
||||
# Save the attachments
|
||||
params[:attachments].each { |a|
|
||||
Attachment.create(:container => @document, :file => a, :author => logged_in_user) unless a.size == 0
|
||||
@attachments = []
|
||||
params[:attachments].each { |file|
|
||||
next unless file.size > 0
|
||||
a = Attachment.create(:container => @document, :file => file, :author => logged_in_user)
|
||||
@attachments << a unless a.new_record?
|
||||
} if params[:attachments] and params[:attachments].is_a? Array
|
||||
Mailer.deliver_attachments_add(@attachments) if !@attachments.empty? and Permission.find_by_controller_and_action(params[:controller], params[:action]).mail_enabled?
|
||||
redirect_to :action => 'show', :id => @document
|
||||
end
|
||||
|
||||
|
||||
@@ -20,6 +20,6 @@ class FeedsController < ApplicationController
|
||||
|
||||
def news
|
||||
@news = News.find :all, :order => 'news.created_on DESC', :limit => 10, :include => [ :author, :project ]
|
||||
@headers["Content-Type"] = "application/rss+xml"
|
||||
headers["Content-Type"] = "application/rss+xml"
|
||||
end
|
||||
end
|
||||
|
||||
@@ -16,22 +16,22 @@
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
class IssueCategoriesController < ApplicationController
|
||||
layout 'base'
|
||||
before_filter :find_project, :authorize
|
||||
|
||||
layout 'base'
|
||||
before_filter :find_project, :authorize
|
||||
|
||||
def edit
|
||||
if request.post? and @category.update_attributes(params[:category])
|
||||
flash[:notice] = l(:notice_successful_update)
|
||||
redirect_to :controller => 'projects', :action => 'settings', :id => @project
|
||||
redirect_to :controller => 'projects', :action => 'settings', :tab => 'categories', :id => @project
|
||||
end
|
||||
end
|
||||
|
||||
def destroy
|
||||
@category.destroy
|
||||
redirect_to :controller => 'projects', :action => 'settings', :id => @project
|
||||
redirect_to :controller => 'projects', :action => 'settings', :tab => 'categories', :id => @project
|
||||
rescue
|
||||
flash[:notice] = "Categorie can't be deleted"
|
||||
redirect_to :controller => 'projects', :action => 'settings', :id => @project
|
||||
redirect_to :controller => 'projects', :action => 'settings', :tab => 'categories', :id => @project
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
@@ -16,16 +16,19 @@
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
class IssueStatusesController < ApplicationController
|
||||
layout 'base'
|
||||
before_filter :require_admin
|
||||
|
||||
layout 'base'
|
||||
before_filter :require_admin
|
||||
|
||||
verify :method => :post, :only => [ :destroy, :create, :update, :move ],
|
||||
:redirect_to => { :action => :list }
|
||||
|
||||
def index
|
||||
list
|
||||
render :action => 'list' unless request.xhr?
|
||||
end
|
||||
|
||||
def list
|
||||
@issue_status_pages, @issue_statuses = paginate :issue_statuses, :per_page => 10
|
||||
@issue_status_pages, @issue_statuses = paginate :issue_statuses, :per_page => 25, :order => "position"
|
||||
render :action => "list", :layout => false if request.xhr?
|
||||
end
|
||||
|
||||
@@ -55,6 +58,21 @@ class IssueStatusesController < ApplicationController
|
||||
else
|
||||
render :action => 'edit'
|
||||
end
|
||||
end
|
||||
|
||||
def move
|
||||
@issue_status = IssueStatus.find(params[:id])
|
||||
case params[:position]
|
||||
when 'highest'
|
||||
@issue_status.move_to_top
|
||||
when 'higher'
|
||||
@issue_status.move_higher
|
||||
when 'lower'
|
||||
@issue_status.move_lower
|
||||
when 'lowest'
|
||||
@issue_status.move_to_bottom
|
||||
end if params[:position]
|
||||
redirect_to :action => 'list'
|
||||
end
|
||||
|
||||
def destroy
|
||||
@@ -63,7 +81,5 @@ class IssueStatusesController < ApplicationController
|
||||
rescue
|
||||
flash[:notice] = "Unable to delete issue status"
|
||||
redirect_to :action => 'list'
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# redMine - project management software
|
||||
# Copyright (C) 2006 Jean-Philippe Lang
|
||||
# Copyright (C) 2006-2007 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
|
||||
@@ -25,7 +25,7 @@ class IssuesController < ApplicationController
|
||||
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
|
||||
@status_options = @issue.status.workflows.find(:all, :order => 'position', :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)
|
||||
@journals_count = @issue.journals.count
|
||||
@journals = @issue.journals.find(:all, :include => [:user, :details], :limit => 15, :order => "journals.created_on desc")
|
||||
@@ -83,7 +83,7 @@ class IssuesController < ApplicationController
|
||||
|
||||
def change_status
|
||||
#@history = @issue.histories.build(params[:history])
|
||||
@status_options = @issue.status.workflows.find(:all, :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, :order => 'position', :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
|
||||
@new_status = IssueStatus.find(params[:new_status_id])
|
||||
if params[:confirm]
|
||||
begin
|
||||
@@ -115,10 +115,13 @@ class IssuesController < ApplicationController
|
||||
|
||||
def add_attachment
|
||||
# Save the attachments
|
||||
params[:attachments].each { |a|
|
||||
@attachment = @issue.attachments.build(:file => a, :author => self.logged_in_user) unless a.size == 0
|
||||
@attachment.save
|
||||
@attachments = []
|
||||
params[:attachments].each { |file|
|
||||
next unless file.size > 0
|
||||
a = Attachment.create(:container => @issue, :file => file, :author => logged_in_user)
|
||||
@attachments << a unless a.new_record?
|
||||
} if params[:attachments] and params[:attachments].is_a? Array
|
||||
Mailer.deliver_attachments_add(@attachments) if !@attachments.empty? and Permission.find_by_controller_and_action(params[:controller], params[:action]).mail_enabled?
|
||||
redirect_to :action => 'show', :id => @issue
|
||||
end
|
||||
|
||||
|
||||
@@ -16,21 +16,21 @@
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
class MembersController < ApplicationController
|
||||
layout 'base'
|
||||
before_filter :find_project, :authorize
|
||||
layout 'base'
|
||||
before_filter :find_project, :authorize
|
||||
|
||||
def edit
|
||||
if request.post? and @member.update_attributes(params[:member])
|
||||
flash[:notice] = l(:notice_successful_update)
|
||||
redirect_to :controller => 'projects', :action => 'settings', :id => @project
|
||||
end
|
||||
end
|
||||
|
||||
def destroy
|
||||
@member.destroy
|
||||
def edit
|
||||
if request.post? and @member.update_attributes(params[:member])
|
||||
flash[:notice] = l(:notice_successful_update)
|
||||
redirect_to :controller => 'projects', :action => 'settings', :tab => 'members', :id => @project
|
||||
end
|
||||
end
|
||||
|
||||
def destroy
|
||||
@member.destroy
|
||||
flash[:notice] = l(:notice_successful_delete)
|
||||
redirect_to :controller => 'projects', :action => 'settings', :id => @project
|
||||
end
|
||||
redirect_to :controller => 'projects', :action => 'settings', :tab => 'members', :id => @project
|
||||
end
|
||||
|
||||
private
|
||||
def find_project
|
||||
@@ -38,6 +38,5 @@ private
|
||||
@project = @member.project
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
render_404
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
@@ -19,13 +19,17 @@ class MyController < ApplicationController
|
||||
layout 'base'
|
||||
before_filter :require_login
|
||||
|
||||
BLOCKS = { 'issues_assigned_to_me' => :label_assigned_to_me_issues,
|
||||
'issues_reported_by_me' => :label_reported_issues,
|
||||
'latest_news' => :label_news_latest,
|
||||
BLOCKS = { 'issuesassignedtome' => :label_assigned_to_me_issues,
|
||||
'issuesreportedbyme' => :label_reported_issues,
|
||||
'news' => :label_news_latest,
|
||||
'calendar' => :label_calendar,
|
||||
'documents' => :label_document_plural
|
||||
}.freeze
|
||||
|
||||
DEFAULT_LAYOUT = { 'left' => ['issuesassignedtome'],
|
||||
'right' => ['issuesreportedbyme']
|
||||
}.freeze
|
||||
|
||||
verify :xhr => true,
|
||||
:session => :page_layout,
|
||||
:only => [:add_block, :remove_block, :order_blocks]
|
||||
@@ -38,7 +42,7 @@ class MyController < ApplicationController
|
||||
# Show user's page
|
||||
def page
|
||||
@user = self.logged_in_user
|
||||
@blocks = @user.pref[:my_page_layout] || { 'left' => ['issues_assigned_to_me'], 'right' => ['issues_reported_by_me'] }
|
||||
@blocks = @user.pref[:my_page_layout] || DEFAULT_LAYOUT
|
||||
end
|
||||
|
||||
# Edit user's account
|
||||
@@ -47,7 +51,7 @@ class MyController < ApplicationController
|
||||
@pref = @user.pref
|
||||
@user.attributes = params[:user]
|
||||
@user.pref.attributes = params[:pref]
|
||||
if request.post? and @user.save
|
||||
if request.post? and @user.save and @user.pref.save
|
||||
set_localization
|
||||
flash.now[:notice] = l(:notice_account_updated)
|
||||
self.logged_in_user.reload
|
||||
@@ -75,7 +79,7 @@ class MyController < ApplicationController
|
||||
# User's page layout configuration
|
||||
def page_layout
|
||||
@user = self.logged_in_user
|
||||
@blocks = @user.pref[:my_page_layout] || { 'left' => ['issues_assigned_to_me'], 'right' => ['issues_reported_by_me'] }
|
||||
@blocks = @user.pref[:my_page_layout] || DEFAULT_LAYOUT.dup
|
||||
session[:page_layout] = @blocks
|
||||
%w(top left right).each {|f| session[:page_layout][f] ||= [] }
|
||||
@block_options = []
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
class NewsController < ApplicationController
|
||||
layout 'base'
|
||||
before_filter :find_project, :authorize
|
||||
layout 'base'
|
||||
before_filter :find_project, :authorize
|
||||
|
||||
def show
|
||||
end
|
||||
@@ -45,10 +45,10 @@ class NewsController < ApplicationController
|
||||
redirect_to :action => 'show', :id => @news
|
||||
end
|
||||
|
||||
def destroy
|
||||
@news.destroy
|
||||
redirect_to :controller => 'projects', :action => 'list_news', :id => @project
|
||||
end
|
||||
def destroy
|
||||
@news.destroy
|
||||
redirect_to :controller => 'projects', :action => 'list_news', :id => @project
|
||||
end
|
||||
|
||||
private
|
||||
def find_project
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
require 'csv'
|
||||
|
||||
class ProjectsController < ApplicationController
|
||||
layout 'base'
|
||||
before_filter :find_project, :authorize, :except => [ :index, :list, :add ]
|
||||
@@ -39,7 +41,7 @@ class ProjectsController < ApplicationController
|
||||
def list
|
||||
sort_init 'name', 'asc'
|
||||
sort_update
|
||||
@project_count = Project.count(["is_public=?", true])
|
||||
@project_count = Project.count(:all, :conditions => ["is_public=?", true])
|
||||
@project_pages = Paginator.new self, @project_count,
|
||||
15,
|
||||
params['page']
|
||||
@@ -77,9 +79,11 @@ class ProjectsController < ApplicationController
|
||||
def show
|
||||
@custom_values = @project.custom_values.find(:all, :include => :custom_field)
|
||||
@members = @project.members.find(:all, :include => [:user, :role])
|
||||
@subprojects = @project.children if @project.children_count > 0
|
||||
@subprojects = @project.children if @project.children.size > 0
|
||||
@news = @project.news.find(:all, :limit => 5, :include => [ :author, :project ], :order => "news.created_on DESC")
|
||||
@trackers = Tracker.find(:all)
|
||||
@trackers = Tracker.find(:all, :order => 'position')
|
||||
@open_issues_by_tracker = Issue.count(:group => :tracker, :joins => "INNER JOIN issue_statuses ON issue_statuses.id = issues.status_id", :conditions => ["project_id=? and issue_statuses.is_closed=?", @project.id, false])
|
||||
@total_issues_by_tracker = Issue.count(:group => :tracker, :conditions => ["project_id=?", @project.id])
|
||||
end
|
||||
|
||||
def settings
|
||||
@@ -87,8 +91,8 @@ class ProjectsController < ApplicationController
|
||||
@custom_fields = IssueCustomField.find(:all)
|
||||
@issue_category ||= IssueCategory.new
|
||||
@member ||= @project.members.new
|
||||
@roles = Role.find(:all)
|
||||
@users = User.find(:all) - @project.members.find(:all, :include => :user).collect{|m| m.user }
|
||||
@roles = Role.find(:all, :order => 'position')
|
||||
@users = User.find_active(:all) - @project.users
|
||||
@custom_values ||= ProjectCustomField.find(:all).collect { |x| @project.custom_values.find_by_custom_field_id(x.id) || CustomValue.new(:custom_field => x) }
|
||||
end
|
||||
|
||||
@@ -134,7 +138,7 @@ class ProjectsController < ApplicationController
|
||||
@issue_category = @project.issue_categories.build(params[:issue_category])
|
||||
if @issue_category.save
|
||||
flash[:notice] = l(:notice_successful_create)
|
||||
redirect_to :action => 'settings', :id => @project
|
||||
redirect_to :action => 'settings', :tab => 'categories', :id => @project
|
||||
else
|
||||
settings
|
||||
render :action => 'settings'
|
||||
@@ -147,7 +151,7 @@ class ProjectsController < ApplicationController
|
||||
@version = @project.versions.build(params[:version])
|
||||
if request.post? and @version.save
|
||||
flash[:notice] = l(:notice_successful_create)
|
||||
redirect_to :action => 'settings', :id => @project
|
||||
redirect_to :action => 'settings', :tab => 'versions', :id => @project
|
||||
end
|
||||
end
|
||||
|
||||
@@ -157,7 +161,7 @@ class ProjectsController < ApplicationController
|
||||
if request.post?
|
||||
if @member.save
|
||||
flash[:notice] = l(:notice_successful_create)
|
||||
redirect_to :action => 'settings', :id => @project
|
||||
redirect_to :action => 'settings', :tab => 'members', :id => @project
|
||||
else
|
||||
settings
|
||||
render :action => 'settings'
|
||||
@@ -167,7 +171,7 @@ class ProjectsController < ApplicationController
|
||||
|
||||
# Show members list of @project
|
||||
def list_members
|
||||
@members = @project.members
|
||||
@members = @project.members.find(:all)
|
||||
end
|
||||
|
||||
# Add a new document to @project
|
||||
@@ -180,6 +184,7 @@ class ProjectsController < ApplicationController
|
||||
Attachment.create(:container => @document, :file => a, :author => logged_in_user) unless a.size == 0
|
||||
} if params[:attachments] and params[:attachments].is_a? Array
|
||||
flash[:notice] = l(:notice_successful_create)
|
||||
Mailer.deliver_document_add(@document) if Permission.find_by_controller_and_action(params[:controller], params[:action]).mail_enabled?
|
||||
redirect_to :action => 'list_documents', :id => @project
|
||||
end
|
||||
end
|
||||
@@ -235,12 +240,12 @@ class ProjectsController < ApplicationController
|
||||
@issue_count = Issue.count(:include => [:status, :project], :conditions => @query.statement)
|
||||
@issue_pages = Paginator.new self, @issue_count, @results_per_page, params['page']
|
||||
@issues = Issue.find :all, :order => sort_clause,
|
||||
:include => [ :author, :status, :tracker, :project ],
|
||||
:include => [ :author, :status, :tracker, :project, :priority ],
|
||||
:conditions => @query.statement,
|
||||
:limit => @issue_pages.items_per_page,
|
||||
:offset => @issue_pages.current.offset
|
||||
end
|
||||
@trackers = Tracker.find :all
|
||||
@trackers = Tracker.find :all, :order => 'position'
|
||||
render :layout => false if request.xhr?
|
||||
end
|
||||
|
||||
@@ -253,21 +258,42 @@ class ProjectsController < ApplicationController
|
||||
render :action => 'list_issues' and return unless @query.valid?
|
||||
|
||||
@issues = Issue.find :all, :order => sort_clause,
|
||||
:include => [ :author, :status, :tracker, :project, :custom_values ],
|
||||
:conditions => @query.statement
|
||||
:include => [ :author, :status, :tracker, :priority, {:custom_values => :custom_field} ],
|
||||
:conditions => @query.statement,
|
||||
:limit => Setting.issues_export_limit
|
||||
|
||||
ic = Iconv.new('ISO-8859-1', 'UTF-8')
|
||||
export = StringIO.new
|
||||
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) ]
|
||||
headers = [ "#", l(:field_status),
|
||||
l(:field_tracker),
|
||||
l(:field_priority),
|
||||
l(:field_subject),
|
||||
l(:field_author),
|
||||
l(:field_start_date),
|
||||
l(:field_due_date),
|
||||
l(:field_done_ratio),
|
||||
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|
|
||||
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)]
|
||||
fields = [issue.id, issue.status.name,
|
||||
issue.tracker.name,
|
||||
issue.priority.name,
|
||||
issue.subject,
|
||||
issue.author.display_name,
|
||||
issue.start_date ? l_date(issue.start_date) : nil,
|
||||
issue.due_date ? l_date(issue.due_date) : nil,
|
||||
issue.done_ratio,
|
||||
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
|
||||
@@ -287,8 +313,9 @@ class ProjectsController < ApplicationController
|
||||
render :action => 'list_issues' and return unless @query.valid?
|
||||
|
||||
@issues = Issue.find :all, :order => sort_clause,
|
||||
:include => [ :author, :status, :tracker, :project, :custom_values ],
|
||||
:conditions => @query.statement
|
||||
:include => [ :author, :status, :tracker, :priority ],
|
||||
:conditions => @query.statement,
|
||||
:limit => Setting.issues_export_limit
|
||||
|
||||
@options_for_rfpdf ||= {}
|
||||
@options_for_rfpdf[:file_name] = "export.pdf"
|
||||
@@ -361,9 +388,13 @@ class ProjectsController < ApplicationController
|
||||
if request.post?
|
||||
@version = @project.versions.find_by_id(params[:version_id])
|
||||
# Save the attachments
|
||||
params[:attachments].each { |a|
|
||||
Attachment.create(:container => @version, :file => a, :author => logged_in_user) unless a.size == 0
|
||||
@attachments = []
|
||||
params[:attachments].each { |file|
|
||||
next unless file.size > 0
|
||||
a = Attachment.create(:container => @version, :file => file, :author => logged_in_user)
|
||||
@attachments << a unless a.new_record?
|
||||
} if params[:attachments] and params[:attachments].is_a? Array
|
||||
Mailer.deliver_attachments_add(@attachments) if !@attachments.empty? and Permission.find_by_controller_and_action(params[:controller], params[:action]).mail_enabled?
|
||||
redirect_to :controller => 'projects', :action => 'list_files', :id => @project
|
||||
end
|
||||
@versions = @project.versions
|
||||
@@ -375,7 +406,7 @@ class ProjectsController < ApplicationController
|
||||
|
||||
# Show changelog for @project
|
||||
def changelog
|
||||
@trackers = Tracker.find(:all, :conditions => ["is_in_chlog=?", true])
|
||||
@trackers = Tracker.find(:all, :conditions => ["is_in_chlog=?", true], :order => 'position')
|
||||
if request.get?
|
||||
@selected_tracker_ids = @trackers.collect {|t| t.id.to_s }
|
||||
else
|
||||
@@ -390,6 +421,20 @@ class ProjectsController < ApplicationController
|
||||
@fixed_issues ||= []
|
||||
end
|
||||
|
||||
def roadmap
|
||||
@trackers = Tracker.find(:all, :conditions => ["is_in_roadmap=?", true], :order => 'position')
|
||||
if request.get?
|
||||
@selected_tracker_ids = @trackers.collect {|t| t.id.to_s }
|
||||
else
|
||||
@selected_tracker_ids = params[:tracker_ids].collect { |id| id.to_i.to_s } if params[:tracker_ids] and params[:tracker_ids].is_a? Array
|
||||
end
|
||||
@selected_tracker_ids ||= []
|
||||
@versions = @project.versions.find(:all,
|
||||
:conditions => [ "versions.effective_date>?", Date.today],
|
||||
:order => "versions.effective_date ASC"
|
||||
)
|
||||
end
|
||||
|
||||
def activity
|
||||
if params[:year] and params[:year].to_i > 1900
|
||||
@year = params[:year].to_i
|
||||
@@ -461,7 +506,7 @@ class ProjectsController < ApplicationController
|
||||
# finish on sunday
|
||||
@date_to = @date_to + (7-@date_to.cwday)
|
||||
|
||||
@issues = @project.issues.find(:all, :include => :tracker, :conditions => ["((start_date>=? and start_date<=?) or (due_date>=? and due_date<=?))", @date_from, @date_to, @date_from, @date_to])
|
||||
@issues = @project.issues.find(:all, :include => [:tracker, :status, :assigned_to, :priority], :conditions => ["((start_date>=? and start_date<=?) or (due_date>=? and due_date<=?))", @date_from, @date_to, @date_from, @date_to])
|
||||
render :layout => false if request.xhr?
|
||||
end
|
||||
|
||||
@@ -483,7 +528,7 @@ class ProjectsController < ApplicationController
|
||||
|
||||
@date_from = Date.civil(@year_from, @month_from, 1)
|
||||
@date_to = (@date_from >> @months) - 1
|
||||
@issues = @project.issues.find(:all, :order => "start_date, due_date", :conditions => ["(((start_date>=? and start_date<=?) or (due_date>=? and due_date<=?) or (start_date<? and due_date>?)) and start_date is not null and due_date is not null)", @date_from, @date_to, @date_from, @date_to, @date_from, @date_to])
|
||||
@issues = @project.issues.find(:all, :order => "start_date, due_date", :include => [:tracker, :status, :assigned_to, :priority], :conditions => ["(((start_date>=? and start_date<=?) or (due_date>=? and due_date<=?) or (start_date<? and due_date>?)) and start_date is not null and due_date is not null)", @date_from, @date_to, @date_from, @date_to, @date_from, @date_to])
|
||||
|
||||
if params[:output]=='pdf'
|
||||
@options_for_rfpdf ||= {}
|
||||
@@ -509,6 +554,7 @@ private
|
||||
def retrieve_query
|
||||
if params[:query_id]
|
||||
@query = @project.queries.find(params[:query_id])
|
||||
session[:query] = @query
|
||||
else
|
||||
if params[:set_filter] or !session[:query] or session[:query].project_id != @project.id
|
||||
# Give it a name, required to be valid
|
||||
|
||||
@@ -16,16 +16,16 @@
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
class ReportsController < ApplicationController
|
||||
layout 'base'
|
||||
before_filter :find_project, :authorize
|
||||
|
||||
layout 'base'
|
||||
before_filter :find_project, :authorize
|
||||
|
||||
def issue_report
|
||||
@statuses = IssueStatus.find :all
|
||||
@statuses = IssueStatus.find(:all, :order => 'position')
|
||||
|
||||
case params[:detail]
|
||||
when "tracker"
|
||||
@field = "tracker_id"
|
||||
@rows = Tracker.find :all
|
||||
@rows = Tracker.find :all, :order => 'position'
|
||||
@data = issues_by_tracker
|
||||
@report_title = l(:field_tracker)
|
||||
render :template => "reports/issue_report_details"
|
||||
@@ -49,7 +49,7 @@ class ReportsController < ApplicationController
|
||||
render :template => "reports/issue_report_details"
|
||||
else
|
||||
@queries = @project.queries.find :all, :conditions => ["is_public=? or user_id=?", true, (logged_in_user ? logged_in_user.id : 0)]
|
||||
@trackers = Tracker.find(:all)
|
||||
@trackers = Tracker.find(:all, :order => 'position')
|
||||
@priorities = Enumeration::get_values('IPRI')
|
||||
@categories = @project.issue_categories
|
||||
@authors = @project.members.collect { |m| m.user }
|
||||
@@ -104,8 +104,8 @@ private
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
render_404
|
||||
end
|
||||
|
||||
def issues_by_tracker
|
||||
|
||||
def issues_by_tracker
|
||||
@issues_by_tracker ||=
|
||||
ActiveRecord::Base.connection.select_all("select s.id as status_id,
|
||||
s.is_closed as closed,
|
||||
@@ -118,9 +118,9 @@ private
|
||||
and i.tracker_id=t.id
|
||||
and i.project_id=#{@project.id}
|
||||
group by s.id, s.is_closed, t.id")
|
||||
end
|
||||
end
|
||||
|
||||
def issues_by_priority
|
||||
def issues_by_priority
|
||||
@issues_by_priority ||=
|
||||
ActiveRecord::Base.connection.select_all("select s.id as status_id,
|
||||
s.is_closed as closed,
|
||||
@@ -133,9 +133,9 @@ private
|
||||
and i.priority_id=p.id
|
||||
and i.project_id=#{@project.id}
|
||||
group by s.id, s.is_closed, p.id")
|
||||
end
|
||||
end
|
||||
|
||||
def issues_by_category
|
||||
def issues_by_category
|
||||
@issues_by_category ||=
|
||||
ActiveRecord::Base.connection.select_all("select s.id as status_id,
|
||||
s.is_closed as closed,
|
||||
@@ -148,9 +148,9 @@ private
|
||||
and i.category_id=c.id
|
||||
and i.project_id=#{@project.id}
|
||||
group by s.id, s.is_closed, c.id")
|
||||
end
|
||||
end
|
||||
|
||||
def issues_by_author
|
||||
def issues_by_author
|
||||
@issues_by_author ||=
|
||||
ActiveRecord::Base.connection.select_all("select s.id as status_id,
|
||||
s.is_closed as closed,
|
||||
@@ -163,5 +163,5 @@ private
|
||||
and i.author_id=a.id
|
||||
and i.project_id=#{@project.id}
|
||||
group by s.id, s.is_closed, a.id")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -16,16 +16,19 @@
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
class RolesController < ApplicationController
|
||||
layout 'base'
|
||||
before_filter :require_admin
|
||||
|
||||
layout 'base'
|
||||
before_filter :require_admin
|
||||
|
||||
verify :method => :post, :only => [ :destroy, :move ],
|
||||
:redirect_to => { :action => :list }
|
||||
|
||||
def index
|
||||
list
|
||||
render :action => 'list' unless request.xhr?
|
||||
end
|
||||
|
||||
def list
|
||||
@role_pages, @roles = paginate :roles, :per_page => 10
|
||||
@role_pages, @roles = paginate :roles, :per_page => 10, :order => "position"
|
||||
render :action => "list", :layout => false if request.xhr?
|
||||
end
|
||||
|
||||
@@ -62,6 +65,21 @@ class RolesController < ApplicationController
|
||||
redirect_to :action => 'list'
|
||||
end
|
||||
|
||||
def move
|
||||
@role = Role.find(params[:id])
|
||||
case params[:position]
|
||||
when 'highest'
|
||||
@role.move_to_top
|
||||
when 'higher'
|
||||
@role.move_higher
|
||||
when 'lower'
|
||||
@role.move_lower
|
||||
when 'lowest'
|
||||
@role.move_to_bottom
|
||||
end if params[:position]
|
||||
redirect_to :action => 'list'
|
||||
end
|
||||
|
||||
def workflow
|
||||
@role = Role.find_by_id(params[:role_id])
|
||||
@tracker = Tracker.find_by_id(params[:tracker_id])
|
||||
@@ -77,8 +95,8 @@ class RolesController < ApplicationController
|
||||
flash[:notice] = l(:notice_successful_update)
|
||||
end
|
||||
end
|
||||
@roles = Role.find :all
|
||||
@trackers = Tracker.find :all
|
||||
@statuses = IssueStatus.find(:all, :include => :workflows)
|
||||
@roles = Role.find(:all, :order => 'position')
|
||||
@trackers = Tracker.find(:all, :order => 'position')
|
||||
@statuses = IssueStatus.find(:all, :include => :workflows, :order => 'position')
|
||||
end
|
||||
end
|
||||
|
||||
33
app/controllers/settings_controller.rb
Normal file
33
app/controllers/settings_controller.rb
Normal file
@@ -0,0 +1,33 @@
|
||||
# redMine - project management software
|
||||
# Copyright (C) 2006-2007 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.
|
||||
|
||||
class SettingsController < ApplicationController
|
||||
layout 'base'
|
||||
before_filter :require_admin
|
||||
|
||||
def index
|
||||
edit
|
||||
render :action => 'edit'
|
||||
end
|
||||
|
||||
def edit
|
||||
if request.post? and params[:settings] and params[:settings].is_a? Hash
|
||||
params[:settings].each { |name, value| Setting[name] = value }
|
||||
redirect_to :action => 'edit' and return
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -25,10 +25,10 @@ class TrackersController < ApplicationController
|
||||
end
|
||||
|
||||
# GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html)
|
||||
verify :method => :post, :only => [ :destroy ], :redirect_to => { :action => :list }
|
||||
verify :method => :post, :only => [ :destroy, :move ], :redirect_to => { :action => :list }
|
||||
|
||||
def list
|
||||
@tracker_pages, @trackers = paginate :trackers, :per_page => 10
|
||||
@tracker_pages, @trackers = paginate :trackers, :per_page => 10, :order => 'position'
|
||||
render :action => "list", :layout => false if request.xhr?
|
||||
end
|
||||
|
||||
@@ -47,7 +47,22 @@ class TrackersController < ApplicationController
|
||||
redirect_to :action => 'list'
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
def move
|
||||
@tracker = Tracker.find(params[:id])
|
||||
case params[:position]
|
||||
when 'highest'
|
||||
@tracker.move_to_top
|
||||
when 'higher'
|
||||
@tracker.move_higher
|
||||
when 'lower'
|
||||
@tracker.move_lower
|
||||
when 'lowest'
|
||||
@tracker.move_to_bottom
|
||||
end if params[:position]
|
||||
redirect_to :action => 'list'
|
||||
end
|
||||
|
||||
def destroy
|
||||
@tracker = Tracker.find(params[:id])
|
||||
unless @tracker.issues.empty?
|
||||
@@ -56,6 +71,5 @@ class TrackersController < ApplicationController
|
||||
@tracker.destroy
|
||||
end
|
||||
redirect_to :action => 'list'
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# redMine - project management software
|
||||
# Copyright (C) 2006 Jean-Philippe Lang
|
||||
# Copyright (C) 2006-2007 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
|
||||
@@ -45,7 +45,7 @@ class UsersController < ApplicationController
|
||||
|
||||
def add
|
||||
if request.get?
|
||||
@user = User.new(:language => $RDM_DEFAULT_LANG)
|
||||
@user = User.new(:language => Setting.default_language)
|
||||
@custom_values = UserCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x, :customized => @user) }
|
||||
else
|
||||
@user = User.new(params[:user])
|
||||
@@ -80,7 +80,7 @@ class UsersController < ApplicationController
|
||||
end
|
||||
end
|
||||
@auth_sources = AuthSource.find(:all)
|
||||
@roles = Role.find :all
|
||||
@roles = Role.find(:all, :order => 'position')
|
||||
@projects = Project.find(:all) - @user.projects
|
||||
@membership ||= Member.new
|
||||
end
|
||||
|
||||
@@ -22,16 +22,16 @@ class VersionsController < ApplicationController
|
||||
def edit
|
||||
if request.post? and @version.update_attributes(params[:version])
|
||||
flash[:notice] = l(:notice_successful_update)
|
||||
redirect_to :controller => 'projects', :action => 'settings', :id => @project
|
||||
redirect_to :controller => 'projects', :action => 'settings', :tab => 'versions', :id => @project
|
||||
end
|
||||
end
|
||||
|
||||
def destroy
|
||||
@version.destroy
|
||||
redirect_to :controller => 'projects', :action => 'settings', :id => @project
|
||||
redirect_to :controller => 'projects', :action => 'settings', :tab => 'versions', :id => @project
|
||||
rescue
|
||||
flash[:notice] = "Unable to delete version"
|
||||
redirect_to :controller => 'projects', :action => 'settings', :id => @project
|
||||
redirect_to :controller => 'projects', :action => 'settings', :tab => 'versions', :id => @project
|
||||
end
|
||||
|
||||
def download
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# redMine - project management software
|
||||
# Copyright (C) 2006 Jean-Philippe Lang
|
||||
# Copyright (C) 2006-2007 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
|
||||
@@ -50,6 +50,14 @@ module ApplicationHelper
|
||||
link_to user.display_name, :controller => 'account', :action => 'show', :id => user
|
||||
end
|
||||
|
||||
def image_to_function(name, function, html_options = {})
|
||||
html_options.symbolize_keys!
|
||||
tag(:input, html_options.merge({
|
||||
:type => "image", :src => image_path(name),
|
||||
:onclick => (html_options[:onclick] ? "#{html_options[:onclick]}; " : "") + "#{function};"
|
||||
}))
|
||||
end
|
||||
|
||||
def format_date(date)
|
||||
l_date(date) if date
|
||||
end
|
||||
@@ -85,7 +93,7 @@ module ApplicationHelper
|
||||
end
|
||||
|
||||
def textilizable(text)
|
||||
$RDM_TEXTILE_DISABLED ? simple_format(auto_link(h(text))) : RedCloth.new(h(text)).to_html
|
||||
(Setting.text_formatting == 'textile') && (ActionView::Helpers::TextHelper.method_defined? "textilize") ? RedCloth.new(h(text)).to_html : simple_format(auto_link(h(text)))
|
||||
end
|
||||
|
||||
def error_messages_for(object_name, options = {})
|
||||
@@ -123,8 +131,9 @@ module ApplicationHelper
|
||||
end
|
||||
end
|
||||
|
||||
def lang_options_for_select
|
||||
(GLoc.valid_languages.sort {|x,y| x.to_s <=> y.to_s }).collect {|lang| [ l_lang_name(lang.to_s, lang), lang.to_s]}
|
||||
def lang_options_for_select(blank=true)
|
||||
(blank ? [["(auto)", ""]] : []) +
|
||||
(GLoc.valid_languages.sort {|x,y| x.to_s <=> y.to_s }).collect {|lang| [ l_lang_name(lang.to_s, lang), lang.to_s]}
|
||||
end
|
||||
|
||||
def label_tag_for(name, option_tags = nil, options = {})
|
||||
@@ -145,7 +154,7 @@ module ApplicationHelper
|
||||
end
|
||||
|
||||
def calendar_for(field_id)
|
||||
image_tag("calendar", {:id => "#{field_id}_trigger",:class => "calendar-trigger"}) +
|
||||
image_tag("calendar.png", {:id => "#{field_id}_trigger",:class => "calendar-trigger"}) +
|
||||
javascript_tag("Calendar.setup({inputField : '#{field_id}', ifFormat : '%Y-%m-%d', button : '#{field_id}_trigger' });")
|
||||
end
|
||||
end
|
||||
|
||||
@@ -34,7 +34,7 @@ module CustomFieldsHelper
|
||||
when "bool"
|
||||
check_box 'custom_value', 'value', :name => field_name, :id => field_id
|
||||
when "list"
|
||||
select 'custom_value', 'value', custom_field.possible_values.split('|'), { :include_blank => true }, :name => field_name, :id => field_id
|
||||
select 'custom_value', 'value', custom_field.possible_values, { :include_blank => true }, :name => field_name, :id => field_id
|
||||
end
|
||||
end
|
||||
|
||||
@@ -59,10 +59,10 @@ module CustomFieldsHelper
|
||||
|
||||
# Return a string used to display a custom value
|
||||
def format_value(value, field_format)
|
||||
return "" unless value
|
||||
return "" unless value && !value.empty?
|
||||
case field_format
|
||||
when "date"
|
||||
value.empty? ? "" : l_date(value.to_date)
|
||||
begin; l_date(value.to_date); rescue; value end
|
||||
when "bool"
|
||||
l_YesNo(value == "1")
|
||||
else
|
||||
|
||||
@@ -22,6 +22,11 @@ module IfpdfHelper
|
||||
class IFPDF < FPDF
|
||||
|
||||
attr_accessor :footer_date
|
||||
|
||||
def initialize
|
||||
super
|
||||
SetCreator("redMine #{Redmine::VERSION}")
|
||||
end
|
||||
|
||||
def Cell(w,h=0,txt='',border=0,ln=0,align='',fill=0,link='')
|
||||
@ic ||= Iconv.new('ISO-8859-1', 'UTF-8')
|
||||
|
||||
@@ -56,12 +56,12 @@ module IssuesHelper
|
||||
|
||||
unless no_html
|
||||
label = content_tag('strong', label)
|
||||
old_value = content_tag("i", h(old_value)) if old_value
|
||||
old_value = content_tag("strike", h(old_value)) if old_value and !value
|
||||
old_value = content_tag("i", h(old_value)) if detail.old_value
|
||||
old_value = content_tag("strike", old_value) if detail.old_value and (!detail.value or detail.value.empty?)
|
||||
value = content_tag("i", h(value)) if value
|
||||
end
|
||||
|
||||
if value
|
||||
if detail.value and !detail.value.to_s.empty?
|
||||
if old_value
|
||||
label + " " + l(:text_journal_changed, old_value, value)
|
||||
else
|
||||
|
||||
19
app/helpers/settings_helper.rb
Normal file
19
app/helpers/settings_helper.rb
Normal file
@@ -0,0 +1,19 @@
|
||||
# redMine - project management software
|
||||
# Copyright (C) 2006-2007 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.
|
||||
|
||||
module SettingsHelper
|
||||
end
|
||||
@@ -96,10 +96,10 @@ module SortHelper
|
||||
key, order = session[@sort_name][:key], session[@sort_name][:order]
|
||||
if key == column
|
||||
if order.downcase == 'asc'
|
||||
icon = 'sort_asc'
|
||||
icon = 'sort_asc.png'
|
||||
order = 'desc'
|
||||
else
|
||||
icon = 'sort_desc'
|
||||
icon = 'sort_desc.png'
|
||||
order = 'asc'
|
||||
end
|
||||
else
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# redMine - project management software
|
||||
# Copyright (C) 2006 Jean-Philippe Lang
|
||||
# Copyright (C) 2006-2007 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
|
||||
@@ -21,12 +21,15 @@ class Attachment < ActiveRecord::Base
|
||||
belongs_to :container, :polymorphic => true
|
||||
belongs_to :author, :class_name => "User", :foreign_key => "author_id"
|
||||
|
||||
@@max_size = $RDM_ATTACHMENT_MAX_SIZE || 5*1024*1024
|
||||
cattr_reader :max_size
|
||||
|
||||
validates_presence_of :container, :filename
|
||||
validates_inclusion_of :filesize, :in => 1..@@max_size
|
||||
|
||||
cattr_accessor :storage_path
|
||||
@@storage_path = "#{RAILS_ROOT}/files"
|
||||
|
||||
def validate
|
||||
errors.add_to_base :too_long if self.filesize > Setting.attachment_max_size.to_i.kilobytes
|
||||
end
|
||||
|
||||
def file=(incomming_file)
|
||||
unless incomming_file.nil?
|
||||
@temp_file = incomming_file
|
||||
@@ -63,7 +66,7 @@ class Attachment < ActiveRecord::Base
|
||||
|
||||
# Returns file's location on disk
|
||||
def diskfile
|
||||
"#{$RDM_STORAGE_PATH}/#{self.disk_filename}"
|
||||
"#{@@storage_path}/#{self.disk_filename}"
|
||||
end
|
||||
|
||||
def increment_download
|
||||
|
||||
@@ -17,7 +17,8 @@
|
||||
|
||||
class CustomField < ActiveRecord::Base
|
||||
has_many :custom_values, :dependent => :delete_all
|
||||
|
||||
serialize :possible_values
|
||||
|
||||
FIELD_FORMATS = { "string" => { :name => :label_string, :order => 1 },
|
||||
"text" => { :name => :label_text, :order => 2 },
|
||||
"int" => { :name => :label_integer, :order => 3 },
|
||||
@@ -30,7 +31,23 @@ class CustomField < ActiveRecord::Base
|
||||
validates_uniqueness_of :name
|
||||
validates_format_of :name, :with => /^[\w\s\'\-]*$/i
|
||||
validates_inclusion_of :field_format, :in => FIELD_FORMATS.keys
|
||||
validates_presence_of :possible_values, :if => Proc.new { |field| field.field_format == "list" }
|
||||
|
||||
def initialize(attributes = nil)
|
||||
super
|
||||
self.possible_values ||= []
|
||||
end
|
||||
|
||||
def before_validation
|
||||
# remove empty values
|
||||
self.possible_values = self.possible_values.collect{|v| v unless v.empty?}.compact
|
||||
end
|
||||
|
||||
def validate
|
||||
if self.field_format == "list"
|
||||
errors.add(:possible_values, :activerecord_error_blank) if self.possible_values.nil? || self.possible_values.empty?
|
||||
errors.add(:possible_values, :activerecord_error_invalid) unless self.possible_values.is_a? Array
|
||||
end
|
||||
end
|
||||
|
||||
# to move in project_custom_field
|
||||
def self.for_all
|
||||
|
||||
@@ -31,7 +31,7 @@ protected
|
||||
when "date"
|
||||
errors.add(:value, :activerecord_error_not_a_date) unless value =~ /^\d{4}-\d{2}-\d{2}$/ or value.empty?
|
||||
when "list"
|
||||
errors.add(:value, :activerecord_error_inclusion) unless custom_field.possible_values.split('|').include? value or value.empty?
|
||||
errors.add(:value, :activerecord_error_inclusion) unless custom_field.possible_values.include? value or value.empty?
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
class IssueStatus < ActiveRecord::Base
|
||||
before_destroy :check_integrity
|
||||
has_many :workflows, :foreign_key => "old_status_id"
|
||||
acts_as_list
|
||||
|
||||
validates_presence_of :name
|
||||
validates_uniqueness_of :name
|
||||
@@ -26,7 +27,7 @@ class IssueStatus < ActiveRecord::Base
|
||||
validates_format_of :html_color, :with => /^[a-f0-9]*$/i
|
||||
|
||||
def before_save
|
||||
IssueStatus.update_all "is_default=false" if self.is_default?
|
||||
IssueStatus.update_all "is_default=#{connection.quoted_false}" if self.is_default?
|
||||
end
|
||||
|
||||
# Returns the default status for new issues
|
||||
@@ -45,6 +46,6 @@ class IssueStatus < ActiveRecord::Base
|
||||
|
||||
private
|
||||
def check_integrity
|
||||
raise "Can't delete status" if Issue.find(:first, :conditions => ["status_id=?", self.id]) or IssueHistory.find(:first, :conditions => ["status_id=?", self.id])
|
||||
raise "Can't delete status" if Issue.find(:first, :conditions => ["status_id=?", self.id])
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# redMine - project management software
|
||||
# Copyright (C) 2006 Jean-Philippe Lang
|
||||
# Copyright (C) 2006-2007 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
|
||||
@@ -16,37 +16,72 @@
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
class Mailer < ActionMailer::Base
|
||||
|
||||
helper IssuesHelper
|
||||
|
||||
def issue_add(issue)
|
||||
def issue_add(issue)
|
||||
set_language_if_valid(Setting.default_language)
|
||||
# Sends to all project members
|
||||
@recipients = issue.project.members.collect { |m| m.user.mail if m.user.mail_notification }
|
||||
@from = $RDM_MAIL_FROM
|
||||
@recipients = issue.project.members.collect { |m| m.user.mail if m.user.mail_notification }.compact
|
||||
@from = Setting.mail_from
|
||||
@subject = "[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}] #{issue.status.name} - #{issue.subject}"
|
||||
@body['issue'] = issue
|
||||
end
|
||||
|
||||
def issue_edit(journal)
|
||||
set_language_if_valid(Setting.default_language)
|
||||
# Sends to all project members
|
||||
issue = journal.journalized
|
||||
@recipients = issue.project.members.collect { |m| m.user.mail if m.user.mail_notification }
|
||||
@from = $RDM_MAIL_FROM
|
||||
@recipients = issue.project.members.collect { |m| m.user.mail if m.user.mail_notification }.compact
|
||||
@from = Setting.mail_from
|
||||
@subject = "[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}] #{issue.status.name} - #{issue.subject}"
|
||||
@body['issue'] = issue
|
||||
@body['journal']= journal
|
||||
end
|
||||
|
||||
def document_add(document)
|
||||
set_language_if_valid(Setting.default_language)
|
||||
@recipients = document.project.users.collect { |u| u.mail if u.mail_notification }.compact
|
||||
@from = Setting.mail_from
|
||||
@subject = "[#{document.project.name}] #{l(:label_document_new)}: #{document.title}"
|
||||
@body['document'] = document
|
||||
end
|
||||
|
||||
def attachments_add(attachments)
|
||||
set_language_if_valid(Setting.default_language)
|
||||
container = attachments.first.container
|
||||
url = "http://#{Setting.host_name}/"
|
||||
added_to = ""
|
||||
case container.class.to_s
|
||||
when 'Version'
|
||||
url << "projects/list_files/#{container.project_id}"
|
||||
added_to = "#{l(:label_version)}: #{container.name}"
|
||||
when 'Document'
|
||||
url << "documents/show/#{container.id}"
|
||||
added_to = "#{l(:label_document)}: #{container.title}"
|
||||
when 'Issue'
|
||||
url << "issues/show/#{container.id}"
|
||||
added_to = "#{container.tracker.name} ##{container.id}: #{container.subject}"
|
||||
end
|
||||
@recipients = container.project.users.collect { |u| u.mail if u.mail_notification }.compact
|
||||
@from = Setting.mail_from
|
||||
@subject = "[#{container.project.name}] #{l(:label_attachment_new)}"
|
||||
@body['attachments'] = attachments
|
||||
@body['url'] = url
|
||||
@body['added_to'] = added_to
|
||||
end
|
||||
|
||||
def lost_password(token)
|
||||
set_language_if_valid(token.user.language)
|
||||
@recipients = token.user.mail
|
||||
@from = $RDM_MAIL_FROM
|
||||
@from = Setting.mail_from
|
||||
@subject = l(:mail_subject_lost_password)
|
||||
@body['token'] = token
|
||||
end
|
||||
|
||||
def register(token)
|
||||
set_language_if_valid(token.user.language)
|
||||
@recipients = token.user.mail
|
||||
@from = $RDM_MAIL_FROM
|
||||
@from = Setting.mail_from
|
||||
@subject = l(:mail_subject_register)
|
||||
@body['token'] = token
|
||||
end
|
||||
|
||||
@@ -65,6 +65,6 @@ class Project < ActiveRecord::Base
|
||||
protected
|
||||
def validate
|
||||
errors.add(parent_id, " must be a root project") if parent and parent.parent
|
||||
errors.add_to_base("A project with subprojects can't be a subproject") if parent and projects_count > 0
|
||||
errors.add_to_base("A project with subprojects can't be a subproject") if parent and children.size > 0
|
||||
end
|
||||
end
|
||||
|
||||
@@ -69,19 +69,20 @@ class Query < ActiveRecord::Base
|
||||
|
||||
def available_filters
|
||||
return @available_filters if @available_filters
|
||||
@available_filters = { "status_id" => { :type => :list_status, :order => 1, :values => IssueStatus.find(:all).collect{|s| [s.name, s.id.to_s] } },
|
||||
"tracker_id" => { :type => :list, :order => 2, :values => Tracker.find(:all).collect{|s| [s.name, s.id.to_s] } },
|
||||
@available_filters = { "status_id" => { :type => :list_status, :order => 1, :values => IssueStatus.find(:all, :order => 'position').collect{|s| [s.name, s.id.to_s] } },
|
||||
"tracker_id" => { :type => :list, :order => 2, :values => Tracker.find(:all, :order => 'position').collect{|s| [s.name, s.id.to_s] } },
|
||||
"priority_id" => { :type => :list, :order => 3, :values => Enumeration.find(:all, :conditions => ['opt=?','IPRI']).collect{|s| [s.name, s.id.to_s] } },
|
||||
"subject" => { :type => :text, :order => 7 },
|
||||
"created_on" => { :type => :date_past, :order => 8 },
|
||||
"updated_on" => { :type => :date_past, :order => 9 },
|
||||
"start_date" => { :type => :date, :order => 10 },
|
||||
"due_date" => { :type => :date, :order => 11 } }
|
||||
"subject" => { :type => :text, :order => 8 },
|
||||
"created_on" => { :type => :date_past, :order => 9 },
|
||||
"updated_on" => { :type => :date_past, :order => 10 },
|
||||
"start_date" => { :type => :date, :order => 11 },
|
||||
"due_date" => { :type => :date, :order => 12 } }
|
||||
unless project.nil?
|
||||
# project specific filters
|
||||
@available_filters["assigned_to_id"] = { :type => :list_optional, :order => 4, :values => @project.users.collect{|s| [s.name, s.id.to_s] } }
|
||||
@available_filters["author_id"] = { :type => :list, :order => 5, :values => @project.users.collect{|s| [s.name, s.id.to_s] } }
|
||||
@available_filters["category_id"] = { :type => :list_optional, :order => 6, :values => @project.issue_categories.collect{|s| [s.name, s.id.to_s] } }
|
||||
@available_filters["fixed_version_id"] = { :type => :list_optional, :order => 7, :values => @project.versions.collect{|s| [s.name, s.id.to_s] } }
|
||||
# remove category filter if no category defined
|
||||
@available_filters.delete "category_id" if @available_filters["category_id"][:values].empty?
|
||||
end
|
||||
|
||||
@@ -20,6 +20,7 @@ class Role < ActiveRecord::Base
|
||||
has_and_belongs_to_many :permissions
|
||||
has_many :workflows, :dependent => :delete_all
|
||||
has_many :members
|
||||
acts_as_list
|
||||
|
||||
validates_presence_of :name
|
||||
validates_uniqueness_of :name
|
||||
|
||||
61
app/models/setting.rb
Normal file
61
app/models/setting.rb
Normal file
@@ -0,0 +1,61 @@
|
||||
# redMine - project management software
|
||||
# Copyright (C) 2006-2007 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.
|
||||
|
||||
class Setting < ActiveRecord::Base
|
||||
|
||||
cattr_accessor :available_settings
|
||||
@@available_settings = YAML::load(File.open("#{RAILS_ROOT}/config/settings.yml"))
|
||||
|
||||
validates_uniqueness_of :name
|
||||
validates_inclusion_of :name, :in => @@available_settings.keys
|
||||
validates_numericality_of :value, :only_integer => true, :if => Proc.new { |setting| @@available_settings[setting.name]['format'] == 'int' }
|
||||
|
||||
def self.get(name)
|
||||
name = name.to_s
|
||||
setting = find_by_name(name)
|
||||
setting ||= new(:name => name, :value => @@available_settings[name]['default']) if @@available_settings.has_key? name
|
||||
setting
|
||||
end
|
||||
|
||||
def self.[](name)
|
||||
get(name).value
|
||||
end
|
||||
|
||||
def self.[]=(name, value)
|
||||
setting = get(name)
|
||||
setting.value = (value ? value.to_s : "")
|
||||
setting.save
|
||||
setting.value
|
||||
end
|
||||
|
||||
@@available_settings.each do |name, params|
|
||||
src = <<-END_SRC
|
||||
def self.#{name}
|
||||
self[:#{name}]
|
||||
end
|
||||
|
||||
def self.#{name}?
|
||||
self[:#{name}].to_s == "1"
|
||||
end
|
||||
|
||||
def self.#{name}=(value)
|
||||
self[:#{name}] = value
|
||||
end
|
||||
END_SRC
|
||||
class_eval src, __FILE__, __LINE__
|
||||
end
|
||||
end
|
||||
@@ -20,6 +20,7 @@ class Tracker < ActiveRecord::Base
|
||||
has_many :issues
|
||||
has_many :workflows, :dependent => :delete_all
|
||||
has_and_belongs_to_many :custom_fields, :class_name => 'IssueCustomField', :join_table => 'custom_fields_trackers', :association_foreign_key => 'custom_field_id'
|
||||
acts_as_list
|
||||
|
||||
validates_presence_of :name
|
||||
validates_uniqueness_of :name
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# redMine - project management software
|
||||
# Copyright (C) 2006 Jean-Philippe Lang
|
||||
# Copyright (C) 2006-2007 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
|
||||
@@ -49,7 +49,19 @@ class User < ActiveRecord::Base
|
||||
# update hashed_password if password was set
|
||||
self.hashed_password = User.hash_password(self.password) if self.password
|
||||
end
|
||||
|
||||
|
||||
def self.active
|
||||
with_scope :find => { :conditions => [ "status = ?", STATUS_ACTIVE ] } do
|
||||
yield
|
||||
end
|
||||
end
|
||||
|
||||
def self.find_active(*args)
|
||||
active do
|
||||
find(*args)
|
||||
end
|
||||
end
|
||||
|
||||
# Returns the user that matches provided login and password, or nil
|
||||
def self.try_to_login(login, password)
|
||||
user = find(:first, :conditions => ["login=?", login])
|
||||
@@ -69,7 +81,7 @@ class User < ActiveRecord::Base
|
||||
if attrs
|
||||
onthefly = new(*attrs)
|
||||
onthefly.login = login
|
||||
onthefly.language = $RDM_DEFAULT_LANG
|
||||
onthefly.language = Setting.default_language
|
||||
if onthefly.save
|
||||
user = find(:first, :conditions => ["login=?", login])
|
||||
logger.info("User '#{user.login}' created on the fly.") if logger
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
class UserPreference < ActiveRecord::Base
|
||||
belongs_to :user
|
||||
serialize :others, Hash
|
||||
serialize :others
|
||||
|
||||
attr_protected :others
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<center>
|
||||
<div class="box login">
|
||||
<h2><%= image_tag 'login' %> <%=l(:label_please_login)%></h2>
|
||||
<h2 class="icon22 icon22-authent"><%=l(:label_please_login)%></h2>
|
||||
|
||||
<%= start_form_tag({:action=> "login"}, :class => "tabular") %>
|
||||
<% form_tag({:action=> "login"}, :class => "tabular") do %>
|
||||
<p><label for="login"><%=l(:field_login)%>:</label>
|
||||
<%= text_field_tag 'login', nil, :size => 25 %></p>
|
||||
|
||||
@@ -10,9 +10,15 @@
|
||||
<%= password_field_tag 'password', nil, :size => 25 %></p>
|
||||
|
||||
<p><center><input type="submit" name="login" value="<%=l(:button_login)%> »" class="primary" /></center>
|
||||
<%= end_form_tag %>
|
||||
<% end %>
|
||||
|
||||
<br><% unless $RDM_SELF_REGISTRATION == false %><%= link_to l(:label_register), :action => 'register' %> |<% end %>
|
||||
<%= link_to l(:label_password_lost), :action => 'lost_password' %></p>
|
||||
<br>
|
||||
<% links = []
|
||||
links << link_to(l(:label_register), :action => 'register') if Setting.self_registration?
|
||||
links << link_to(l(:label_password_lost), :action => 'lost_password') if Setting.lost_password?
|
||||
%>
|
||||
<%= links.join(" | ") %>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</center>
|
||||
@@ -2,13 +2,13 @@
|
||||
<div class="box login">
|
||||
<h2><%=l(:label_password_lost)%></h2>
|
||||
|
||||
<%= start_form_tag({:action=> "lost_password"}, :class => "tabular") %>
|
||||
<% form_tag({:action=> "lost_password"}, :class => "tabular") do %>
|
||||
|
||||
<p><label for="mail"><%=l(:field_mail)%> <span class="required">*</span></label>
|
||||
<%= text_field_tag 'mail', nil, :size => 40 %></p>
|
||||
|
||||
<p><center><%= submit_tag l(:button_submit) %></center></p>
|
||||
|
||||
<%= end_form_tag %>
|
||||
<% end %>
|
||||
</div>
|
||||
</center>
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<%= error_messages_for 'user' %>
|
||||
|
||||
<%= start_form_tag({:token => @token.value}, :class => "tabular") %>
|
||||
<% form_tag({:token => @token.value}, :class => "tabular") do %>
|
||||
|
||||
<p><label for="new_password"><%=l(:field_new_password)%> <span class="required">*</span></label>
|
||||
<%= password_field_tag 'new_password', nil, :size => 25 %></p>
|
||||
@@ -15,7 +15,7 @@
|
||||
<%= password_field_tag 'new_password_confirmation', nil, :size => 25 %></p>
|
||||
|
||||
<p><center><%= submit_tag l(:button_save) %></center></p>
|
||||
<%= end_form_tag %>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
</center>
|
||||
@@ -1,6 +1,6 @@
|
||||
<h2><%=l(:label_register)%></h2>
|
||||
|
||||
<%= start_form_tag({:action => 'register'}, :class => "tabular") %>
|
||||
<% form_tag({:action => 'register'}, :class => "tabular") do %>
|
||||
<%= error_messages_for 'user' %>
|
||||
|
||||
<div class="box">
|
||||
@@ -36,4 +36,11 @@
|
||||
</div>
|
||||
|
||||
<%= submit_tag l(:button_submit) %>
|
||||
<%= end_form_tag %>
|
||||
<% end %>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= javascript_include_tag 'calendar/calendar' %>
|
||||
<%= javascript_include_tag "calendar/lang/calendar-#{current_language}.js" %>
|
||||
<%= javascript_include_tag 'calendar/calendar-setup' %>
|
||||
<%= stylesheet_link_tag 'calendar' %>
|
||||
<% end %>
|
||||
|
||||
@@ -1,50 +1,45 @@
|
||||
<h2><%=l(:label_administration)%></h2>
|
||||
|
||||
<p>
|
||||
<%= image_tag "projects" %>
|
||||
<p class="icon22 icon22-projects">
|
||||
<%= link_to l(:label_project_plural), :controller => 'admin', :action => 'projects' %> |
|
||||
<%= link_to l(:label_new), :controller => 'projects', :action => 'add' %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<%= image_tag "users" %>
|
||||
<p class="icon22 icon22-users">
|
||||
<%= link_to l(:label_user_plural), :controller => 'users' %> |
|
||||
<%= link_to l(:label_new), :controller => 'users', :action => 'add' %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<%= image_tag "role" %>
|
||||
<p class="icon22 icon22-role">
|
||||
<%= link_to l(:label_role_and_permissions), :controller => 'roles' %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<%= image_tag "tracker" %>
|
||||
<p class="icon22 icon22-tracker">
|
||||
<%= link_to l(:label_tracker_plural), :controller => 'trackers' %> |
|
||||
<%= link_to l(:label_custom_field_plural), :controller => 'custom_fields' %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<%= image_tag "workflow" %>
|
||||
<%= link_to l(:label_issue_status_plural), :controller => 'issue_statuses' %> |
|
||||
<%= link_to l(:label_workflow), :controller => 'roles', :action => 'workflow' %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<%= image_tag "options" %>
|
||||
<p class="icon22 icon22-workflow">
|
||||
<%= link_to l(:label_custom_field_plural), :controller => 'custom_fields' %>
|
||||
</p>
|
||||
|
||||
<p class="icon22 icon22-options">
|
||||
<%= link_to l(:label_enumerations), :controller => 'enumerations' %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<%= image_tag "mailer" %>
|
||||
<p class="icon22 icon22-notifications">
|
||||
<%= link_to l(:field_mail_notification), :controller => 'admin', :action => 'mail_options' %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<%= image_tag "login" %>
|
||||
<p class="icon22 icon22-authent">
|
||||
<%= link_to l(:label_authentication), :controller => 'auth_sources' %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<%= image_tag "help" %>
|
||||
<p class="icon22 icon22-settings">
|
||||
<%= link_to l(:label_settings), :controller => 'settings' %>
|
||||
</p>
|
||||
|
||||
<p class="icon22 icon22-info">
|
||||
<%= link_to l(:label_information_plural), :controller => 'admin', :action => 'info' %>
|
||||
</p>
|
||||
@@ -1,10 +1,3 @@
|
||||
<h2><%=l(:label_information_plural)%></h2>
|
||||
|
||||
<p><%=l(:field_version)%>: <strong><%= RDM_APP_NAME %> <%= RDM_APP_VERSION %></strong></p>
|
||||
|
||||
<%=l(:label_environment)%>:
|
||||
<ul>
|
||||
<% Rails::Info.properties.each do |name, value| %>
|
||||
<li><%= name %>: <%= value %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<p><%=l(:field_version)%>: <strong>redMine <%= Redmine::VERSION %></strong></p>
|
||||
@@ -1,6 +1,6 @@
|
||||
<h2><%=l(:field_mail_notification)%></h2>
|
||||
|
||||
<%= start_form_tag ({}, :id => 'mail_options_form')%>
|
||||
<% form_tag ({:action => 'mail_options'}, :id => 'mail_options_form') do %>
|
||||
|
||||
<div class="box">
|
||||
<p><%=l(:text_select_mail_notifications)%></p>
|
||||
@@ -21,4 +21,4 @@
|
||||
</div>
|
||||
|
||||
<%= submit_tag l(:button_save) %>
|
||||
<%= end_form_tag %>
|
||||
<% end %>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div class="contextual">
|
||||
<%= link_to l(:label_project_new), {:controller => 'projects', :action => 'add'}, :class => 'pic picAdd' %>
|
||||
<%= link_to l(:label_project_new), {:controller => 'projects', :action => 'add'}, :class => 'icon icon-add' %>
|
||||
</div>
|
||||
|
||||
<h2><%=l(:label_project_plural)%></h2>
|
||||
@@ -18,8 +18,8 @@
|
||||
<tr class="<%= cycle("odd", "even") %>">
|
||||
<td><%= link_to project.name, :controller => 'projects', :action => 'settings', :id => project %>
|
||||
<td><%=h project.description %>
|
||||
<td align="center"><%= image_tag 'true' if project.is_public? %>
|
||||
<td align="center"><%= project.projects_count %>
|
||||
<td align="center"><%= image_tag 'true.png' if project.is_public? %>
|
||||
<td align="center"><%= project.children.size %>
|
||||
<td align="center"><%= format_date(project.created_on) %>
|
||||
<td align="center">
|
||||
<%= button_to l(:button_delete), { :controller => 'projects', :action => 'destroy', :id => project }, :class => "button-small" %>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<h2><%=l(:label_auth_source)%> (<%= @auth_source.auth_method_name %>)</h2>
|
||||
|
||||
<%= start_form_tag({:action => 'update', :id => @auth_source}, :class => "tabular") %>
|
||||
<% form_tag({:action => 'update', :id => @auth_source}, :class => "tabular") do %>
|
||||
<%= render :partial => 'form' %>
|
||||
<%= submit_tag l(:button_save) %>
|
||||
<%= end_form_tag %>
|
||||
<% end %>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div class="contextual">
|
||||
<%= link_to l(:label_auth_source_new), {:action => 'new'}, :class => 'pic picAdd' %>
|
||||
<%= link_to l(:label_auth_source_new), {:action => 'new'}, :class => 'icon icon-add' %>
|
||||
</div>
|
||||
|
||||
<h2><%=l(:label_auth_source_plural)%></h2>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<h2><%=l(:label_auth_source_new)%> (<%= @auth_source.auth_method_name %>)</h2>
|
||||
|
||||
<%= start_form_tag({:action => 'create'}, :class => "tabular") %>
|
||||
<% form_tag({:action => 'create'}, :class => "tabular") do %>
|
||||
<%= render :partial => 'form' %>
|
||||
<%= submit_tag l(:button_create) %>
|
||||
<%= end_form_tag %>
|
||||
<% end %>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<%= error_messages_for 'custom_field' %>
|
||||
|
||||
<script>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function toggle_custom_field_format() {
|
||||
format = $("custom_field_field_format");
|
||||
p_length = $("custom_field_min_length");
|
||||
@@ -10,28 +11,47 @@ function toggle_custom_field_format() {
|
||||
case "list":
|
||||
Element.hide(p_length.parentNode);
|
||||
Element.hide(p_regexp.parentNode);
|
||||
Element.show(p_values.parentNode);
|
||||
Element.show(p_values);
|
||||
break;
|
||||
case "int":
|
||||
case "string":
|
||||
case "text":
|
||||
Element.show(p_length.parentNode);
|
||||
Element.show(p_regexp.parentNode);
|
||||
Element.hide(p_values.parentNode);
|
||||
Element.hide(p_values);
|
||||
break;
|
||||
case "date":
|
||||
case "bool":
|
||||
Element.hide(p_length.parentNode);
|
||||
Element.hide(p_regexp.parentNode);
|
||||
Element.hide(p_values.parentNode);
|
||||
Element.hide(p_values);
|
||||
break;
|
||||
default:
|
||||
Element.show(p_length.parentNode);
|
||||
Element.show(p_regexp.parentNode);
|
||||
Element.show(p_values.parentNode);
|
||||
Element.show(p_values);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
function addValueField() {
|
||||
var f = $$('p#custom_field_possible_values span');
|
||||
p = document.getElementById("custom_field_possible_values");
|
||||
var v = f[0].cloneNode(true);
|
||||
v.childNodes[0].value = "";
|
||||
p.appendChild(v);
|
||||
}
|
||||
|
||||
function deleteValueField(e) {
|
||||
var f = $$('p#custom_field_possible_values span');
|
||||
if (f.length == 1) {
|
||||
e.parentNode.childNodes[0].value = "";
|
||||
} else {
|
||||
Element.remove(e.parentNode);
|
||||
}
|
||||
}
|
||||
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
<!--[form:custom_field]-->
|
||||
@@ -42,7 +62,12 @@ function toggle_custom_field_format() {
|
||||
<%= f.text_field :min_length, :size => 5, :no_label => true %> -
|
||||
<%= f.text_field :max_length, :size => 5, :no_label => true %><br>(<%=l(:text_min_max_length_info)%>)</p>
|
||||
<p><%= f.text_field :regexp, :size => 50 %><br>(<%=l(:text_regexp_info)%>)</p>
|
||||
<p><%= f.text_area :possible_values, :rows => 5, :cols => 60 %><br>(<%=l(:text_possible_values_info)%>)</p>
|
||||
<p id="custom_field_possible_values"><label><%= l(:field_possible_values) %> <%= image_to_function "add.png", "addValueField();return false" %></label>
|
||||
<% (@custom_field.possible_values.to_a + [""]).each do |value| %>
|
||||
<span><%= text_field_tag 'custom_field[possible_values][]', value, :size => 30 %> <%= image_to_function "delete.png", "deleteValueField(this);return false" %><br /></span>
|
||||
<% end %>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
<%= javascript_tag "toggle_custom_field_format();" %>
|
||||
<!--[eoform:custom_field]-->
|
||||
|
||||
@@ -1,38 +1,46 @@
|
||||
<h2><%=l(:label_custom_field_plural)%></h2>
|
||||
|
||||
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li><%= link_to l(:label_issue_plural), {}, :id=> "tab-IssueCustomField", :onclick => "showTab('IssueCustomField'); this.blur(); return false;" %></li>
|
||||
<li><%= link_to l(:label_project_plural), {}, :id=> "tab-ProjectCustomField", :onclick => "showTab('ProjectCustomField'); this.blur(); return false;" %></li>
|
||||
<li><%= link_to l(:label_user_plural), {}, :id=> "tab-UserCustomField", :onclick => "showTab('UserCustomField'); this.blur(); return false;" %></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<% %w(IssueCustomField ProjectCustomField UserCustomField).each do |type| %>
|
||||
<div id="tab-content-<%= type %>" class="tab-content">
|
||||
<table class="list">
|
||||
<thead><tr>
|
||||
<th><%=l(:field_name)%></th>
|
||||
<th><%=l(:field_type)%></th>
|
||||
<th width="30%"><%=l(:field_name)%></th>
|
||||
<th><%=l(:field_field_format)%></th>
|
||||
<th><%=l(:field_is_required)%></th>
|
||||
<th><%=l(:field_is_required)%></th>
|
||||
<% if type == 'IssueCustomField' %>
|
||||
<th><%=l(:field_is_for_all)%></th>
|
||||
<th><%=l(:label_used_by)%></th>
|
||||
<th></th>
|
||||
<th><%=l(:label_used_by)%></th>
|
||||
<% end %>
|
||||
<th width="10%"></th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<% for custom_field in @custom_fields %>
|
||||
<% for custom_field in (@custom_fields_by_type[type] || []) %>
|
||||
<tr class="<%= cycle("odd", "even") %>">
|
||||
<td><%= link_to custom_field.name, :action => 'edit', :id => custom_field %></td>
|
||||
<td align="center"><%= l(custom_field.type_name) %></td>
|
||||
<td><%= link_to custom_field.name, :action => 'edit', :id => custom_field %></td>
|
||||
<td align="center"><%= l(CustomField::FIELD_FORMATS[custom_field.field_format][:name]) %></td>
|
||||
<td align="center"><%= image_tag 'true' if custom_field.is_required? %></td>
|
||||
<td align="center"><%= image_tag 'true' if custom_field.is_for_all? %></td>
|
||||
<td align="center"><%= image_tag 'true.png' if custom_field.is_required? %></td>
|
||||
<% if type == 'IssueCustomField' %>
|
||||
<td align="center"><%= image_tag 'true.png' if custom_field.is_for_all? %></td>
|
||||
<td align="center"><%= custom_field.projects.count.to_s + ' ' + lwr(:label_project, custom_field.projects.count) if custom_field.is_a? IssueCustomField and !custom_field.is_for_all? %></td>
|
||||
<% end %>
|
||||
<td align="center">
|
||||
<%= button_to l(:button_delete), { :action => 'destroy', :id => custom_field }, :confirm => l(:text_are_you_sure), :class => "button-small" %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% end; reset_cycle %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<%= pagination_links_full @custom_field_pages %>
|
||||
|
||||
</table>
|
||||
<br />
|
||||
<%=l(:label_custom_field_new)%>:
|
||||
<ul>
|
||||
<li><%= link_to l(:label_issue_plural), :action => 'new', :type => 'IssueCustomField' %></li>
|
||||
<li><%= link_to l(:label_project_plural), :action => 'new', :type => 'ProjectCustomField' %></li>
|
||||
<li><%= link_to l(:label_user_plural), :action => 'new', :type => 'UserCustomField' %></li>
|
||||
</ul>
|
||||
<%= link_to l(:label_custom_field_new), {:action => 'new', :type => type}, :class => 'icon icon-add' %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= javascript_tag "showTab('#{@tab}');" %>
|
||||
@@ -1,3 +1,3 @@
|
||||
<p><%= link_to h(document.title), :controller => 'documents', :action => 'show', :id => document %><br />
|
||||
<% unless document.description.empty? %><%=h truncate document.description, 250 %><br /><% end %>
|
||||
<% unless document.description.empty? %><%=h(truncate(document.description, 250)) %><br /><% end %>
|
||||
<em><%= format_time(document.created_on) %></em></p>
|
||||
@@ -14,7 +14,7 @@
|
||||
<!--[eoform:document]-->
|
||||
</div>
|
||||
|
||||
<% unless $RDM_TEXTILE_DISABLED %>
|
||||
<% if Setting.text_formatting == 'textile' %>
|
||||
<%= javascript_include_tag 'jstoolbar' %>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<h2><%=l(:label_document)%></h2>
|
||||
|
||||
<%= start_form_tag({:action => 'edit', :id => @document}, :class => "tabular") %>
|
||||
<% form_tag({:action => 'edit', :id => @document}, :class => "tabular") do %>
|
||||
<%= render :partial => 'form' %>
|
||||
<%= submit_tag l(:button_save) %>
|
||||
<%= end_form_tag %>
|
||||
<% end %>
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div class="contextual">
|
||||
<%= link_to_if_authorized l(:button_edit), {:controller => 'documents', :action => 'edit', :id => @document}, :class => 'pic picEdit' %>
|
||||
<%= link_to_if_authorized l(:button_delete), {:controller => 'documents', :action => 'destroy', :id => @document}, :confirm => l(:text_are_you_sure), :post => true, :class => 'pic picDelete' %>
|
||||
<%= link_to_if_authorized l(:button_edit), {:controller => 'documents', :action => 'edit', :id => @document}, :class => 'icon icon-edit' %>
|
||||
<%= link_to_if_authorized l(:button_delete), {:controller => 'documents', :action => 'destroy', :id => @document}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %>
|
||||
</div>
|
||||
|
||||
<h2><%= @document.title %></h2>
|
||||
@@ -15,10 +15,10 @@
|
||||
<% for attachment in @attachments %>
|
||||
<li>
|
||||
<div class="contextual">
|
||||
<%= link_to_if_authorized l(:button_delete), {:controller => 'documents', :action => 'destroy_attachment', :id => @document, :attachment_id => attachment}, :confirm => l(:text_are_you_sure), :post => true, :class => 'pic picDelete' %>
|
||||
<%= link_to_if_authorized l(:button_delete), {:controller => 'documents', :action => 'destroy_attachment', :id => @document, :attachment_id => attachment}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %>
|
||||
</div>
|
||||
<%= link_to attachment.filename, :action => 'download', :id => @document, :attachment_id => attachment %>
|
||||
(<%= human_size attachment.filesize %>)<br />
|
||||
(<%= number_to_human_size attachment.filesize %>)<br />
|
||||
<em><%= attachment.author.display_name %>, <%= format_date(attachment.created_on) %></em><br />
|
||||
<%= lwr(:label_download, attachment.downloads) %>
|
||||
</li>
|
||||
@@ -28,10 +28,10 @@
|
||||
|
||||
|
||||
<% if authorize_for('documents', 'add_attachment') %>
|
||||
<%= start_form_tag ({ :controller => 'documents', :action => 'add_attachment', :id => @document }, :multipart => true, :class => "tabular") %>
|
||||
<p id="attachments_p"><label for="attachment_file"><%=l(:label_attachment)%>
|
||||
<%= link_to_function image_tag('add'), "addFileField()" %></label>
|
||||
<%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= human_size(Attachment.max_size) %>)</em></p>
|
||||
<% form_tag ({ :controller => 'documents', :action => 'add_attachment', :id => @document }, :multipart => true, :class => "tabular") do %>
|
||||
<p id="attachments_p"><label for="attachment_file"><%=l(:label_attachment)%>
|
||||
<%= image_to_function "add.png", "addFileField();return false" %></label>
|
||||
<%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)</em></p>
|
||||
<%= submit_tag l(:button_add) %>
|
||||
<%= end_form_tag %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<h2><%=l(:label_enumerations)%></h2>
|
||||
|
||||
<%= start_form_tag({:action => 'update', :id => @enumeration}, :class => "tabular") %>
|
||||
<% form_tag({:action => 'update', :id => @enumeration}, :class => "tabular") do %>
|
||||
<%= render :partial => 'form' %>
|
||||
<%= submit_tag l(:button_save) %>
|
||||
<%= end_form_tag %>
|
||||
<% end %>
|
||||
|
||||
<%= start_form_tag :action => 'destroy', :id => @enumeration %>
|
||||
<% form_tag({:action => 'destroy', :id => @enumeration}) do %>
|
||||
<%= submit_tag l(:button_delete) %>
|
||||
<%= end_form_tag %>
|
||||
<% end %>
|
||||
@@ -10,7 +10,7 @@
|
||||
<li><%= link_to value.name, :action => 'edit', :id => value %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<p><%= link_to l(:label_enumeration_new), { :action => 'new', :opt => option }, :class => "pic picAdd" %></p>
|
||||
<p><%= link_to l(:label_enumeration_new), { :action => 'new', :opt => option }, :class => "icon icon-add" %></p>
|
||||
|
||||
<% else %>
|
||||
<h3><%= link_to l(name), :opt => option %></h3>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<h2><%= l(@enumeration.option_name) %>: <%=l(:label_enumeration_new)%></h2>
|
||||
|
||||
<%= start_form_tag({:action => 'create'}, :class => "tabular") %>
|
||||
<% form_tag({:action => 'create'}, :class => "tabular") do %>
|
||||
<%= render :partial => 'form' %>
|
||||
<%= submit_tag l(:button_create) %>
|
||||
<%= end_form_tag %>
|
||||
<% end %>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
xml.instruct!
|
||||
xml.rss "version" => "2.0", "xmlns:dc" => "http://purl.org/dc/elements/1.1/" do
|
||||
xml.channel do
|
||||
xml.title "#{$RDM_HEADER_TITLE}: #{l(:label_news_latest)}"
|
||||
xml.link url_for(:controller => '', :only_path => false)
|
||||
xml.title "#{Setting.app_title}: #{l(:label_news_latest)}"
|
||||
xml.link url_for(:controller => 'welcome', :only_path => false)
|
||||
xml.pubDate CGI.rfc1123_date(@news.first.created_on)
|
||||
xml.description "#{$RDM_HEADER_TITLE}: #{l(:label_news_latest)}"
|
||||
xml.description l(:label_news_latest)
|
||||
@news.each do |news|
|
||||
xml.item do
|
||||
xml.title "#{news.project.name}: #{news.title}"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<h2><%=l(:label_issue_category)%></h2>
|
||||
|
||||
<%= start_form_tag({:action => 'edit', :id => @category}, :class => "tabular") %>
|
||||
<% form_tag({:action => 'edit', :id => @category}, :class => "tabular") do %>
|
||||
<%= render :partial => 'form' %>
|
||||
<%= submit_tag l(:button_save) %>
|
||||
<%= end_form_tag %>
|
||||
<% end %>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<h2><%=l(:label_issue_status)%></h2>
|
||||
|
||||
<%= start_form_tag({:action => 'update', :id => @issue_status}, :class => "tabular") %>
|
||||
<% form_tag({:action => 'update', :id => @issue_status}, :class => "tabular") do %>
|
||||
<%= render :partial => 'form' %>
|
||||
<%= submit_tag l(:button_save) %>
|
||||
<%= end_form_tag %>
|
||||
<% end %>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div class="contextual">
|
||||
<%= link_to l(:label_issue_status_new), {:action => 'new'}, :class => 'pic picAdd' %>
|
||||
<%= link_to l(:label_issue_status_new), {:action => 'new'}, :class => 'icon icon-add' %>
|
||||
</div>
|
||||
|
||||
<h2><%=l(:label_issue_status_plural)%></h2>
|
||||
@@ -9,14 +9,21 @@
|
||||
<th><%=l(:field_status)%></th>
|
||||
<th><%=l(:field_is_default)%></th>
|
||||
<th><%=l(:field_is_closed)%></th>
|
||||
<th><%=l(:button_sort)%></th>
|
||||
<th></th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<% for status in @issue_statuses %>
|
||||
<tr class="<%= cycle("odd", "even") %>">
|
||||
<td><div class="square" style="background:#<%= status.html_color %>;"></div> <%= link_to status.name, :action => 'edit', :id => status %></td>
|
||||
<td align="center"><%= image_tag 'true' if status.is_default? %></td>
|
||||
<td align="center"><%= image_tag 'true' if status.is_closed? %></td>
|
||||
<td align="center"><%= image_tag 'true.png' if status.is_default? %></td>
|
||||
<td align="center"><%= image_tag 'true.png' if status.is_closed? %></td>
|
||||
<td align="center">
|
||||
<%= link_to image_tag('2uparrow.png', :alt => l(:label_sort_highest)), {:action => 'move', :id => status, :position => 'highest'}, :method => :post, :title => l(:label_sort_highest) %>
|
||||
<%= link_to image_tag('1uparrow.png', :alt => l(:label_sort_higher)), {:action => 'move', :id => status, :position => 'higher'}, :method => :post, :title => l(:label_sort_higher) %> -
|
||||
<%= link_to image_tag('1downarrow.png', :alt => l(:label_sort_lower)), {:action => 'move', :id => status, :position => 'lower'}, :method => :post, :title => l(:label_sort_lower) %>
|
||||
<%= link_to image_tag('2downarrow.png', :alt => l(:label_sort_lowest)), {:action => 'move', :id => status, :position => 'lowest'}, :method => :post, :title => l(:label_sort_lowest) %>
|
||||
</td>
|
||||
<td align="center">
|
||||
<%= button_to l(:button_delete), { :action => 'destroy', :id => status }, :confirm => l(:text_are_you_sure), :class => "button-small" %>
|
||||
</td>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<h2><%=l(:label_issue_status_new)%></h2>
|
||||
|
||||
<%= start_form_tag({:action => 'create'}, :class => "tabular") %>
|
||||
<% form_tag({:action => 'create'}, :class => "tabular") do %>
|
||||
<%= render :partial => 'form' %>
|
||||
<%= submit_tag l(:button_create) %>
|
||||
<%= end_form_tag %>
|
||||
<% end %>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<% if authorize_for('projects', 'add_issue') %>
|
||||
<%= start_form_tag({ :controller => 'projects', :action => 'add_issue', :id => @project }, :method => 'get') %>
|
||||
<% form_tag({ :controller => 'projects', :action => 'add_issue', :id => @project }, :method => 'get') do %>
|
||||
<%= l(:label_issue_new) %>: <%= select_tag 'tracker_id', ("<option></option>" + options_from_collection_for_select(trackers, 'id', 'name')), :onchange => "if (this.value!='') {this.form.submit();}" %>
|
||||
<%= end_form_tag %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
for attachment in issue.attachments
|
||||
pdf.SetFont('Arial','',8)
|
||||
pdf.Cell(80,5, attachment.filename)
|
||||
pdf.Cell(20,5, human_size(attachment.filesize),0,0,"R")
|
||||
pdf.Cell(20,5, number_to_human_size(attachment.filesize),0,0,"R")
|
||||
pdf.Cell(20,5, format_date(attachment.created_on),0,0,"R")
|
||||
pdf.Cell(70,5, attachment.author.name,0,0,"R")
|
||||
pdf.Ln
|
||||
|
||||
6
app/views/issues/_tooltip.rhtml
Normal file
6
app/views/issues/_tooltip.rhtml
Normal file
@@ -0,0 +1,6 @@
|
||||
<%= link_to "#{issue.tracker.name} ##{issue.id}", { :controller => 'issues', :action => 'show', :id => issue } %></strong>: <%=h issue.subject %><br />
|
||||
<br />
|
||||
<strong><%= l(:field_start_date) %></strong>: <%= format_date(issue.start_date) %><br />
|
||||
<strong><%= l(:field_due_date) %></strong>: <%= format_date(issue.due_date) %><br />
|
||||
<strong><%= l(:field_assigned_to) %></strong>: <%= issue.assigned_to ? issue.assigned_to.name : "-" %><br />
|
||||
<strong><%= l(:field_priority) %></strong>: <%= issue.priority.name %>
|
||||
@@ -1,7 +1,7 @@
|
||||
<h2><%=l(:label_issue)%> #<%= @issue.id %>: <%=h @issue.subject %></h2>
|
||||
|
||||
<%= error_messages_for 'issue' %>
|
||||
<%= start_form_tag({:action => 'change_status', :id => @issue}, :class => "tabular") %>
|
||||
<% form_tag({:action => 'change_status', :id => @issue}, :class => "tabular") do %>
|
||||
|
||||
<%= hidden_field_tag 'confirm', 1 %>
|
||||
<%= hidden_field_tag 'new_status_id', @new_status.id %>
|
||||
@@ -34,4 +34,4 @@
|
||||
|
||||
<%= hidden_field 'issue', 'lock_version' %>
|
||||
<%= submit_tag l(:button_save) %>
|
||||
<%= end_form_tag %>
|
||||
<% end %>
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<%= submit_tag l(:button_save) %>
|
||||
<% end %>
|
||||
|
||||
<% unless $RDM_TEXTILE_DISABLED %>
|
||||
<% if Setting.text_formatting == 'textile' %>
|
||||
<%= javascript_include_tag 'jstoolbar' %>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
@@ -46,4 +46,11 @@ if (document.getElementById) {
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
<% end %>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= javascript_include_tag 'calendar/calendar' %>
|
||||
<%= javascript_include_tag "calendar/lang/calendar-#{current_language}.js" %>
|
||||
<%= javascript_include_tag 'calendar/calendar-setup' %>
|
||||
<%= stylesheet_link_tag 'calendar' %>
|
||||
<% end %>
|
||||
@@ -1,4 +1,5 @@
|
||||
<% pdf=IfpdfHelper::IFPDF.new
|
||||
pdf.SetTitle("#{@project.name} - ##{@issue.tracker.name} #{@issue.id}")
|
||||
pdf.AliasNbPages
|
||||
pdf.footer_date = format_date(Date.today)
|
||||
pdf.AddPage
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div class="contextual">
|
||||
<%= l(:label_export_to) %><%= link_to 'PDF', {:action => 'export_pdf', :id => @issue}, :class => 'pic picPdf' %>
|
||||
<%= l(:label_export_to) %><%= link_to 'PDF', {:action => 'export_pdf', :id => @issue}, :class => 'icon icon-pdf' %>
|
||||
</div>
|
||||
|
||||
<h2><%= @issue.tracker.name %> #<%= @issue.id %> - <%=h @issue.subject %></h2>
|
||||
@@ -7,8 +7,8 @@
|
||||
<div class="box">
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td width="15%"><b><%=l(:field_status)%> :</b></td><td width="35%"><%= @issue.status.name %></td>
|
||||
<td width="15%"><b><%=l(:field_priority)%> :</b></td><td width="35%"><%= @issue.priority.name %></td>
|
||||
<td style="width:15%"><b><%=l(:field_status)%> :</b></td><td style="width:35%"><%= @issue.status.name %></td>
|
||||
<td style="width:15%"><b><%=l(:field_priority)%> :</b></td><td style="width:35%"><%= @issue.priority.name %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b><%=l(:field_assigned_to)%> :</b></td><td><%= @issue.assigned_to ? @issue.assigned_to.name : "-" %></td>
|
||||
@@ -26,6 +26,10 @@
|
||||
<td><b><%=l(:field_updated_on)%> :</b></td><td><%= format_date(@issue.updated_on) %></td>
|
||||
<td><b><%=l(:field_done_ratio)%> :</b></td><td><%= @issue.done_ratio %> %</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b><%=l(:field_fixed_version)%> :</b></td><td><%= @issue.fixed_version ? @issue.fixed_version.name : "-" %></td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<% n = 0
|
||||
for custom_value in @custom_values %>
|
||||
@@ -46,19 +50,19 @@ end %>
|
||||
<br />
|
||||
|
||||
<div class="contextual">
|
||||
<%= link_to_if_authorized l(:button_edit), {:controller => 'issues', :action => 'edit', :id => @issue}, :class => 'pic picEdit' %>
|
||||
<%= link_to_if_authorized l(:button_move), {:controller => 'projects', :action => 'move_issues', :id => @project, "issue_ids[]" => @issue.id }, :class => 'pic picMove' %>
|
||||
<%= link_to_if_authorized l(:button_delete), {:controller => 'issues', :action => 'destroy', :id => @issue}, :confirm => l(:text_are_you_sure), :post => true, :class => 'pic picDelete' %>
|
||||
<%= link_to_if_authorized l(:button_edit), {:controller => 'issues', :action => 'edit', :id => @issue}, :class => 'icon icon-edit' %>
|
||||
<%= link_to_if_authorized l(:button_move), {:controller => 'projects', :action => 'move_issues', :id => @project, "issue_ids[]" => @issue.id }, :class => 'icon icon-move' %>
|
||||
<%= link_to_if_authorized l(:button_delete), {:controller => 'issues', :action => 'destroy', :id => @issue}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %>
|
||||
</div>
|
||||
|
||||
<% if authorize_for('issues', 'change_status') and @status_options and !@status_options.empty? %>
|
||||
<%= start_form_tag ({:controller => 'issues', :action => 'change_status', :id => @issue}) %>
|
||||
<% form_tag ({:controller => 'issues', :action => 'change_status', :id => @issue}) do %>
|
||||
<%=l(:label_change_status)%> :
|
||||
<select name="new_status_id">
|
||||
<%= options_from_collection_for_select @status_options, "id", "name" %>
|
||||
</select>
|
||||
<%= submit_tag l(:button_change) %>
|
||||
<%= end_form_tag %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
@@ -77,31 +81,31 @@ end %>
|
||||
<table width="100%">
|
||||
<% for attachment in @issue.attachments %>
|
||||
<tr>
|
||||
<td><%= link_to attachment.filename, { :action => 'download', :id => @issue, :attachment_id => attachment }, :class => 'icon attachment' %> (<%= human_size(attachment.filesize) %>)</td>
|
||||
<td><%= link_to attachment.filename, { :action => 'download', :id => @issue, :attachment_id => attachment }, :class => 'icon icon-attachment' %> (<%= number_to_human_size(attachment.filesize) %>)</td>
|
||||
<td><%= format_date(attachment.created_on) %></td>
|
||||
<td><%= attachment.author.display_name %></td>
|
||||
<td><div class="contextual"><%= link_to_if_authorized l(:button_delete), {:controller => 'issues', :action => 'destroy_attachment', :id => @issue, :attachment_id => attachment }, :confirm => l(:text_are_you_sure), :post => true, :class => 'pic picDelete' %></div></td>
|
||||
<td><div class="contextual"><%= link_to_if_authorized l(:button_delete), {:controller => 'issues', :action => 'destroy_attachment', :id => @issue, :attachment_id => attachment }, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %></div></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
<br />
|
||||
<% if authorize_for('issues', 'add_attachment') %>
|
||||
<%= start_form_tag ({ :controller => 'issues', :action => 'add_attachment', :id => @issue }, :multipart => true, :class => "tabular") %>
|
||||
<p id="attachments_p"><label><%=l(:label_attachment_new)%>
|
||||
<%= link_to_function image_tag('add'), "addFileField()" %></label>
|
||||
<%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= human_size(Attachment.max_size) %>)</em></p>
|
||||
<% form_tag ({ :controller => 'issues', :action => 'add_attachment', :id => @issue }, :multipart => true, :class => "tabular") do %>
|
||||
<p id="attachments_p"><label><%=l(:label_attachment_new)%>
|
||||
<%= image_to_function "add.png", "addFileField();return false" %></label>
|
||||
<%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)</em></p>
|
||||
<%= submit_tag l(:button_add) %>
|
||||
<%= end_form_tag %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% if authorize_for('issues', 'add_note') %>
|
||||
<div class="box">
|
||||
<h3><%= l(:label_add_note) %></h3>
|
||||
<%= start_form_tag ({:controller => 'issues', :action => 'add_note', :id => @issue}, :class => "tabular" ) %>
|
||||
<% form_tag ({:controller => 'issues', :action => 'add_note', :id => @issue}, :class => "tabular" ) do %>
|
||||
<p><label for="notes"><%=l(:field_notes)%></label>
|
||||
<%= text_area_tag 'notes', '', :cols => 60, :rows => 10 %></p>
|
||||
<%= submit_tag l(:button_add) %>
|
||||
<%= end_form_tag %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||
<head>
|
||||
<title><%= $RDM_HEADER_TITLE + (@html_title ? ": #{@html_title}" : "") %></title>
|
||||
<title><%= Setting.app_title + (@html_title ? ": #{@html_title}" : "") %></title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<meta name="description" content="redMine" />
|
||||
<meta name="keywords" content="issue,bug,tracker" />
|
||||
<!--[if IE]>
|
||||
<style type="text/css">
|
||||
body {behavior: url(<%= stylesheet_path "csshover.htc" %>);}
|
||||
</style>
|
||||
<![endif]-->
|
||||
<%= stylesheet_link_tag "application" %>
|
||||
<%= stylesheet_link_tag "print", :media => "print" %>
|
||||
<%= javascript_include_tag :defaults %>
|
||||
<%= javascript_include_tag 'menu' %>
|
||||
<%= javascript_include_tag 'calendar/calendar' %>
|
||||
<%= javascript_include_tag "calendar/lang/calendar-#{current_language}.js" %>
|
||||
<%= javascript_include_tag 'calendar/calendar-setup' %>
|
||||
<%= stylesheet_link_tag 'calendar' %>
|
||||
<%= stylesheet_link_tag 'jstoolbar' %>
|
||||
<!-- page specific tags -->
|
||||
<%= yield :header_tags %>
|
||||
<!-- page specific tags --><%= yield :header_tags %>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@@ -23,8 +23,8 @@
|
||||
|
||||
<div id="header">
|
||||
<div style="float: left;">
|
||||
<h1><%= $RDM_HEADER_TITLE %></h1>
|
||||
<h2><%= $RDM_HEADER_SUBTITLE %></h2>
|
||||
<h1><%= Setting.app_title %></h1>
|
||||
<h2><%= Setting.app_subtitle %></h2>
|
||||
</div>
|
||||
<div style="float: right; padding-right: 1em; padding-top: 0.2em;">
|
||||
<% if loggedin? %><small><%=l(:label_logged_as)%> <b><%= @logged_in_user.login %></b></small><% end %>
|
||||
@@ -33,28 +33,28 @@
|
||||
|
||||
<div id="navigation">
|
||||
<ul>
|
||||
<li class="selected"><%= link_to l(:label_home), { :controller => '' }, :class => "picHome" %></li>
|
||||
<li><%= link_to l(:label_my_page), { :controller => 'my', :action => 'page'}, :class => "picUserPage" %></li>
|
||||
<li><%= link_to l(:label_project_plural), { :controller => 'projects' }, :class => "picProject" %></li>
|
||||
<li><%= link_to l(:label_home), { :controller => 'welcome' }, :class => "icon icon-home" %></li>
|
||||
<li><%= link_to l(:label_my_page), { :controller => 'my', :action => 'page'}, :class => "icon icon-mypage" %></li>
|
||||
<li><%= link_to l(:label_project_plural), { :controller => 'projects' }, :class => "icon icon-projects" %></li>
|
||||
|
||||
<% unless @project.nil? || @project.id.nil? %>
|
||||
<li class="submenu"><%= link_to @project.name, { :controller => 'projects', :action => 'show', :id => @project }, :class => "picProject", :onmouseover => "buttonMouseover(event, 'menuProject');" %></li>
|
||||
<li class="submenu"><%= link_to @project.name, { :controller => 'projects', :action => 'show', :id => @project }, :class => "icon icon-projects", :onmouseover => "buttonMouseover(event, 'menuProject');" %></li>
|
||||
<% end %>
|
||||
|
||||
<% if loggedin? %>
|
||||
<li><%= link_to l(:label_my_account), { :controller => 'my', :action => 'account' }, :class => "picUser" %></li>
|
||||
<li><%= link_to l(:label_my_account), { :controller => 'my', :action => 'account' }, :class => "icon icon-user" %></li>
|
||||
<% end %>
|
||||
|
||||
<% if admin_loggedin? %>
|
||||
<li class="submenu"><%= link_to l(:label_administration), { :controller => 'admin' }, :class => "picAdmin", :onmouseover => "buttonMouseover(event, 'menuAdmin');" %></li>
|
||||
<li class="submenu"><%= link_to l(:label_administration), { :controller => 'admin' }, :class => "icon icon-admin", :onmouseover => "buttonMouseover(event, 'menuAdmin');" %></li>
|
||||
<% end %>
|
||||
|
||||
<li class="right"><%= link_to l(:label_help), { :controller => 'help', :ctrl => params[:controller], :page => params[:action] }, :target => "new", :class => "picHelp" %></li>
|
||||
<li class="right"><%= link_to l(:label_help), { :controller => 'help', :ctrl => params[:controller], :page => params[:action] }, :onclick => "window.open(this.href); return false;", :class => "icon icon-help" %></li>
|
||||
|
||||
<% if loggedin? %>
|
||||
<li class="right"><%= link_to l(:label_logout), { :controller => 'account', :action => 'logout' }, :class => "picUser" %></li>
|
||||
<li class="right"><%= link_to l(:label_logout), { :controller => 'account', :action => 'logout' }, :class => "icon icon-user" %></li>
|
||||
<% else %>
|
||||
<li class="right"><%= link_to l(:label_login), { :controller => 'account', :action => 'login' }, :class => "picUser" %></li>
|
||||
<li class="right"><%= link_to l(:label_login), { :controller => 'account', :action => 'login' }, :class => "icon icon-user" %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -69,6 +69,7 @@
|
||||
<a class="menuItem" href="/enumerations"><%=l(:label_enumerations)%></a>
|
||||
<a class="menuItem" href="/admin/mail_options"><%=l(:field_mail_notification)%></a>
|
||||
<a class="menuItem" href="/auth_sources"><%=l(:label_authentication)%></a>
|
||||
<a class="menuItem" href="/settings"><%=l(:label_settings)%></a>
|
||||
<a class="menuItem" href="/admin/info"><%=l(:label_information_plural)%></a>
|
||||
</div>
|
||||
<div id="menuTrackers" class="menu">
|
||||
@@ -83,11 +84,12 @@
|
||||
<div id="menuProject" class="menu" onmouseover="menuMouseover(event)">
|
||||
<%= link_to l(:label_calendar), {:controller => 'projects', :action => 'calendar', :id => @project }, :class => "menuItem" %>
|
||||
<%= link_to l(:label_gantt), {:controller => 'projects', :action => 'gantt', :id => @project }, :class => "menuItem" %>
|
||||
<%= link_to l(:label_issue_plural), {:controller => 'projects', :action => 'list_issues', :id => @project }, :class => "menuItem" %>
|
||||
<%= link_to l(:label_issue_plural), {:controller => 'projects', :action => 'list_issues', :id => @project, :set_filter => 1 }, :class => "menuItem" %>
|
||||
<%= link_to l(:label_report_plural), {:controller => 'reports', :action => 'issue_report', :id => @project }, :class => "menuItem" %>
|
||||
<%= link_to l(:label_activity), {:controller => 'projects', :action => 'activity', :id => @project }, :class => "menuItem" %>
|
||||
<%= link_to l(:label_news_plural), {:controller => 'projects', :action => 'list_news', :id => @project }, :class => "menuItem" %>
|
||||
<%= link_to l(:label_change_log), {:controller => 'projects', :action => 'changelog', :id => @project }, :class => "menuItem" %>
|
||||
<%= link_to l(:label_roadmap), {:controller => 'projects', :action => 'roadmap', :id => @project }, :class => "menuItem" %>
|
||||
<%= link_to l(:label_document_plural), {:controller => 'projects', :action => 'list_documents', :id => @project }, :class => "menuItem" %>
|
||||
<%= link_to l(:label_member_plural), {:controller => 'projects', :action => 'list_members', :id => @project }, :class => "menuItem" %>
|
||||
<%= link_to l(:label_attachment_plural), {:controller => 'projects', :action => 'list_files', :id => @project }, :class => "menuItem" %>
|
||||
@@ -105,11 +107,12 @@
|
||||
<li><%= link_to l(:label_overview), :controller => 'projects', :action => 'show', :id => @project %></li>
|
||||
<li><%= link_to l(:label_calendar), :controller => 'projects', :action => 'calendar', :id => @project %></li>
|
||||
<li><%= link_to l(:label_gantt), :controller => 'projects', :action => 'gantt', :id => @project %></li>
|
||||
<li><%= link_to l(:label_issue_plural), :controller => 'projects', :action => 'list_issues', :id => @project %></li>
|
||||
<li><%= link_to l(:label_issue_plural), :controller => 'projects', :action => 'list_issues', :id => @project, :set_filter => 1 %></li>
|
||||
<li><%= link_to l(:label_report_plural), :controller => 'reports', :action => 'issue_report', :id => @project %></li>
|
||||
<li><%= link_to l(:label_activity), :controller => 'projects', :action => 'activity', :id => @project %></li>
|
||||
<li><%= link_to l(:label_news_plural), :controller => 'projects', :action => 'list_news', :id => @project %></li>
|
||||
<li><%= link_to l(:label_change_log), :controller => 'projects', :action => 'changelog', :id => @project %></li>
|
||||
<li><%= link_to l(:label_roadmap), :controller => 'projects', :action => 'roadmap', :id => @project %></li>
|
||||
<li><%= link_to l(:label_document_plural), :controller => 'projects', :action => 'list_documents', :id => @project %></li>
|
||||
<li><%= link_to l(:label_member_plural), :controller => 'projects', :action => 'list_members', :id => @project %></li>
|
||||
<li><%= link_to l(:label_attachment_plural), :controller => 'projects', :action => 'list_files', :id => @project %></li>
|
||||
@@ -134,10 +137,7 @@
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
<p>
|
||||
<%= auto_link $RDM_FOOTER_SIG %> |
|
||||
<a href="http://redmine.rubyforge.org/" target="_new"><%= RDM_APP_NAME %></a> <%= RDM_APP_VERSION %>
|
||||
</p>
|
||||
<p><a href="http://redmine.rubyforge.org/">redMine</a> <small><%= Redmine::VERSION %> © 2006-2007 Jean-Philippe Lang</small></p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -4,4 +4,4 @@
|
||||
|
||||
<%= issue.description %>
|
||||
|
||||
http://<%= $RDM_HOST_NAME %>/issues/show/<%= issue.id %>
|
||||
http://<%= Setting.host_name %>/issues/show/<%= issue.id %>
|
||||
6
app/views/mailer/attachments_add_de.rhtml
Normal file
6
app/views/mailer/attachments_add_de.rhtml
Normal file
@@ -0,0 +1,6 @@
|
||||
<%= @added_to %>
|
||||
<%= @attachments.size %> files(s) added.
|
||||
<% @attachments.each do |attachment | %>
|
||||
- <%= attachment.filename %><% end %>
|
||||
|
||||
<%= @url %>
|
||||
6
app/views/mailer/attachments_add_en.rhtml
Normal file
6
app/views/mailer/attachments_add_en.rhtml
Normal file
@@ -0,0 +1,6 @@
|
||||
<%= @added_to %>
|
||||
<%= @attachments.size %> files(s) added.
|
||||
<% @attachments.each do |attachment | %>
|
||||
- <%= attachment.filename %><% end %>
|
||||
|
||||
<%= @url %>
|
||||
6
app/views/mailer/attachments_add_es.rhtml
Normal file
6
app/views/mailer/attachments_add_es.rhtml
Normal file
@@ -0,0 +1,6 @@
|
||||
<%= @added_to %>
|
||||
<%= @attachments.size %> files(s) added.
|
||||
<% @attachments.each do |attachment | %>
|
||||
- <%= attachment.filename %><% end %>
|
||||
|
||||
<%= @url %>
|
||||
6
app/views/mailer/attachments_add_fr.rhtml
Normal file
6
app/views/mailer/attachments_add_fr.rhtml
Normal file
@@ -0,0 +1,6 @@
|
||||
<%= @added_to %>
|
||||
<%= @attachments.size %> fichier(s) ajouté(s).
|
||||
<% @attachments.each do |attachment | %>
|
||||
- <%= attachment.filename %><% end %>
|
||||
|
||||
<%= @url %>
|
||||
4
app/views/mailer/document_add_de.rhtml
Normal file
4
app/views/mailer/document_add_de.rhtml
Normal file
@@ -0,0 +1,4 @@
|
||||
A document has been added to <%= @document.project.name %> (<%= @document.category.name %>):
|
||||
<%= l(:field_title) %>: <%= @document.title %>
|
||||
|
||||
http://<%= Setting.host_name %>/documents/show/<%= @document.id %>
|
||||
4
app/views/mailer/document_add_en.rhtml
Normal file
4
app/views/mailer/document_add_en.rhtml
Normal file
@@ -0,0 +1,4 @@
|
||||
A document has been added to <%= @document.project.name %> (<%= @document.category.name %>):
|
||||
<%= l(:field_title) %>: <%= @document.title %>
|
||||
|
||||
http://<%= Setting.host_name %>/documents/show/<%= @document.id %>
|
||||
4
app/views/mailer/document_add_es.rhtml
Normal file
4
app/views/mailer/document_add_es.rhtml
Normal file
@@ -0,0 +1,4 @@
|
||||
A document has been added to <%= @document.project.name %> (<%= @document.category.name %>):
|
||||
<%= l(:field_title) %>: <%= @document.title %>
|
||||
|
||||
http://<%= Setting.host_name %>/documents/show/<%= @document.id %>
|
||||
4
app/views/mailer/document_add_fr.rhtml
Normal file
4
app/views/mailer/document_add_fr.rhtml
Normal file
@@ -0,0 +1,4 @@
|
||||
Un document a été ajouté à <%= @document.project.name %> (<%= @document.category.name %>):
|
||||
<%= l(:field_title) %>: <%= @document.title %>
|
||||
|
||||
http://<%= Setting.host_name %>/documents/show/<%= @document.id %>
|
||||
@@ -1,8 +1,8 @@
|
||||
La demande #<%= @issue.id %> a été mise à jour.
|
||||
<%= @journal.user.name %> - <%= format_date(@journal.created_on) %>
|
||||
<%= @journal.user.name %>
|
||||
<% for detail in @journal.details %>
|
||||
<%= show_detail(detail, true) %>
|
||||
<% end %>
|
||||
<%= journal.notes if journal.notes? %>
|
||||
<%= @journal.notes if @journal.notes? %>
|
||||
----------------------------------------
|
||||
<%= render :file => "_issue", :use_full_path => true, :locals => { :issue => @issue } %>
|
||||
@@ -1,3 +1,3 @@
|
||||
To change your password, use the following link:
|
||||
|
||||
http://<%= $RDM_HOST_NAME %>/account/lost_password?token=<%= @token.value %>
|
||||
http://<%= Setting.host_name %>/account/lost_password?token=<%= @token.value %>
|
||||
@@ -1,3 +1,3 @@
|
||||
To change your password, use the following link:
|
||||
|
||||
http://<%= $RDM_HOST_NAME %>/account/lost_password?token=<%= @token.value %>
|
||||
http://<%= Setting.host_name %>/account/lost_password?token=<%= @token.value %>
|
||||
@@ -1,3 +1,3 @@
|
||||
To change your password, use the following link:
|
||||
|
||||
http://<%= $RDM_HOST_NAME %>/account/lost_password?token=<%= @token.value %>
|
||||
http://<%= Setting.host_name %>/account/lost_password?token=<%= @token.value %>
|
||||
@@ -1,3 +1,3 @@
|
||||
Pour changer votre mot de passe, utilisez le lien suivant:
|
||||
|
||||
http://<%= $RDM_HOST_NAME %>/account/lost_password?token=<%= @token.value %>
|
||||
http://<%= Setting.host_name %>/account/lost_password?token=<%= @token.value %>
|
||||
@@ -1,3 +1,3 @@
|
||||
To activate your redMine account, use the following link:
|
||||
|
||||
http://<%= $RDM_HOST_NAME %>/account/register?token=<%= @token.value %>
|
||||
http://<%= Setting.host_name %>/account/register?token=<%= @token.value %>
|
||||
@@ -1,3 +1,3 @@
|
||||
To activate your redMine account, use the following link:
|
||||
|
||||
http://<%= $RDM_HOST_NAME %>/account/register?token=<%= @token.value %>
|
||||
http://<%= Setting.host_name %>/account/register?token=<%= @token.value %>
|
||||
@@ -1,3 +1,3 @@
|
||||
To activate your redMine account, use the following link:
|
||||
|
||||
http://<%= $RDM_HOST_NAME %>/account/register?token=<%= @token.value %>
|
||||
http://<%= Setting.host_name %>/account/register?token=<%= @token.value %>
|
||||
@@ -1,3 +1,3 @@
|
||||
Pour activer votre compte sur redMine, utilisez le lien suivant:
|
||||
|
||||
http://<%= $RDM_HOST_NAME %>/account/register?token=<%= @token.value %>
|
||||
http://<%= Setting.host_name %>/account/register?token=<%= @token.value %>
|
||||
@@ -1,8 +1,7 @@
|
||||
<h2><%=l(:label_my_account)%></h2>
|
||||
|
||||
<p><%=l(:field_login)%>: <strong><%= @user.login %></strong><br />
|
||||
<%=l(:field_created_on)%>: <%= format_time(@user.created_on) %>,
|
||||
<%=l(:field_updated_on)%>: <%= format_time(@user.updated_on) %></p>
|
||||
<%=l(:field_created_on)%>: <%= format_time(@user.created_on) %></p>
|
||||
|
||||
<%= error_messages_for 'user' %>
|
||||
|
||||
@@ -30,7 +29,7 @@
|
||||
<div class="box">
|
||||
<h3><%=l(:field_password)%></h3>
|
||||
|
||||
<%= start_form_tag({:action => 'change_password'}, :class => "tabular") %>
|
||||
<% form_tag({:action => 'change_password'}, :class => "tabular") do %>
|
||||
|
||||
<p><label for="password"><%=l(:field_password)%> <span class="required">*</span></label>
|
||||
<%= password_field_tag 'password', nil, :size => 25 %></p>
|
||||
@@ -42,6 +41,6 @@
|
||||
<%= password_field_tag 'new_password_confirmation', nil, :size => 25 %></p>
|
||||
|
||||
<center><%= submit_tag l(:button_save) %></center>
|
||||
<%= end_form_tag %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
@@ -29,11 +29,11 @@ while day <= @date_to
|
||||
@issues.each { |i| day_issues << i if i.start_date == day or i.due_date == day }
|
||||
day_issues.each do |i| %>
|
||||
<%= if day == i.start_date and day == i.due_date
|
||||
image_tag('arrow_bw')
|
||||
image_tag('arrow_bw.png')
|
||||
elsif day == i.start_date
|
||||
image_tag('arrow_from')
|
||||
image_tag('arrow_from.png')
|
||||
elsif day == i.due_date
|
||||
image_tag('arrow_to')
|
||||
image_tag('arrow_to.png')
|
||||
end %>
|
||||
<small><%= link_to "#{i.tracker.name} ##{i.id}", :controller => 'issues', :action => 'show', :id => i %>: <%=h i.subject.sub(/^(.{30}[^\s]*\s).*$/, '\1 (...)') %></small><br />
|
||||
<% end %>
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
<h2><%=l(:label_my_page)%></h2>
|
||||
|
||||
<div id="list-top">
|
||||
<% @blocks['top'].each do |b| %>
|
||||
<% @blocks['top'].each do |b|
|
||||
next unless MyController::BLOCKS.keys.include? b %>
|
||||
<div class="mypage-box">
|
||||
<%= render :partial => "my/blocks/#{b}", :locals => { :user => @user } %>
|
||||
</div>
|
||||
@@ -13,7 +14,8 @@
|
||||
</div>
|
||||
|
||||
<div id="list-left" class="splitcontentleft">
|
||||
<% @blocks['left'].each do |b| %>
|
||||
<% @blocks['left'].each do |b|
|
||||
next unless MyController::BLOCKS.keys.include? b %>
|
||||
<div class="mypage-box">
|
||||
<%= render :partial => "my/blocks/#{b}", :locals => { :user => @user } %>
|
||||
</div>
|
||||
@@ -21,7 +23,8 @@
|
||||
</div>
|
||||
|
||||
<div id="list-right" class="splitcontentright">
|
||||
<% @blocks['right'].each do |b| %>
|
||||
<% @blocks['right'].each do |b|
|
||||
next unless MyController::BLOCKS.keys.include? b %>
|
||||
<div class="mypage-box">
|
||||
<%= render :partial => "my/blocks/#{b}", :locals => { :user => @user } %>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script language="JavaScript">
|
||||
|
||||
//<![CDATA[
|
||||
function recreateSortables() {
|
||||
Sortable.destroy('list-top');
|
||||
Sortable.destroy('list-left');
|
||||
@@ -31,43 +31,47 @@ function removeBlock(block) {
|
||||
$(block).parentNode.removeChild($(block));
|
||||
updateSelect();
|
||||
}
|
||||
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
<div class="contextual">
|
||||
<span id="indicator" style="display:none"><%= image_tag "loading.gif", :align => "absmiddle" %></span>
|
||||
<%= start_form_tag({:action => "add_block"}, :id => "block-form") %>
|
||||
<% form_tag({:action => "add_block"}, :id => "block-form") do %>
|
||||
<%= select_tag 'block', "<option></option>" + options_for_select(@block_options), :id => "block-select" %>
|
||||
<%= link_to_remote l(:button_add),
|
||||
:url => { :action => "add_block" },
|
||||
{:url => { :action => "add_block" },
|
||||
:with => "Form.serialize('block-form')",
|
||||
:update => "list-top",
|
||||
:position => :top,
|
||||
:complete => "afterAddBlock();",
|
||||
:loading => "Element.show('indicator')",
|
||||
:loaded => "Element.hide('indicator')"
|
||||
}, :class => 'icon icon-add'
|
||||
%>
|
||||
<%= end_form_tag %> |
|
||||
<%= link_to l(:button_save), :action => 'page_layout_save' %> |
|
||||
<%= link_to l(:button_cancel), :action => 'page' %>
|
||||
<% end %>
|
||||
<%= link_to l(:button_save), {:action => 'page_layout_save'}, :class => 'icon icon-save' %>
|
||||
<%= link_to l(:button_cancel), {:action => 'page'}, :class => 'icon icon-cancel' %>
|
||||
</div>
|
||||
|
||||
<h2><%=l(:label_my_page)%></h2>
|
||||
|
||||
<div id="list-top" class="block-receiver">
|
||||
<% @blocks['top'].each do |b| %>
|
||||
<% @blocks['top'].each do |b|
|
||||
next unless MyController::BLOCKS.keys.include? b %>
|
||||
<%= render :partial => 'block', :locals => {:user => @user, :block_name => b} %>
|
||||
<% end if @blocks['top'] %>
|
||||
</div>
|
||||
|
||||
<div id="list-left" class="splitcontentleft block-receiver">
|
||||
<% @blocks['left'].each do |b| %>
|
||||
<% @blocks['left'].each do |b|
|
||||
next unless MyController::BLOCKS.keys.include? b %>
|
||||
<%= render :partial => 'block', :locals => {:user => @user, :block_name => b} %>
|
||||
<% end if @blocks['left'] %>
|
||||
</div>
|
||||
|
||||
<div id="list-right" class="splitcontentright block-receiver">
|
||||
<% @blocks['right'].each do |b| %>
|
||||
<% @blocks['right'].each do |b|
|
||||
next unless MyController::BLOCKS.keys.include? b %>
|
||||
<%= render :partial => 'block', :locals => {:user => @user, :block_name => b} %>
|
||||
<% end if @blocks['right'] %>
|
||||
</div>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<p><%= f.text_area :description, :required => true, :cols => 60, :rows => 15 %></p>
|
||||
</div>
|
||||
|
||||
<% unless $RDM_TEXTILE_DISABLED %>
|
||||
<% if Setting.text_formatting == 'textile' %>
|
||||
<%= javascript_include_tag 'jstoolbar' %>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div class="contextual">
|
||||
<%= link_to_if_authorized l(:button_edit), {:controller => 'news', :action => 'edit', :id => @news}, :class => 'pic picEdit' %>
|
||||
<%= link_to_if_authorized l(:button_delete), {:controller => 'news', :action => 'destroy', :id => @news}, :confirm => l(:text_are_you_sure), :post => true, :class => 'pic picDelete' %>
|
||||
<%= link_to_if_authorized l(:button_edit), {:controller => 'news', :action => 'edit', :id => @news}, :class => 'icon icon-edit' %>
|
||||
<%= link_to_if_authorized l(:button_delete), {:controller => 'news', :action => 'destroy', :id => @news}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %>
|
||||
</div>
|
||||
|
||||
<h2><%=h @news.title %></h2>
|
||||
@@ -12,23 +12,22 @@
|
||||
<br />
|
||||
|
||||
<div id="comments" style="margin-bottom:16px;">
|
||||
<h3 class="icon comment"><%= l(:label_comment_plural) %></h3>
|
||||
<h3 class="icon22 icon22-comment"><%= l(:label_comment_plural) %></h3>
|
||||
<% @news.comments.each do |comment| %>
|
||||
<% next if comment.new_record? %>
|
||||
<h4><%= format_time(comment.created_on) %> - <%= comment.author.name %></h4>
|
||||
<div class="contextual">
|
||||
<%= link_to_if_authorized l(:button_delete), {:controller => 'news', :action => 'destroy_comment', :id => @news, :comment_id => comment}, :confirm => l(:text_are_you_sure), :post => true, :class => 'pic picDelete' %>
|
||||
<%= link_to_if_authorized l(:button_delete), {:controller => 'news', :action => 'destroy_comment', :id => @news, :comment_id => comment}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %>
|
||||
</div>
|
||||
<%= simple_format(auto_link(h comment.comment))%>
|
||||
<% end if @news.comments_count > 0 %>
|
||||
</div>
|
||||
|
||||
<% if authorize_for 'news', 'add_comment' %>
|
||||
<h3><%= l(:label_comment_add) %></h3>
|
||||
<%= start_form_tag :action => 'add_comment', :id => @news %>
|
||||
<% form_tag({:action => 'add_comment', :id => @news}) do %>
|
||||
<%= error_messages_for 'comment' %>
|
||||
<p><label for="comment_comment"><%= l(:field_comment) %></label><br />
|
||||
<p><label for="comment_comment"><%= l(:label_comment_add) %></label><br />
|
||||
<%= text_area 'comment', 'comment', :cols => 60, :rows => 6 %></p>
|
||||
<%= submit_tag l(:button_add) %>
|
||||
<%= end_form_tag %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
@@ -35,3 +35,10 @@
|
||||
</div>
|
||||
<%= javascript_tag "Element.hide('repository');" if @project.repository.nil? %>
|
||||
</div>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= javascript_include_tag 'calendar/calendar' %>
|
||||
<%= javascript_include_tag "calendar/lang/calendar-#{current_language}.js" %>
|
||||
<%= javascript_include_tag 'calendar/calendar-setup' %>
|
||||
<%= stylesheet_link_tag 'calendar' %>
|
||||
<% end %>
|
||||
@@ -2,16 +2,19 @@
|
||||
|
||||
<div>
|
||||
<div class="rightbox">
|
||||
<%= start_form_tag %>
|
||||
<% form_tag do %>
|
||||
<p><%= select_month(@month, :prefix => "month", :discard_type => true) %>
|
||||
<%= select_year(@year, :prefix => "year", :discard_type => true) %></p>
|
||||
<%= check_box_tag 'show_issues', 1, @show_issues %><%= hidden_field_tag 'show_issues', 0 %> <%=l(:label_issue_plural)%><br />
|
||||
<%= check_box_tag 'show_news', 1, @show_news %><%= hidden_field_tag 'show_news', 0 %> <%=l(:label_news_plural)%><br />
|
||||
<%= check_box_tag 'show_files', 1, @show_files %><%= hidden_field_tag 'show_files', 0 %> <%=l(:label_attachment_plural)%><br />
|
||||
<%= check_box_tag 'show_documents', 1, @show_documents %><%= hidden_field_tag 'show_documents', 0 %> <%=l(:label_document_plural)%><br />
|
||||
<p><center><%= submit_tag l(:button_apply), :class => 'button-small' %></center></p>
|
||||
<%= end_form_tag %>
|
||||
</div>
|
||||
<p>
|
||||
<%= check_box_tag 'show_issues', 1, @show_issues %><%= hidden_field_tag 'show_issues', 0, :id => nil %> <%=l(:label_issue_plural)%><br />
|
||||
<%= check_box_tag 'show_news', 1, @show_news %><%= hidden_field_tag 'show_news', 0, :id => nil %> <%=l(:label_news_plural)%><br />
|
||||
<%= check_box_tag 'show_files', 1, @show_files %><%= hidden_field_tag 'show_files', 0, :id => nil %> <%=l(:label_attachment_plural)%><br />
|
||||
<%= check_box_tag 'show_documents', 1, @show_documents %><%= hidden_field_tag 'show_documents', 0, :id => nil %> <%=l(:label_document_plural)%>
|
||||
</p>
|
||||
<p class="textcenter"><%= submit_tag l(:button_apply), :class => 'button-small' %></p>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% @events_by_day.keys.sort {|x,y| y <=> x }.each do |day| %>
|
||||
<h3><%= day_name(day.cwday) %> <%= day.day %></h3>
|
||||
<ul>
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
<h2><%=l(:label_document_new)%></h2>
|
||||
|
||||
<%= start_form_tag( { :action => 'add_document', :id => @project }, :class => "tabular", :multipart => true) %>
|
||||
<% form_tag( { :action => 'add_document', :id => @project }, :class => "tabular", :multipart => true) do %>
|
||||
<%= render :partial => 'documents/form' %>
|
||||
|
||||
<div class="box">
|
||||
<p id="attachments_p"><label for="attachment_file"><%=l(:label_attachment)%>
|
||||
<%= link_to_function image_tag('add'), "addFileField()" %></label>
|
||||
<%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= human_size(Attachment.max_size) %>)</em></p>
|
||||
<p id="attachments_p"><label for="attachment_file"><%=l(:label_attachment)%>
|
||||
<%= image_to_function "add.png", "addFileField();return false" %></label>
|
||||
<%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)</em></p>
|
||||
</div>
|
||||
|
||||
<%= submit_tag l(:button_create) %>
|
||||
<%= end_form_tag %>
|
||||
<% end %>
|
||||
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user