Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
597bb81774 |
@@ -1,5 +1,5 @@
|
|||||||
# redMine - project management software
|
# redMine - project management software
|
||||||
# Copyright (C) 2006-2007 Jean-Philippe Lang
|
# Copyright (C) 2006 Jean-Philippe Lang
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or
|
# This program is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU General Public License
|
# 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
|
# 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]
|
skip_before_filter :check_if_login_required, :only => [:login, :lost_password, :register]
|
||||||
before_filter :require_login, :only => :logout
|
before_filter :require_login, :except => [:show, :login, :lost_password, :register]
|
||||||
|
|
||||||
# Show user's account
|
# Show user's account
|
||||||
def show
|
def show
|
||||||
@@ -52,15 +52,14 @@ class AccountController < ApplicationController
|
|||||||
# Log out current user and redirect to welcome page
|
# Log out current user and redirect to welcome page
|
||||||
def logout
|
def logout
|
||||||
self.logged_in_user = nil
|
self.logged_in_user = nil
|
||||||
redirect_to :controller => 'welcome'
|
redirect_to :controller => ''
|
||||||
end
|
end
|
||||||
|
|
||||||
# Enable user to choose a new password
|
# Enable user to choose a new password
|
||||||
def lost_password
|
def lost_password
|
||||||
redirect_to :controller => 'welcome' and return unless Setting.lost_password?
|
|
||||||
if params[:token]
|
if params[:token]
|
||||||
@token = Token.find_by_action_and_value("recovery", params[:token])
|
@token = Token.find_by_action_and_value("recovery", params[:token])
|
||||||
redirect_to :controller => 'welcome' and return unless @token and !@token.expired?
|
redirect_to :controller => '' and return unless @token and !@token.expired?
|
||||||
@user = @token.user
|
@user = @token.user
|
||||||
if request.post?
|
if request.post?
|
||||||
@user.password, @user.password_confirmation = params[:new_password], params[:new_password_confirmation]
|
@user.password, @user.password_confirmation = params[:new_password], params[:new_password_confirmation]
|
||||||
@@ -83,6 +82,8 @@ class AccountController < ApplicationController
|
|||||||
# create a new token for password recovery
|
# create a new token for password recovery
|
||||||
token = Token.new(:user => user, :action => "recovery")
|
token = Token.new(:user => user, :action => "recovery")
|
||||||
if token.save
|
if token.save
|
||||||
|
# send token to user via email
|
||||||
|
Mailer.set_language_if_valid(user.language)
|
||||||
Mailer.deliver_lost_password(token)
|
Mailer.deliver_lost_password(token)
|
||||||
flash[:notice] = l(:notice_account_lost_email_sent)
|
flash[:notice] = l(:notice_account_lost_email_sent)
|
||||||
redirect_to :action => 'login'
|
redirect_to :action => 'login'
|
||||||
@@ -94,12 +95,12 @@ class AccountController < ApplicationController
|
|||||||
|
|
||||||
# User self-registration
|
# User self-registration
|
||||||
def register
|
def register
|
||||||
redirect_to :controller => 'welcome' and return unless Setting.self_registration?
|
redirect_to :controller => '' and return if $RDM_SELF_REGISTRATION == false
|
||||||
if params[:token]
|
if params[:token]
|
||||||
token = Token.find_by_action_and_value("register", params[:token])
|
token = Token.find_by_action_and_value("register", params[:token])
|
||||||
redirect_to :controller => 'welcome' and return unless token and !token.expired?
|
redirect_to :controller => '' and return unless token and !token.expired?
|
||||||
user = token.user
|
user = token.user
|
||||||
redirect_to :controller => 'welcome' and return unless user.status == User::STATUS_REGISTERED
|
redirect_to :controller => '' and return unless user.status == User::STATUS_REGISTERED
|
||||||
user.status = User::STATUS_ACTIVE
|
user.status = User::STATUS_ACTIVE
|
||||||
if user.save
|
if user.save
|
||||||
token.destroy
|
token.destroy
|
||||||
@@ -109,7 +110,7 @@ class AccountController < ApplicationController
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
if request.get?
|
if request.get?
|
||||||
@user = User.new(:language => Setting.default_language)
|
@user = User.new(:language => $RDM_DEFAULT_LANG)
|
||||||
@custom_values = UserCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x, :customized => @user) }
|
@custom_values = UserCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x, :customized => @user) }
|
||||||
else
|
else
|
||||||
@user = User.new(params[:user])
|
@user = User.new(params[:user])
|
||||||
@@ -121,9 +122,10 @@ class AccountController < ApplicationController
|
|||||||
@user.custom_values = @custom_values
|
@user.custom_values = @custom_values
|
||||||
token = Token.new(:user => @user, :action => "register")
|
token = Token.new(:user => @user, :action => "register")
|
||||||
if @user.save and token.save
|
if @user.save and token.save
|
||||||
|
Mailer.set_language_if_valid(@user.language)
|
||||||
Mailer.deliver_register(token)
|
Mailer.deliver_register(token)
|
||||||
flash[:notice] = l(:notice_account_register_done)
|
flash[:notice] = l(:notice_account_register_done)
|
||||||
redirect_to :controller => 'welcome' and return
|
redirect_to :controller => ''
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -51,5 +51,6 @@ class AdminController < ApplicationController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def info
|
def info
|
||||||
|
@adapter_name = ActiveRecord::Base.connection.adapter_name
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# redMine - project management software
|
# redMine - project management software
|
||||||
# Copyright (C) 2006-2007 Jean-Philippe Lang
|
# Copyright (C) 2006 Jean-Philippe Lang
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or
|
# This program is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU General Public License
|
# 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
|
# check if login is globally required to access the application
|
||||||
def check_if_login_required
|
def check_if_login_required
|
||||||
require_login if Setting.login_required?
|
require_login if $RDM_LOGIN_REQUIRED
|
||||||
end
|
end
|
||||||
|
|
||||||
def set_localization
|
def set_localization
|
||||||
@@ -48,7 +48,7 @@ class ApplicationController < ActionController::Base
|
|||||||
end
|
end
|
||||||
rescue
|
rescue
|
||||||
nil
|
nil
|
||||||
end || Setting.default_language
|
end || $RDM_DEFAULT_LANG
|
||||||
set_language_if_valid(lang)
|
set_language_if_valid(lang)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -92,16 +92,16 @@ class ApplicationController < ActionController::Base
|
|||||||
# store current uri in session.
|
# store current uri in session.
|
||||||
# return to this location by calling redirect_back_or_default
|
# return to this location by calling redirect_back_or_default
|
||||||
def store_location
|
def store_location
|
||||||
session[:return_to_params] = params
|
session[:return_to] = request.request_uri
|
||||||
end
|
end
|
||||||
|
|
||||||
# move to the last store_location call or to the passed default one
|
# move to the last store_location call or to the passed default one
|
||||||
def redirect_back_or_default(default)
|
def redirect_back_or_default(default)
|
||||||
if session[:return_to_params].nil?
|
if session[:return_to].nil?
|
||||||
redirect_to default
|
redirect_to default
|
||||||
else
|
else
|
||||||
redirect_to session[:return_to_params]
|
redirect_to_url session[:return_to]
|
||||||
session[:return_to_params] = nil
|
session[:return_to] = nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -25,8 +25,7 @@ class CustomFieldsController < ApplicationController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def list
|
def list
|
||||||
@custom_fields_by_type = CustomField.find(:all).group_by {|f| f.type.to_s }
|
@custom_field_pages, @custom_fields = paginate :custom_fields, :per_page => 15
|
||||||
@tab = params[:tab] || 'IssueCustomField'
|
|
||||||
render :action => "list", :layout => false if request.xhr?
|
render :action => "list", :layout => false if request.xhr?
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -45,9 +44,9 @@ class CustomFieldsController < ApplicationController
|
|||||||
end
|
end
|
||||||
if request.post? and @custom_field.save
|
if request.post? and @custom_field.save
|
||||||
flash[:notice] = l(:notice_successful_create)
|
flash[:notice] = l(:notice_successful_create)
|
||||||
redirect_to :action => 'list', :tab => @custom_field.type
|
redirect_to :action => 'list'
|
||||||
end
|
end
|
||||||
@trackers = Tracker.find(:all, :order => 'position')
|
@trackers = Tracker.find(:all)
|
||||||
end
|
end
|
||||||
|
|
||||||
def edit
|
def edit
|
||||||
@@ -57,14 +56,14 @@ class CustomFieldsController < ApplicationController
|
|||||||
@custom_field.trackers = params[:tracker_ids] ? Tracker.find(params[:tracker_ids]) : []
|
@custom_field.trackers = params[:tracker_ids] ? Tracker.find(params[:tracker_ids]) : []
|
||||||
end
|
end
|
||||||
flash[:notice] = l(:notice_successful_update)
|
flash[:notice] = l(:notice_successful_update)
|
||||||
redirect_to :action => 'list', :tab => @custom_field.type
|
redirect_to :action => 'list'
|
||||||
end
|
end
|
||||||
@trackers = Tracker.find(:all, :order => 'position')
|
@trackers = Tracker.find(:all)
|
||||||
end
|
end
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
@custom_field = CustomField.find(params[:id]).destroy
|
CustomField.find(params[:id]).destroy
|
||||||
redirect_to :action => 'list', :tab => @custom_field.type
|
redirect_to :action => 'list'
|
||||||
rescue
|
rescue
|
||||||
flash[:notice] = "Unable to delete custom field"
|
flash[:notice] = "Unable to delete custom field"
|
||||||
redirect_to :action => 'list'
|
redirect_to :action => 'list'
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# redMine - project management software
|
# redMine - project management software
|
||||||
# Copyright (C) 2006-2007 Jean-Philippe Lang
|
# Copyright (C) 2006 Jean-Philippe Lang
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or
|
# This program is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU General Public License
|
# modify it under the terms of the GNU General Public License
|
||||||
@@ -46,13 +46,9 @@ class DocumentsController < ApplicationController
|
|||||||
|
|
||||||
def add_attachment
|
def add_attachment
|
||||||
# Save the attachments
|
# Save the attachments
|
||||||
@attachments = []
|
params[:attachments].each { |a|
|
||||||
params[:attachments].each { |file|
|
Attachment.create(:container => @document, :file => a, :author => logged_in_user) unless a.size == 0
|
||||||
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
|
} 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
|
redirect_to :action => 'show', :id => @document
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,6 @@ class FeedsController < ApplicationController
|
|||||||
|
|
||||||
def news
|
def news
|
||||||
@news = News.find :all, :order => 'news.created_on DESC', :limit => 10, :include => [ :author, :project ]
|
@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
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -16,22 +16,22 @@
|
|||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
class IssueCategoriesController < ApplicationController
|
class IssueCategoriesController < ApplicationController
|
||||||
layout 'base'
|
layout 'base'
|
||||||
before_filter :find_project, :authorize
|
before_filter :find_project, :authorize
|
||||||
|
|
||||||
def edit
|
def edit
|
||||||
if request.post? and @category.update_attributes(params[:category])
|
if request.post? and @category.update_attributes(params[:category])
|
||||||
flash[:notice] = l(:notice_successful_update)
|
flash[:notice] = l(:notice_successful_update)
|
||||||
redirect_to :controller => 'projects', :action => 'settings', :tab => 'categories', :id => @project
|
redirect_to :controller => 'projects', :action => 'settings', :id => @project
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
@category.destroy
|
@category.destroy
|
||||||
redirect_to :controller => 'projects', :action => 'settings', :tab => 'categories', :id => @project
|
redirect_to :controller => 'projects', :action => 'settings', :id => @project
|
||||||
rescue
|
rescue
|
||||||
flash[:notice] = "Categorie can't be deleted"
|
flash[:notice] = "Categorie can't be deleted"
|
||||||
redirect_to :controller => 'projects', :action => 'settings', :tab => 'categories', :id => @project
|
redirect_to :controller => 'projects', :action => 'settings', :id => @project
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|||||||
@@ -16,19 +16,16 @@
|
|||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
class IssueStatusesController < ApplicationController
|
class IssueStatusesController < ApplicationController
|
||||||
layout 'base'
|
layout 'base'
|
||||||
before_filter :require_admin
|
before_filter :require_admin
|
||||||
|
|
||||||
verify :method => :post, :only => [ :destroy, :create, :update, :move ],
|
|
||||||
:redirect_to => { :action => :list }
|
|
||||||
|
|
||||||
def index
|
def index
|
||||||
list
|
list
|
||||||
render :action => 'list' unless request.xhr?
|
render :action => 'list' unless request.xhr?
|
||||||
end
|
end
|
||||||
|
|
||||||
def list
|
def list
|
||||||
@issue_status_pages, @issue_statuses = paginate :issue_statuses, :per_page => 25, :order => "position"
|
@issue_status_pages, @issue_statuses = paginate :issue_statuses, :per_page => 10
|
||||||
render :action => "list", :layout => false if request.xhr?
|
render :action => "list", :layout => false if request.xhr?
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -58,21 +55,6 @@ class IssueStatusesController < ApplicationController
|
|||||||
else
|
else
|
||||||
render :action => 'edit'
|
render :action => 'edit'
|
||||||
end
|
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
|
end
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
@@ -81,5 +63,7 @@ class IssueStatusesController < ApplicationController
|
|||||||
rescue
|
rescue
|
||||||
flash[:notice] = "Unable to delete issue status"
|
flash[:notice] = "Unable to delete issue status"
|
||||||
redirect_to :action => 'list'
|
redirect_to :action => 'list'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# redMine - project management software
|
# redMine - project management software
|
||||||
# Copyright (C) 2006-2007 Jean-Philippe Lang
|
# Copyright (C) 2006 Jean-Philippe Lang
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or
|
# This program is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU General Public License
|
# modify it under the terms of the GNU General Public License
|
||||||
@@ -25,7 +25,7 @@ class IssuesController < ApplicationController
|
|||||||
include IfpdfHelper
|
include IfpdfHelper
|
||||||
|
|
||||||
def show
|
def show
|
||||||
@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
|
@status_options = @issue.status.workflows.find(:all, :include => :new_status, :conditions => ["role_id=? and tracker_id=?", self.logged_in_user.role_for_project(@project.id), @issue.tracker.id]).collect{ |w| w.new_status } if self.logged_in_user
|
||||||
@custom_values = @issue.custom_values.find(:all, :include => :custom_field)
|
@custom_values = @issue.custom_values.find(:all, :include => :custom_field)
|
||||||
@journals_count = @issue.journals.count
|
@journals_count = @issue.journals.count
|
||||||
@journals = @issue.journals.find(:all, :include => [:user, :details], :limit => 15, :order => "journals.created_on desc")
|
@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
|
def change_status
|
||||||
#@history = @issue.histories.build(params[:history])
|
#@history = @issue.histories.build(params[:history])
|
||||||
@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
|
@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
|
||||||
@new_status = IssueStatus.find(params[:new_status_id])
|
@new_status = IssueStatus.find(params[:new_status_id])
|
||||||
if params[:confirm]
|
if params[:confirm]
|
||||||
begin
|
begin
|
||||||
@@ -115,13 +115,10 @@ class IssuesController < ApplicationController
|
|||||||
|
|
||||||
def add_attachment
|
def add_attachment
|
||||||
# Save the attachments
|
# Save the attachments
|
||||||
@attachments = []
|
params[:attachments].each { |a|
|
||||||
params[:attachments].each { |file|
|
@attachment = @issue.attachments.build(:file => a, :author => self.logged_in_user) unless a.size == 0
|
||||||
next unless file.size > 0
|
@attachment.save
|
||||||
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
|
} 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
|
redirect_to :action => 'show', :id => @issue
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -16,21 +16,21 @@
|
|||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
class MembersController < ApplicationController
|
class MembersController < ApplicationController
|
||||||
layout 'base'
|
layout 'base'
|
||||||
before_filter :find_project, :authorize
|
before_filter :find_project, :authorize
|
||||||
|
|
||||||
def edit
|
def edit
|
||||||
if request.post? and @member.update_attributes(params[:member])
|
if request.post? and @member.update_attributes(params[:member])
|
||||||
flash[:notice] = l(:notice_successful_update)
|
flash[:notice] = l(:notice_successful_update)
|
||||||
redirect_to :controller => 'projects', :action => 'settings', :tab => 'members', :id => @project
|
redirect_to :controller => 'projects', :action => 'settings', :id => @project
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
@member.destroy
|
@member.destroy
|
||||||
flash[:notice] = l(:notice_successful_delete)
|
flash[:notice] = l(:notice_successful_delete)
|
||||||
redirect_to :controller => 'projects', :action => 'settings', :tab => 'members', :id => @project
|
redirect_to :controller => 'projects', :action => 'settings', :id => @project
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
def find_project
|
def find_project
|
||||||
@@ -38,5 +38,6 @@ private
|
|||||||
@project = @member.project
|
@project = @member.project
|
||||||
rescue ActiveRecord::RecordNotFound
|
rescue ActiveRecord::RecordNotFound
|
||||||
render_404
|
render_404
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -19,17 +19,13 @@ class MyController < ApplicationController
|
|||||||
layout 'base'
|
layout 'base'
|
||||||
before_filter :require_login
|
before_filter :require_login
|
||||||
|
|
||||||
BLOCKS = { 'issuesassignedtome' => :label_assigned_to_me_issues,
|
BLOCKS = { 'issues_assigned_to_me' => :label_assigned_to_me_issues,
|
||||||
'issuesreportedbyme' => :label_reported_issues,
|
'issues_reported_by_me' => :label_reported_issues,
|
||||||
'news' => :label_news_latest,
|
'latest_news' => :label_news_latest,
|
||||||
'calendar' => :label_calendar,
|
'calendar' => :label_calendar,
|
||||||
'documents' => :label_document_plural
|
'documents' => :label_document_plural
|
||||||
}.freeze
|
}.freeze
|
||||||
|
|
||||||
DEFAULT_LAYOUT = { 'left' => ['issuesassignedtome'],
|
|
||||||
'right' => ['issuesreportedbyme']
|
|
||||||
}.freeze
|
|
||||||
|
|
||||||
verify :xhr => true,
|
verify :xhr => true,
|
||||||
:session => :page_layout,
|
:session => :page_layout,
|
||||||
:only => [:add_block, :remove_block, :order_blocks]
|
:only => [:add_block, :remove_block, :order_blocks]
|
||||||
@@ -42,7 +38,7 @@ class MyController < ApplicationController
|
|||||||
# Show user's page
|
# Show user's page
|
||||||
def page
|
def page
|
||||||
@user = self.logged_in_user
|
@user = self.logged_in_user
|
||||||
@blocks = @user.pref[:my_page_layout] || DEFAULT_LAYOUT
|
@blocks = @user.pref[:my_page_layout] || { 'left' => ['issues_assigned_to_me'], 'right' => ['issues_reported_by_me'] }
|
||||||
end
|
end
|
||||||
|
|
||||||
# Edit user's account
|
# Edit user's account
|
||||||
@@ -51,7 +47,7 @@ class MyController < ApplicationController
|
|||||||
@pref = @user.pref
|
@pref = @user.pref
|
||||||
@user.attributes = params[:user]
|
@user.attributes = params[:user]
|
||||||
@user.pref.attributes = params[:pref]
|
@user.pref.attributes = params[:pref]
|
||||||
if request.post? and @user.save and @user.pref.save
|
if request.post? and @user.save
|
||||||
set_localization
|
set_localization
|
||||||
flash.now[:notice] = l(:notice_account_updated)
|
flash.now[:notice] = l(:notice_account_updated)
|
||||||
self.logged_in_user.reload
|
self.logged_in_user.reload
|
||||||
@@ -79,7 +75,7 @@ class MyController < ApplicationController
|
|||||||
# User's page layout configuration
|
# User's page layout configuration
|
||||||
def page_layout
|
def page_layout
|
||||||
@user = self.logged_in_user
|
@user = self.logged_in_user
|
||||||
@blocks = @user.pref[:my_page_layout] || DEFAULT_LAYOUT.dup
|
@blocks = @user.pref[:my_page_layout] || { 'left' => ['issues_assigned_to_me'], 'right' => ['issues_reported_by_me'] }
|
||||||
session[:page_layout] = @blocks
|
session[:page_layout] = @blocks
|
||||||
%w(top left right).each {|f| session[:page_layout][f] ||= [] }
|
%w(top left right).each {|f| session[:page_layout][f] ||= [] }
|
||||||
@block_options = []
|
@block_options = []
|
||||||
|
|||||||
@@ -16,8 +16,8 @@
|
|||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
class NewsController < ApplicationController
|
class NewsController < ApplicationController
|
||||||
layout 'base'
|
layout 'base'
|
||||||
before_filter :find_project, :authorize
|
before_filter :find_project, :authorize
|
||||||
|
|
||||||
def show
|
def show
|
||||||
end
|
end
|
||||||
@@ -45,10 +45,10 @@ class NewsController < ApplicationController
|
|||||||
redirect_to :action => 'show', :id => @news
|
redirect_to :action => 'show', :id => @news
|
||||||
end
|
end
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
@news.destroy
|
@news.destroy
|
||||||
redirect_to :controller => 'projects', :action => 'list_news', :id => @project
|
redirect_to :controller => 'projects', :action => 'list_news', :id => @project
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
def find_project
|
def find_project
|
||||||
|
|||||||
@@ -15,8 +15,6 @@
|
|||||||
# along with this program; if not, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
require 'csv'
|
|
||||||
|
|
||||||
class ProjectsController < ApplicationController
|
class ProjectsController < ApplicationController
|
||||||
layout 'base'
|
layout 'base'
|
||||||
before_filter :find_project, :authorize, :except => [ :index, :list, :add ]
|
before_filter :find_project, :authorize, :except => [ :index, :list, :add ]
|
||||||
@@ -41,7 +39,7 @@ class ProjectsController < ApplicationController
|
|||||||
def list
|
def list
|
||||||
sort_init 'name', 'asc'
|
sort_init 'name', 'asc'
|
||||||
sort_update
|
sort_update
|
||||||
@project_count = Project.count(:all, :conditions => ["is_public=?", true])
|
@project_count = Project.count(["is_public=?", true])
|
||||||
@project_pages = Paginator.new self, @project_count,
|
@project_pages = Paginator.new self, @project_count,
|
||||||
15,
|
15,
|
||||||
params['page']
|
params['page']
|
||||||
@@ -79,11 +77,9 @@ class ProjectsController < ApplicationController
|
|||||||
def show
|
def show
|
||||||
@custom_values = @project.custom_values.find(:all, :include => :custom_field)
|
@custom_values = @project.custom_values.find(:all, :include => :custom_field)
|
||||||
@members = @project.members.find(:all, :include => [:user, :role])
|
@members = @project.members.find(:all, :include => [:user, :role])
|
||||||
@subprojects = @project.children if @project.children.size > 0
|
@subprojects = @project.children if @project.children_count > 0
|
||||||
@news = @project.news.find(:all, :limit => 5, :include => [ :author, :project ], :order => "news.created_on DESC")
|
@news = @project.news.find(:all, :limit => 5, :include => [ :author, :project ], :order => "news.created_on DESC")
|
||||||
@trackers = Tracker.find(:all, :order => 'position')
|
@trackers = Tracker.find(:all)
|
||||||
@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
|
end
|
||||||
|
|
||||||
def settings
|
def settings
|
||||||
@@ -91,8 +87,8 @@ class ProjectsController < ApplicationController
|
|||||||
@custom_fields = IssueCustomField.find(:all)
|
@custom_fields = IssueCustomField.find(:all)
|
||||||
@issue_category ||= IssueCategory.new
|
@issue_category ||= IssueCategory.new
|
||||||
@member ||= @project.members.new
|
@member ||= @project.members.new
|
||||||
@roles = Role.find(:all, :order => 'position')
|
@roles = Role.find(:all)
|
||||||
@users = User.find_active(:all) - @project.users
|
@users = User.find(:all) - @project.members.find(:all, :include => :user).collect{|m| m.user }
|
||||||
@custom_values ||= ProjectCustomField.find(:all).collect { |x| @project.custom_values.find_by_custom_field_id(x.id) || CustomValue.new(:custom_field => x) }
|
@custom_values ||= ProjectCustomField.find(:all).collect { |x| @project.custom_values.find_by_custom_field_id(x.id) || CustomValue.new(:custom_field => x) }
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -138,7 +134,7 @@ class ProjectsController < ApplicationController
|
|||||||
@issue_category = @project.issue_categories.build(params[:issue_category])
|
@issue_category = @project.issue_categories.build(params[:issue_category])
|
||||||
if @issue_category.save
|
if @issue_category.save
|
||||||
flash[:notice] = l(:notice_successful_create)
|
flash[:notice] = l(:notice_successful_create)
|
||||||
redirect_to :action => 'settings', :tab => 'categories', :id => @project
|
redirect_to :action => 'settings', :id => @project
|
||||||
else
|
else
|
||||||
settings
|
settings
|
||||||
render :action => 'settings'
|
render :action => 'settings'
|
||||||
@@ -151,7 +147,7 @@ class ProjectsController < ApplicationController
|
|||||||
@version = @project.versions.build(params[:version])
|
@version = @project.versions.build(params[:version])
|
||||||
if request.post? and @version.save
|
if request.post? and @version.save
|
||||||
flash[:notice] = l(:notice_successful_create)
|
flash[:notice] = l(:notice_successful_create)
|
||||||
redirect_to :action => 'settings', :tab => 'versions', :id => @project
|
redirect_to :action => 'settings', :id => @project
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -161,7 +157,7 @@ class ProjectsController < ApplicationController
|
|||||||
if request.post?
|
if request.post?
|
||||||
if @member.save
|
if @member.save
|
||||||
flash[:notice] = l(:notice_successful_create)
|
flash[:notice] = l(:notice_successful_create)
|
||||||
redirect_to :action => 'settings', :tab => 'members', :id => @project
|
redirect_to :action => 'settings', :id => @project
|
||||||
else
|
else
|
||||||
settings
|
settings
|
||||||
render :action => 'settings'
|
render :action => 'settings'
|
||||||
@@ -171,7 +167,7 @@ class ProjectsController < ApplicationController
|
|||||||
|
|
||||||
# Show members list of @project
|
# Show members list of @project
|
||||||
def list_members
|
def list_members
|
||||||
@members = @project.members.find(:all)
|
@members = @project.members
|
||||||
end
|
end
|
||||||
|
|
||||||
# Add a new document to @project
|
# Add a new document to @project
|
||||||
@@ -184,7 +180,6 @@ class ProjectsController < ApplicationController
|
|||||||
Attachment.create(:container => @document, :file => a, :author => logged_in_user) unless a.size == 0
|
Attachment.create(:container => @document, :file => a, :author => logged_in_user) unless a.size == 0
|
||||||
} if params[:attachments] and params[:attachments].is_a? Array
|
} if params[:attachments] and params[:attachments].is_a? Array
|
||||||
flash[:notice] = l(:notice_successful_create)
|
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
|
redirect_to :action => 'list_documents', :id => @project
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -240,12 +235,12 @@ class ProjectsController < ApplicationController
|
|||||||
@issue_count = Issue.count(:include => [:status, :project], :conditions => @query.statement)
|
@issue_count = Issue.count(:include => [:status, :project], :conditions => @query.statement)
|
||||||
@issue_pages = Paginator.new self, @issue_count, @results_per_page, params['page']
|
@issue_pages = Paginator.new self, @issue_count, @results_per_page, params['page']
|
||||||
@issues = Issue.find :all, :order => sort_clause,
|
@issues = Issue.find :all, :order => sort_clause,
|
||||||
:include => [ :author, :status, :tracker, :project, :priority ],
|
:include => [ :author, :status, :tracker, :project ],
|
||||||
:conditions => @query.statement,
|
:conditions => @query.statement,
|
||||||
:limit => @issue_pages.items_per_page,
|
:limit => @issue_pages.items_per_page,
|
||||||
:offset => @issue_pages.current.offset
|
:offset => @issue_pages.current.offset
|
||||||
end
|
end
|
||||||
@trackers = Tracker.find :all, :order => 'position'
|
@trackers = Tracker.find :all
|
||||||
render :layout => false if request.xhr?
|
render :layout => false if request.xhr?
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -258,42 +253,21 @@ class ProjectsController < ApplicationController
|
|||||||
render :action => 'list_issues' and return unless @query.valid?
|
render :action => 'list_issues' and return unless @query.valid?
|
||||||
|
|
||||||
@issues = Issue.find :all, :order => sort_clause,
|
@issues = Issue.find :all, :order => sort_clause,
|
||||||
:include => [ :author, :status, :tracker, :priority, {:custom_values => :custom_field} ],
|
:include => [ :author, :status, :tracker, :project, :custom_values ],
|
||||||
:conditions => @query.statement,
|
:conditions => @query.statement
|
||||||
:limit => Setting.issues_export_limit
|
|
||||||
|
|
||||||
ic = Iconv.new('ISO-8859-1', 'UTF-8')
|
ic = Iconv.new('ISO-8859-1', 'UTF-8')
|
||||||
export = StringIO.new
|
export = StringIO.new
|
||||||
CSV::Writer.generate(export, l(:general_csv_separator)) do |csv|
|
CSV::Writer.generate(export, l(:general_csv_separator)) do |csv|
|
||||||
# csv header fields
|
# csv header fields
|
||||||
headers = [ "#", l(:field_status),
|
headers = [ "#", l(:field_status), l(:field_tracker), l(:field_subject), l(:field_author), l(:field_created_on), l(:field_updated_on) ]
|
||||||
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
|
for custom_field in @project.all_custom_fields
|
||||||
headers << custom_field.name
|
headers << custom_field.name
|
||||||
end
|
end
|
||||||
csv << headers.collect {|c| ic.iconv(c) }
|
csv << headers.collect {|c| ic.iconv(c) }
|
||||||
# csv lines
|
# csv lines
|
||||||
@issues.each do |issue|
|
@issues.each do |issue|
|
||||||
fields = [issue.id, issue.status.name,
|
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)]
|
||||||
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
|
for custom_field in @project.all_custom_fields
|
||||||
fields << (show_value issue.custom_value_for(custom_field))
|
fields << (show_value issue.custom_value_for(custom_field))
|
||||||
end
|
end
|
||||||
@@ -313,9 +287,8 @@ class ProjectsController < ApplicationController
|
|||||||
render :action => 'list_issues' and return unless @query.valid?
|
render :action => 'list_issues' and return unless @query.valid?
|
||||||
|
|
||||||
@issues = Issue.find :all, :order => sort_clause,
|
@issues = Issue.find :all, :order => sort_clause,
|
||||||
:include => [ :author, :status, :tracker, :priority ],
|
:include => [ :author, :status, :tracker, :project, :custom_values ],
|
||||||
:conditions => @query.statement,
|
:conditions => @query.statement
|
||||||
:limit => Setting.issues_export_limit
|
|
||||||
|
|
||||||
@options_for_rfpdf ||= {}
|
@options_for_rfpdf ||= {}
|
||||||
@options_for_rfpdf[:file_name] = "export.pdf"
|
@options_for_rfpdf[:file_name] = "export.pdf"
|
||||||
@@ -388,13 +361,9 @@ class ProjectsController < ApplicationController
|
|||||||
if request.post?
|
if request.post?
|
||||||
@version = @project.versions.find_by_id(params[:version_id])
|
@version = @project.versions.find_by_id(params[:version_id])
|
||||||
# Save the attachments
|
# Save the attachments
|
||||||
@attachments = []
|
params[:attachments].each { |a|
|
||||||
params[:attachments].each { |file|
|
Attachment.create(:container => @version, :file => a, :author => logged_in_user) unless a.size == 0
|
||||||
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
|
} 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
|
redirect_to :controller => 'projects', :action => 'list_files', :id => @project
|
||||||
end
|
end
|
||||||
@versions = @project.versions
|
@versions = @project.versions
|
||||||
@@ -406,7 +375,7 @@ class ProjectsController < ApplicationController
|
|||||||
|
|
||||||
# Show changelog for @project
|
# Show changelog for @project
|
||||||
def changelog
|
def changelog
|
||||||
@trackers = Tracker.find(:all, :conditions => ["is_in_chlog=?", true], :order => 'position')
|
@trackers = Tracker.find(:all, :conditions => ["is_in_chlog=?", true])
|
||||||
if request.get?
|
if request.get?
|
||||||
@selected_tracker_ids = @trackers.collect {|t| t.id.to_s }
|
@selected_tracker_ids = @trackers.collect {|t| t.id.to_s }
|
||||||
else
|
else
|
||||||
@@ -421,20 +390,6 @@ class ProjectsController < ApplicationController
|
|||||||
@fixed_issues ||= []
|
@fixed_issues ||= []
|
||||||
end
|
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
|
def activity
|
||||||
if params[:year] and params[:year].to_i > 1900
|
if params[:year] and params[:year].to_i > 1900
|
||||||
@year = params[:year].to_i
|
@year = params[:year].to_i
|
||||||
@@ -506,7 +461,7 @@ class ProjectsController < ApplicationController
|
|||||||
# finish on sunday
|
# finish on sunday
|
||||||
@date_to = @date_to + (7-@date_to.cwday)
|
@date_to = @date_to + (7-@date_to.cwday)
|
||||||
|
|
||||||
@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])
|
@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])
|
||||||
render :layout => false if request.xhr?
|
render :layout => false if request.xhr?
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -528,7 +483,7 @@ class ProjectsController < ApplicationController
|
|||||||
|
|
||||||
@date_from = Date.civil(@year_from, @month_from, 1)
|
@date_from = Date.civil(@year_from, @month_from, 1)
|
||||||
@date_to = (@date_from >> @months) - 1
|
@date_to = (@date_from >> @months) - 1
|
||||||
@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])
|
@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])
|
||||||
|
|
||||||
if params[:output]=='pdf'
|
if params[:output]=='pdf'
|
||||||
@options_for_rfpdf ||= {}
|
@options_for_rfpdf ||= {}
|
||||||
@@ -554,7 +509,6 @@ private
|
|||||||
def retrieve_query
|
def retrieve_query
|
||||||
if params[:query_id]
|
if params[:query_id]
|
||||||
@query = @project.queries.find(params[:query_id])
|
@query = @project.queries.find(params[:query_id])
|
||||||
session[:query] = @query
|
|
||||||
else
|
else
|
||||||
if params[:set_filter] or !session[:query] or session[:query].project_id != @project.id
|
if params[:set_filter] or !session[:query] or session[:query].project_id != @project.id
|
||||||
# Give it a name, required to be valid
|
# Give it a name, required to be valid
|
||||||
|
|||||||
@@ -16,16 +16,16 @@
|
|||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
class ReportsController < ApplicationController
|
class ReportsController < ApplicationController
|
||||||
layout 'base'
|
layout 'base'
|
||||||
before_filter :find_project, :authorize
|
before_filter :find_project, :authorize
|
||||||
|
|
||||||
def issue_report
|
def issue_report
|
||||||
@statuses = IssueStatus.find(:all, :order => 'position')
|
@statuses = IssueStatus.find :all
|
||||||
|
|
||||||
case params[:detail]
|
case params[:detail]
|
||||||
when "tracker"
|
when "tracker"
|
||||||
@field = "tracker_id"
|
@field = "tracker_id"
|
||||||
@rows = Tracker.find :all, :order => 'position'
|
@rows = Tracker.find :all
|
||||||
@data = issues_by_tracker
|
@data = issues_by_tracker
|
||||||
@report_title = l(:field_tracker)
|
@report_title = l(:field_tracker)
|
||||||
render :template => "reports/issue_report_details"
|
render :template => "reports/issue_report_details"
|
||||||
@@ -49,7 +49,7 @@ class ReportsController < ApplicationController
|
|||||||
render :template => "reports/issue_report_details"
|
render :template => "reports/issue_report_details"
|
||||||
else
|
else
|
||||||
@queries = @project.queries.find :all, :conditions => ["is_public=? or user_id=?", true, (logged_in_user ? logged_in_user.id : 0)]
|
@queries = @project.queries.find :all, :conditions => ["is_public=? or user_id=?", true, (logged_in_user ? logged_in_user.id : 0)]
|
||||||
@trackers = Tracker.find(:all, :order => 'position')
|
@trackers = Tracker.find(:all)
|
||||||
@priorities = Enumeration::get_values('IPRI')
|
@priorities = Enumeration::get_values('IPRI')
|
||||||
@categories = @project.issue_categories
|
@categories = @project.issue_categories
|
||||||
@authors = @project.members.collect { |m| m.user }
|
@authors = @project.members.collect { |m| m.user }
|
||||||
@@ -104,8 +104,8 @@ private
|
|||||||
rescue ActiveRecord::RecordNotFound
|
rescue ActiveRecord::RecordNotFound
|
||||||
render_404
|
render_404
|
||||||
end
|
end
|
||||||
|
|
||||||
def issues_by_tracker
|
def issues_by_tracker
|
||||||
@issues_by_tracker ||=
|
@issues_by_tracker ||=
|
||||||
ActiveRecord::Base.connection.select_all("select s.id as status_id,
|
ActiveRecord::Base.connection.select_all("select s.id as status_id,
|
||||||
s.is_closed as closed,
|
s.is_closed as closed,
|
||||||
@@ -118,9 +118,9 @@ private
|
|||||||
and i.tracker_id=t.id
|
and i.tracker_id=t.id
|
||||||
and i.project_id=#{@project.id}
|
and i.project_id=#{@project.id}
|
||||||
group by s.id, s.is_closed, t.id")
|
group by s.id, s.is_closed, t.id")
|
||||||
end
|
end
|
||||||
|
|
||||||
def issues_by_priority
|
def issues_by_priority
|
||||||
@issues_by_priority ||=
|
@issues_by_priority ||=
|
||||||
ActiveRecord::Base.connection.select_all("select s.id as status_id,
|
ActiveRecord::Base.connection.select_all("select s.id as status_id,
|
||||||
s.is_closed as closed,
|
s.is_closed as closed,
|
||||||
@@ -133,9 +133,9 @@ private
|
|||||||
and i.priority_id=p.id
|
and i.priority_id=p.id
|
||||||
and i.project_id=#{@project.id}
|
and i.project_id=#{@project.id}
|
||||||
group by s.id, s.is_closed, p.id")
|
group by s.id, s.is_closed, p.id")
|
||||||
end
|
end
|
||||||
|
|
||||||
def issues_by_category
|
def issues_by_category
|
||||||
@issues_by_category ||=
|
@issues_by_category ||=
|
||||||
ActiveRecord::Base.connection.select_all("select s.id as status_id,
|
ActiveRecord::Base.connection.select_all("select s.id as status_id,
|
||||||
s.is_closed as closed,
|
s.is_closed as closed,
|
||||||
@@ -148,9 +148,9 @@ private
|
|||||||
and i.category_id=c.id
|
and i.category_id=c.id
|
||||||
and i.project_id=#{@project.id}
|
and i.project_id=#{@project.id}
|
||||||
group by s.id, s.is_closed, c.id")
|
group by s.id, s.is_closed, c.id")
|
||||||
end
|
end
|
||||||
|
|
||||||
def issues_by_author
|
def issues_by_author
|
||||||
@issues_by_author ||=
|
@issues_by_author ||=
|
||||||
ActiveRecord::Base.connection.select_all("select s.id as status_id,
|
ActiveRecord::Base.connection.select_all("select s.id as status_id,
|
||||||
s.is_closed as closed,
|
s.is_closed as closed,
|
||||||
@@ -163,5 +163,5 @@ private
|
|||||||
and i.author_id=a.id
|
and i.author_id=a.id
|
||||||
and i.project_id=#{@project.id}
|
and i.project_id=#{@project.id}
|
||||||
group by s.id, s.is_closed, a.id")
|
group by s.id, s.is_closed, a.id")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -16,19 +16,16 @@
|
|||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
class RolesController < ApplicationController
|
class RolesController < ApplicationController
|
||||||
layout 'base'
|
layout 'base'
|
||||||
before_filter :require_admin
|
before_filter :require_admin
|
||||||
|
|
||||||
verify :method => :post, :only => [ :destroy, :move ],
|
|
||||||
:redirect_to => { :action => :list }
|
|
||||||
|
|
||||||
def index
|
def index
|
||||||
list
|
list
|
||||||
render :action => 'list' unless request.xhr?
|
render :action => 'list' unless request.xhr?
|
||||||
end
|
end
|
||||||
|
|
||||||
def list
|
def list
|
||||||
@role_pages, @roles = paginate :roles, :per_page => 10, :order => "position"
|
@role_pages, @roles = paginate :roles, :per_page => 10
|
||||||
render :action => "list", :layout => false if request.xhr?
|
render :action => "list", :layout => false if request.xhr?
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -65,21 +62,6 @@ class RolesController < ApplicationController
|
|||||||
redirect_to :action => 'list'
|
redirect_to :action => 'list'
|
||||||
end
|
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
|
def workflow
|
||||||
@role = Role.find_by_id(params[:role_id])
|
@role = Role.find_by_id(params[:role_id])
|
||||||
@tracker = Tracker.find_by_id(params[:tracker_id])
|
@tracker = Tracker.find_by_id(params[:tracker_id])
|
||||||
@@ -95,8 +77,8 @@ class RolesController < ApplicationController
|
|||||||
flash[:notice] = l(:notice_successful_update)
|
flash[:notice] = l(:notice_successful_update)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@roles = Role.find(:all, :order => 'position')
|
@roles = Role.find :all
|
||||||
@trackers = Tracker.find(:all, :order => 'position')
|
@trackers = Tracker.find :all
|
||||||
@statuses = IssueStatus.find(:all, :include => :workflows, :order => 'position')
|
@statuses = IssueStatus.find(:all, :include => :workflows)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,33 +0,0 @@
|
|||||||
# 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
|
end
|
||||||
|
|
||||||
# GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html)
|
# GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html)
|
||||||
verify :method => :post, :only => [ :destroy, :move ], :redirect_to => { :action => :list }
|
verify :method => :post, :only => [ :destroy ], :redirect_to => { :action => :list }
|
||||||
|
|
||||||
def list
|
def list
|
||||||
@tracker_pages, @trackers = paginate :trackers, :per_page => 10, :order => 'position'
|
@tracker_pages, @trackers = paginate :trackers, :per_page => 10
|
||||||
render :action => "list", :layout => false if request.xhr?
|
render :action => "list", :layout => false if request.xhr?
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -47,22 +47,7 @@ class TrackersController < ApplicationController
|
|||||||
redirect_to :action => 'list'
|
redirect_to :action => 'list'
|
||||||
end
|
end
|
||||||
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
|
def destroy
|
||||||
@tracker = Tracker.find(params[:id])
|
@tracker = Tracker.find(params[:id])
|
||||||
unless @tracker.issues.empty?
|
unless @tracker.issues.empty?
|
||||||
@@ -71,5 +56,6 @@ class TrackersController < ApplicationController
|
|||||||
@tracker.destroy
|
@tracker.destroy
|
||||||
end
|
end
|
||||||
redirect_to :action => 'list'
|
redirect_to :action => 'list'
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# redMine - project management software
|
# redMine - project management software
|
||||||
# Copyright (C) 2006-2007 Jean-Philippe Lang
|
# Copyright (C) 2006 Jean-Philippe Lang
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or
|
# This program is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU General Public License
|
# modify it under the terms of the GNU General Public License
|
||||||
@@ -45,7 +45,7 @@ class UsersController < ApplicationController
|
|||||||
|
|
||||||
def add
|
def add
|
||||||
if request.get?
|
if request.get?
|
||||||
@user = User.new(:language => Setting.default_language)
|
@user = User.new(:language => $RDM_DEFAULT_LANG)
|
||||||
@custom_values = UserCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x, :customized => @user) }
|
@custom_values = UserCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x, :customized => @user) }
|
||||||
else
|
else
|
||||||
@user = User.new(params[:user])
|
@user = User.new(params[:user])
|
||||||
@@ -80,7 +80,7 @@ class UsersController < ApplicationController
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
@auth_sources = AuthSource.find(:all)
|
@auth_sources = AuthSource.find(:all)
|
||||||
@roles = Role.find(:all, :order => 'position')
|
@roles = Role.find :all
|
||||||
@projects = Project.find(:all) - @user.projects
|
@projects = Project.find(:all) - @user.projects
|
||||||
@membership ||= Member.new
|
@membership ||= Member.new
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -22,16 +22,16 @@ class VersionsController < ApplicationController
|
|||||||
def edit
|
def edit
|
||||||
if request.post? and @version.update_attributes(params[:version])
|
if request.post? and @version.update_attributes(params[:version])
|
||||||
flash[:notice] = l(:notice_successful_update)
|
flash[:notice] = l(:notice_successful_update)
|
||||||
redirect_to :controller => 'projects', :action => 'settings', :tab => 'versions', :id => @project
|
redirect_to :controller => 'projects', :action => 'settings', :id => @project
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
@version.destroy
|
@version.destroy
|
||||||
redirect_to :controller => 'projects', :action => 'settings', :tab => 'versions', :id => @project
|
redirect_to :controller => 'projects', :action => 'settings', :id => @project
|
||||||
rescue
|
rescue
|
||||||
flash[:notice] = "Unable to delete version"
|
flash[:notice] = "Unable to delete version"
|
||||||
redirect_to :controller => 'projects', :action => 'settings', :tab => 'versions', :id => @project
|
redirect_to :controller => 'projects', :action => 'settings', :id => @project
|
||||||
end
|
end
|
||||||
|
|
||||||
def download
|
def download
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# redMine - project management software
|
# redMine - project management software
|
||||||
# Copyright (C) 2006-2007 Jean-Philippe Lang
|
# Copyright (C) 2006 Jean-Philippe Lang
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or
|
# This program is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU General Public License
|
# modify it under the terms of the GNU General Public License
|
||||||
@@ -50,14 +50,6 @@ module ApplicationHelper
|
|||||||
link_to user.display_name, :controller => 'account', :action => 'show', :id => user
|
link_to user.display_name, :controller => 'account', :action => 'show', :id => user
|
||||||
end
|
end
|
||||||
|
|
||||||
def 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)
|
def format_date(date)
|
||||||
l_date(date) if date
|
l_date(date) if date
|
||||||
end
|
end
|
||||||
@@ -93,7 +85,7 @@ module ApplicationHelper
|
|||||||
end
|
end
|
||||||
|
|
||||||
def textilizable(text)
|
def textilizable(text)
|
||||||
(Setting.text_formatting == 'textile') && (ActionView::Helpers::TextHelper.method_defined? "textilize") ? RedCloth.new(h(text)).to_html : simple_format(auto_link(h(text)))
|
$RDM_TEXTILE_DISABLED ? simple_format(auto_link(h(text))) : RedCloth.new(h(text)).to_html
|
||||||
end
|
end
|
||||||
|
|
||||||
def error_messages_for(object_name, options = {})
|
def error_messages_for(object_name, options = {})
|
||||||
@@ -131,9 +123,8 @@ module ApplicationHelper
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def lang_options_for_select(blank=true)
|
def lang_options_for_select
|
||||||
(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]}
|
||||||
(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
|
end
|
||||||
|
|
||||||
def label_tag_for(name, option_tags = nil, options = {})
|
def label_tag_for(name, option_tags = nil, options = {})
|
||||||
@@ -154,7 +145,7 @@ module ApplicationHelper
|
|||||||
end
|
end
|
||||||
|
|
||||||
def calendar_for(field_id)
|
def calendar_for(field_id)
|
||||||
image_tag("calendar.png", {:id => "#{field_id}_trigger",:class => "calendar-trigger"}) +
|
image_tag("calendar", {:id => "#{field_id}_trigger",:class => "calendar-trigger"}) +
|
||||||
javascript_tag("Calendar.setup({inputField : '#{field_id}', ifFormat : '%Y-%m-%d', button : '#{field_id}_trigger' });")
|
javascript_tag("Calendar.setup({inputField : '#{field_id}', ifFormat : '%Y-%m-%d', button : '#{field_id}_trigger' });")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ module CustomFieldsHelper
|
|||||||
when "bool"
|
when "bool"
|
||||||
check_box 'custom_value', 'value', :name => field_name, :id => field_id
|
check_box 'custom_value', 'value', :name => field_name, :id => field_id
|
||||||
when "list"
|
when "list"
|
||||||
select 'custom_value', 'value', custom_field.possible_values, { :include_blank => true }, :name => field_name, :id => field_id
|
select 'custom_value', 'value', custom_field.possible_values.split('|'), { :include_blank => true }, :name => field_name, :id => field_id
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -59,10 +59,10 @@ module CustomFieldsHelper
|
|||||||
|
|
||||||
# Return a string used to display a custom value
|
# Return a string used to display a custom value
|
||||||
def format_value(value, field_format)
|
def format_value(value, field_format)
|
||||||
return "" unless value && !value.empty?
|
return "" unless value
|
||||||
case field_format
|
case field_format
|
||||||
when "date"
|
when "date"
|
||||||
begin; l_date(value.to_date); rescue; value end
|
value.empty? ? "" : l_date(value.to_date)
|
||||||
when "bool"
|
when "bool"
|
||||||
l_YesNo(value == "1")
|
l_YesNo(value == "1")
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -22,11 +22,6 @@ module IfpdfHelper
|
|||||||
class IFPDF < FPDF
|
class IFPDF < FPDF
|
||||||
|
|
||||||
attr_accessor :footer_date
|
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='')
|
def Cell(w,h=0,txt='',border=0,ln=0,align='',fill=0,link='')
|
||||||
@ic ||= Iconv.new('ISO-8859-1', 'UTF-8')
|
@ic ||= Iconv.new('ISO-8859-1', 'UTF-8')
|
||||||
|
|||||||
@@ -56,12 +56,12 @@ module IssuesHelper
|
|||||||
|
|
||||||
unless no_html
|
unless no_html
|
||||||
label = content_tag('strong', label)
|
label = content_tag('strong', label)
|
||||||
old_value = content_tag("i", h(old_value)) if detail.old_value
|
old_value = content_tag("i", h(old_value)) if old_value
|
||||||
old_value = content_tag("strike", old_value) if detail.old_value and (!detail.value or detail.value.empty?)
|
old_value = content_tag("strike", h(old_value)) if old_value and !value
|
||||||
value = content_tag("i", h(value)) if value
|
value = content_tag("i", h(value)) if value
|
||||||
end
|
end
|
||||||
|
|
||||||
if detail.value and !detail.value.to_s.empty?
|
if value
|
||||||
if old_value
|
if old_value
|
||||||
label + " " + l(:text_journal_changed, old_value, value)
|
label + " " + l(:text_journal_changed, old_value, value)
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
# 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]
|
key, order = session[@sort_name][:key], session[@sort_name][:order]
|
||||||
if key == column
|
if key == column
|
||||||
if order.downcase == 'asc'
|
if order.downcase == 'asc'
|
||||||
icon = 'sort_asc.png'
|
icon = 'sort_asc'
|
||||||
order = 'desc'
|
order = 'desc'
|
||||||
else
|
else
|
||||||
icon = 'sort_desc.png'
|
icon = 'sort_desc'
|
||||||
order = 'asc'
|
order = 'asc'
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# redMine - project management software
|
# redMine - project management software
|
||||||
# Copyright (C) 2006-2007 Jean-Philippe Lang
|
# Copyright (C) 2006 Jean-Philippe Lang
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or
|
# This program is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU General Public License
|
# modify it under the terms of the GNU General Public License
|
||||||
@@ -21,15 +21,12 @@ class Attachment < ActiveRecord::Base
|
|||||||
belongs_to :container, :polymorphic => true
|
belongs_to :container, :polymorphic => true
|
||||||
belongs_to :author, :class_name => "User", :foreign_key => "author_id"
|
belongs_to :author, :class_name => "User", :foreign_key => "author_id"
|
||||||
|
|
||||||
validates_presence_of :container, :filename
|
@@max_size = $RDM_ATTACHMENT_MAX_SIZE || 5*1024*1024
|
||||||
|
cattr_reader :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
|
|
||||||
|
|
||||||
|
validates_presence_of :container, :filename
|
||||||
|
validates_inclusion_of :filesize, :in => 1..@@max_size
|
||||||
|
|
||||||
def file=(incomming_file)
|
def file=(incomming_file)
|
||||||
unless incomming_file.nil?
|
unless incomming_file.nil?
|
||||||
@temp_file = incomming_file
|
@temp_file = incomming_file
|
||||||
@@ -66,7 +63,7 @@ class Attachment < ActiveRecord::Base
|
|||||||
|
|
||||||
# Returns file's location on disk
|
# Returns file's location on disk
|
||||||
def diskfile
|
def diskfile
|
||||||
"#{@@storage_path}/#{self.disk_filename}"
|
"#{$RDM_STORAGE_PATH}/#{self.disk_filename}"
|
||||||
end
|
end
|
||||||
|
|
||||||
def increment_download
|
def increment_download
|
||||||
|
|||||||
@@ -17,8 +17,7 @@
|
|||||||
|
|
||||||
class CustomField < ActiveRecord::Base
|
class CustomField < ActiveRecord::Base
|
||||||
has_many :custom_values, :dependent => :delete_all
|
has_many :custom_values, :dependent => :delete_all
|
||||||
serialize :possible_values
|
|
||||||
|
|
||||||
FIELD_FORMATS = { "string" => { :name => :label_string, :order => 1 },
|
FIELD_FORMATS = { "string" => { :name => :label_string, :order => 1 },
|
||||||
"text" => { :name => :label_text, :order => 2 },
|
"text" => { :name => :label_text, :order => 2 },
|
||||||
"int" => { :name => :label_integer, :order => 3 },
|
"int" => { :name => :label_integer, :order => 3 },
|
||||||
@@ -31,23 +30,7 @@ class CustomField < ActiveRecord::Base
|
|||||||
validates_uniqueness_of :name
|
validates_uniqueness_of :name
|
||||||
validates_format_of :name, :with => /^[\w\s\'\-]*$/i
|
validates_format_of :name, :with => /^[\w\s\'\-]*$/i
|
||||||
validates_inclusion_of :field_format, :in => FIELD_FORMATS.keys
|
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
|
# to move in project_custom_field
|
||||||
def self.for_all
|
def self.for_all
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ protected
|
|||||||
when "date"
|
when "date"
|
||||||
errors.add(:value, :activerecord_error_not_a_date) unless value =~ /^\d{4}-\d{2}-\d{2}$/ or value.empty?
|
errors.add(:value, :activerecord_error_not_a_date) unless value =~ /^\d{4}-\d{2}-\d{2}$/ or value.empty?
|
||||||
when "list"
|
when "list"
|
||||||
errors.add(:value, :activerecord_error_inclusion) unless custom_field.possible_values.include? value or value.empty?
|
errors.add(:value, :activerecord_error_inclusion) unless custom_field.possible_values.split('|').include? value or value.empty?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -18,7 +18,6 @@
|
|||||||
class IssueStatus < ActiveRecord::Base
|
class IssueStatus < ActiveRecord::Base
|
||||||
before_destroy :check_integrity
|
before_destroy :check_integrity
|
||||||
has_many :workflows, :foreign_key => "old_status_id"
|
has_many :workflows, :foreign_key => "old_status_id"
|
||||||
acts_as_list
|
|
||||||
|
|
||||||
validates_presence_of :name
|
validates_presence_of :name
|
||||||
validates_uniqueness_of :name
|
validates_uniqueness_of :name
|
||||||
@@ -27,7 +26,7 @@ class IssueStatus < ActiveRecord::Base
|
|||||||
validates_format_of :html_color, :with => /^[a-f0-9]*$/i
|
validates_format_of :html_color, :with => /^[a-f0-9]*$/i
|
||||||
|
|
||||||
def before_save
|
def before_save
|
||||||
IssueStatus.update_all "is_default=#{connection.quoted_false}" if self.is_default?
|
IssueStatus.update_all "is_default=false" if self.is_default?
|
||||||
end
|
end
|
||||||
|
|
||||||
# Returns the default status for new issues
|
# Returns the default status for new issues
|
||||||
@@ -46,6 +45,6 @@ class IssueStatus < ActiveRecord::Base
|
|||||||
|
|
||||||
private
|
private
|
||||||
def check_integrity
|
def check_integrity
|
||||||
raise "Can't delete status" if Issue.find(:first, :conditions => ["status_id=?", self.id])
|
raise "Can't delete status" if Issue.find(:first, :conditions => ["status_id=?", self.id]) or IssueHistory.find(:first, :conditions => ["status_id=?", self.id])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
+9
-44
@@ -1,5 +1,5 @@
|
|||||||
# redMine - project management software
|
# redMine - project management software
|
||||||
# Copyright (C) 2006-2007 Jean-Philippe Lang
|
# Copyright (C) 2006 Jean-Philippe Lang
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or
|
# This program is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU General Public License
|
# modify it under the terms of the GNU General Public License
|
||||||
@@ -16,72 +16,37 @@
|
|||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
class Mailer < ActionMailer::Base
|
class Mailer < ActionMailer::Base
|
||||||
|
|
||||||
helper IssuesHelper
|
helper IssuesHelper
|
||||||
|
|
||||||
def issue_add(issue)
|
def issue_add(issue)
|
||||||
set_language_if_valid(Setting.default_language)
|
|
||||||
# Sends to all project members
|
# Sends to all project members
|
||||||
@recipients = issue.project.members.collect { |m| m.user.mail if m.user.mail_notification }.compact
|
@recipients = issue.project.members.collect { |m| m.user.mail if m.user.mail_notification }
|
||||||
@from = Setting.mail_from
|
@from = $RDM_MAIL_FROM
|
||||||
@subject = "[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}] #{issue.status.name} - #{issue.subject}"
|
@subject = "[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}] #{issue.status.name} - #{issue.subject}"
|
||||||
@body['issue'] = issue
|
@body['issue'] = issue
|
||||||
end
|
end
|
||||||
|
|
||||||
def issue_edit(journal)
|
def issue_edit(journal)
|
||||||
set_language_if_valid(Setting.default_language)
|
|
||||||
# Sends to all project members
|
# Sends to all project members
|
||||||
issue = journal.journalized
|
issue = journal.journalized
|
||||||
@recipients = issue.project.members.collect { |m| m.user.mail if m.user.mail_notification }.compact
|
@recipients = issue.project.members.collect { |m| m.user.mail if m.user.mail_notification }
|
||||||
@from = Setting.mail_from
|
@from = $RDM_MAIL_FROM
|
||||||
@subject = "[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}] #{issue.status.name} - #{issue.subject}"
|
@subject = "[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}] #{issue.status.name} - #{issue.subject}"
|
||||||
@body['issue'] = issue
|
@body['issue'] = issue
|
||||||
@body['journal']= journal
|
@body['journal']= journal
|
||||||
end
|
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)
|
def lost_password(token)
|
||||||
set_language_if_valid(token.user.language)
|
|
||||||
@recipients = token.user.mail
|
@recipients = token.user.mail
|
||||||
@from = Setting.mail_from
|
@from = $RDM_MAIL_FROM
|
||||||
@subject = l(:mail_subject_lost_password)
|
@subject = l(:mail_subject_lost_password)
|
||||||
@body['token'] = token
|
@body['token'] = token
|
||||||
end
|
end
|
||||||
|
|
||||||
def register(token)
|
def register(token)
|
||||||
set_language_if_valid(token.user.language)
|
|
||||||
@recipients = token.user.mail
|
@recipients = token.user.mail
|
||||||
@from = Setting.mail_from
|
@from = $RDM_MAIL_FROM
|
||||||
@subject = l(:mail_subject_register)
|
@subject = l(:mail_subject_register)
|
||||||
@body['token'] = token
|
@body['token'] = token
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -65,6 +65,6 @@ class Project < ActiveRecord::Base
|
|||||||
protected
|
protected
|
||||||
def validate
|
def validate
|
||||||
errors.add(parent_id, " must be a root project") if parent and parent.parent
|
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 children.size > 0
|
errors.add_to_base("A project with subprojects can't be a subproject") if parent and projects_count > 0
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
+7
-8
@@ -69,20 +69,19 @@ class Query < ActiveRecord::Base
|
|||||||
|
|
||||||
def available_filters
|
def available_filters
|
||||||
return @available_filters if @available_filters
|
return @available_filters if @available_filters
|
||||||
@available_filters = { "status_id" => { :type => :list_status, :order => 1, :values => IssueStatus.find(:all, :order => 'position').collect{|s| [s.name, s.id.to_s] } },
|
@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, :order => 'position').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] } },
|
||||||
"priority_id" => { :type => :list, :order => 3, :values => Enumeration.find(:all, :conditions => ['opt=?','IPRI']).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 => 8 },
|
"subject" => { :type => :text, :order => 7 },
|
||||||
"created_on" => { :type => :date_past, :order => 9 },
|
"created_on" => { :type => :date_past, :order => 8 },
|
||||||
"updated_on" => { :type => :date_past, :order => 10 },
|
"updated_on" => { :type => :date_past, :order => 9 },
|
||||||
"start_date" => { :type => :date, :order => 11 },
|
"start_date" => { :type => :date, :order => 10 },
|
||||||
"due_date" => { :type => :date, :order => 12 } }
|
"due_date" => { :type => :date, :order => 11 } }
|
||||||
unless project.nil?
|
unless project.nil?
|
||||||
# project specific filters
|
# 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["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["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["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
|
# remove category filter if no category defined
|
||||||
@available_filters.delete "category_id" if @available_filters["category_id"][:values].empty?
|
@available_filters.delete "category_id" if @available_filters["category_id"][:values].empty?
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ class Role < ActiveRecord::Base
|
|||||||
has_and_belongs_to_many :permissions
|
has_and_belongs_to_many :permissions
|
||||||
has_many :workflows, :dependent => :delete_all
|
has_many :workflows, :dependent => :delete_all
|
||||||
has_many :members
|
has_many :members
|
||||||
acts_as_list
|
|
||||||
|
|
||||||
validates_presence_of :name
|
validates_presence_of :name
|
||||||
validates_uniqueness_of :name
|
validates_uniqueness_of :name
|
||||||
|
|||||||
@@ -1,61 +0,0 @@
|
|||||||
# 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,7 +20,6 @@ class Tracker < ActiveRecord::Base
|
|||||||
has_many :issues
|
has_many :issues
|
||||||
has_many :workflows, :dependent => :delete_all
|
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'
|
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_presence_of :name
|
||||||
validates_uniqueness_of :name
|
validates_uniqueness_of :name
|
||||||
|
|||||||
+3
-15
@@ -1,5 +1,5 @@
|
|||||||
# redMine - project management software
|
# redMine - project management software
|
||||||
# Copyright (C) 2006-2007 Jean-Philippe Lang
|
# Copyright (C) 2006 Jean-Philippe Lang
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or
|
# This program is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU General Public License
|
# modify it under the terms of the GNU General Public License
|
||||||
@@ -49,19 +49,7 @@ class User < ActiveRecord::Base
|
|||||||
# update hashed_password if password was set
|
# update hashed_password if password was set
|
||||||
self.hashed_password = User.hash_password(self.password) if self.password
|
self.hashed_password = User.hash_password(self.password) if self.password
|
||||||
end
|
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
|
# Returns the user that matches provided login and password, or nil
|
||||||
def self.try_to_login(login, password)
|
def self.try_to_login(login, password)
|
||||||
user = find(:first, :conditions => ["login=?", login])
|
user = find(:first, :conditions => ["login=?", login])
|
||||||
@@ -81,7 +69,7 @@ class User < ActiveRecord::Base
|
|||||||
if attrs
|
if attrs
|
||||||
onthefly = new(*attrs)
|
onthefly = new(*attrs)
|
||||||
onthefly.login = login
|
onthefly.login = login
|
||||||
onthefly.language = Setting.default_language
|
onthefly.language = $RDM_DEFAULT_LANG
|
||||||
if onthefly.save
|
if onthefly.save
|
||||||
user = find(:first, :conditions => ["login=?", login])
|
user = find(:first, :conditions => ["login=?", login])
|
||||||
logger.info("User '#{user.login}' created on the fly.") if logger
|
logger.info("User '#{user.login}' created on the fly.") if logger
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
class UserPreference < ActiveRecord::Base
|
class UserPreference < ActiveRecord::Base
|
||||||
belongs_to :user
|
belongs_to :user
|
||||||
serialize :others
|
serialize :others, Hash
|
||||||
|
|
||||||
attr_protected :others
|
attr_protected :others
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<center>
|
<center>
|
||||||
<div class="box login">
|
<div class="box login">
|
||||||
<h2 class="icon22 icon22-authent"><%=l(:label_please_login)%></h2>
|
<h2><%= image_tag 'login' %> <%=l(:label_please_login)%></h2>
|
||||||
|
|
||||||
<% form_tag({:action=> "login"}, :class => "tabular") do %>
|
<%= start_form_tag({:action=> "login"}, :class => "tabular") %>
|
||||||
<p><label for="login"><%=l(:field_login)%>:</label>
|
<p><label for="login"><%=l(:field_login)%>:</label>
|
||||||
<%= text_field_tag 'login', nil, :size => 25 %></p>
|
<%= text_field_tag 'login', nil, :size => 25 %></p>
|
||||||
|
|
||||||
@@ -10,15 +10,9 @@
|
|||||||
<%= password_field_tag 'password', nil, :size => 25 %></p>
|
<%= password_field_tag 'password', nil, :size => 25 %></p>
|
||||||
|
|
||||||
<p><center><input type="submit" name="login" value="<%=l(:button_login)%> »" class="primary" /></center>
|
<p><center><input type="submit" name="login" value="<%=l(:button_login)%> »" class="primary" /></center>
|
||||||
<% end %>
|
<%= end_form_tag %>
|
||||||
|
|
||||||
<br>
|
<br><% unless $RDM_SELF_REGISTRATION == false %><%= link_to l(:label_register), :action => 'register' %> |<% end %>
|
||||||
<% links = []
|
<%= link_to l(:label_password_lost), :action => 'lost_password' %></p>
|
||||||
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>
|
</div>
|
||||||
</center>
|
</center>
|
||||||
@@ -2,13 +2,13 @@
|
|||||||
<div class="box login">
|
<div class="box login">
|
||||||
<h2><%=l(:label_password_lost)%></h2>
|
<h2><%=l(:label_password_lost)%></h2>
|
||||||
|
|
||||||
<% form_tag({:action=> "lost_password"}, :class => "tabular") do %>
|
<%= start_form_tag({:action=> "lost_password"}, :class => "tabular") %>
|
||||||
|
|
||||||
<p><label for="mail"><%=l(:field_mail)%> <span class="required">*</span></label>
|
<p><label for="mail"><%=l(:field_mail)%> <span class="required">*</span></label>
|
||||||
<%= text_field_tag 'mail', nil, :size => 40 %></p>
|
<%= text_field_tag 'mail', nil, :size => 40 %></p>
|
||||||
|
|
||||||
<p><center><%= submit_tag l(:button_submit) %></center></p>
|
<p><center><%= submit_tag l(:button_submit) %></center></p>
|
||||||
|
|
||||||
<% end %>
|
<%= end_form_tag %>
|
||||||
</div>
|
</div>
|
||||||
</center>
|
</center>
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<%= error_messages_for 'user' %>
|
<%= error_messages_for 'user' %>
|
||||||
|
|
||||||
<% form_tag({:token => @token.value}, :class => "tabular") do %>
|
<%= start_form_tag({:token => @token.value}, :class => "tabular") %>
|
||||||
|
|
||||||
<p><label for="new_password"><%=l(:field_new_password)%> <span class="required">*</span></label>
|
<p><label for="new_password"><%=l(:field_new_password)%> <span class="required">*</span></label>
|
||||||
<%= password_field_tag 'new_password', nil, :size => 25 %></p>
|
<%= password_field_tag 'new_password', nil, :size => 25 %></p>
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
<%= password_field_tag 'new_password_confirmation', nil, :size => 25 %></p>
|
<%= password_field_tag 'new_password_confirmation', nil, :size => 25 %></p>
|
||||||
|
|
||||||
<p><center><%= submit_tag l(:button_save) %></center></p>
|
<p><center><%= submit_tag l(:button_save) %></center></p>
|
||||||
<% end %>
|
<%= end_form_tag %>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</center>
|
</center>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<h2><%=l(:label_register)%></h2>
|
<h2><%=l(:label_register)%></h2>
|
||||||
|
|
||||||
<% form_tag({:action => 'register'}, :class => "tabular") do %>
|
<%= start_form_tag({:action => 'register'}, :class => "tabular") %>
|
||||||
<%= error_messages_for 'user' %>
|
<%= error_messages_for 'user' %>
|
||||||
|
|
||||||
<div class="box">
|
<div class="box">
|
||||||
@@ -36,11 +36,4 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<%= submit_tag l(:button_submit) %>
|
<%= submit_tag l(:button_submit) %>
|
||||||
<% end %>
|
<%= end_form_tag %>
|
||||||
|
|
||||||
<% 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 %>
|
|
||||||
|
|||||||
+21
-16
@@ -1,45 +1,50 @@
|
|||||||
<h2><%=l(:label_administration)%></h2>
|
<h2><%=l(:label_administration)%></h2>
|
||||||
|
|
||||||
<p class="icon22 icon22-projects">
|
<p>
|
||||||
|
<%= image_tag "projects" %>
|
||||||
<%= link_to l(:label_project_plural), :controller => 'admin', :action => 'projects' %> |
|
<%= link_to l(:label_project_plural), :controller => 'admin', :action => 'projects' %> |
|
||||||
<%= link_to l(:label_new), :controller => 'projects', :action => 'add' %>
|
<%= link_to l(:label_new), :controller => 'projects', :action => 'add' %>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p class="icon22 icon22-users">
|
<p>
|
||||||
|
<%= image_tag "users" %>
|
||||||
<%= link_to l(:label_user_plural), :controller => 'users' %> |
|
<%= link_to l(:label_user_plural), :controller => 'users' %> |
|
||||||
<%= link_to l(:label_new), :controller => 'users', :action => 'add' %>
|
<%= link_to l(:label_new), :controller => 'users', :action => 'add' %>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p class="icon22 icon22-role">
|
<p>
|
||||||
|
<%= image_tag "role" %>
|
||||||
<%= link_to l(:label_role_and_permissions), :controller => 'roles' %>
|
<%= link_to l(:label_role_and_permissions), :controller => 'roles' %>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p class="icon22 icon22-tracker">
|
<p>
|
||||||
|
<%= image_tag "tracker" %>
|
||||||
<%= link_to l(:label_tracker_plural), :controller => 'trackers' %> |
|
<%= 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_issue_status_plural), :controller => 'issue_statuses' %> |
|
||||||
<%= link_to l(:label_workflow), :controller => 'roles', :action => 'workflow' %>
|
<%= link_to l(:label_workflow), :controller => 'roles', :action => 'workflow' %>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p class="icon22 icon22-workflow">
|
<p>
|
||||||
<%= link_to l(:label_custom_field_plural), :controller => 'custom_fields' %>
|
<%= image_tag "options" %>
|
||||||
</p>
|
|
||||||
|
|
||||||
<p class="icon22 icon22-options">
|
|
||||||
<%= link_to l(:label_enumerations), :controller => 'enumerations' %>
|
<%= link_to l(:label_enumerations), :controller => 'enumerations' %>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p class="icon22 icon22-notifications">
|
<p>
|
||||||
|
<%= image_tag "mailer" %>
|
||||||
<%= link_to l(:field_mail_notification), :controller => 'admin', :action => 'mail_options' %>
|
<%= link_to l(:field_mail_notification), :controller => 'admin', :action => 'mail_options' %>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p class="icon22 icon22-authent">
|
<p>
|
||||||
|
<%= image_tag "login" %>
|
||||||
<%= link_to l(:label_authentication), :controller => 'auth_sources' %>
|
<%= link_to l(:label_authentication), :controller => 'auth_sources' %>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p class="icon22 icon22-settings">
|
<p>
|
||||||
<%= link_to l(:label_settings), :controller => 'settings' %>
|
<%= image_tag "help" %>
|
||||||
</p>
|
|
||||||
|
|
||||||
<p class="icon22 icon22-info">
|
|
||||||
<%= link_to l(:label_information_plural), :controller => 'admin', :action => 'info' %>
|
<%= link_to l(:label_information_plural), :controller => 'admin', :action => 'info' %>
|
||||||
</p>
|
</p>
|
||||||
@@ -1,3 +1,10 @@
|
|||||||
<h2><%=l(:label_information_plural)%></h2>
|
<h2><%=l(:label_information_plural)%></h2>
|
||||||
|
|
||||||
<p><%=l(:field_version)%>: <strong>redMine <%= Redmine::VERSION %></strong></p>
|
<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>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<h2><%=l(:field_mail_notification)%></h2>
|
<h2><%=l(:field_mail_notification)%></h2>
|
||||||
|
|
||||||
<% form_tag ({:action => 'mail_options'}, :id => 'mail_options_form') do %>
|
<%= start_form_tag ({}, :id => 'mail_options_form')%>
|
||||||
|
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<p><%=l(:text_select_mail_notifications)%></p>
|
<p><%=l(:text_select_mail_notifications)%></p>
|
||||||
@@ -21,4 +21,4 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<%= submit_tag l(:button_save) %>
|
<%= submit_tag l(:button_save) %>
|
||||||
<% end %>
|
<%= end_form_tag %>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<div class="contextual">
|
<div class="contextual">
|
||||||
<%= link_to l(:label_project_new), {:controller => 'projects', :action => 'add'}, :class => 'icon icon-add' %>
|
<%= link_to l(:label_project_new), {:controller => 'projects', :action => 'add'}, :class => 'pic picAdd' %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2><%=l(:label_project_plural)%></h2>
|
<h2><%=l(:label_project_plural)%></h2>
|
||||||
@@ -18,8 +18,8 @@
|
|||||||
<tr class="<%= cycle("odd", "even") %>">
|
<tr class="<%= cycle("odd", "even") %>">
|
||||||
<td><%= link_to project.name, :controller => 'projects', :action => 'settings', :id => project %>
|
<td><%= link_to project.name, :controller => 'projects', :action => 'settings', :id => project %>
|
||||||
<td><%=h project.description %>
|
<td><%=h project.description %>
|
||||||
<td align="center"><%= image_tag 'true.png' if project.is_public? %>
|
<td align="center"><%= image_tag 'true' if project.is_public? %>
|
||||||
<td align="center"><%= project.children.size %>
|
<td align="center"><%= project.projects_count %>
|
||||||
<td align="center"><%= format_date(project.created_on) %>
|
<td align="center"><%= format_date(project.created_on) %>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<%= button_to l(:button_delete), { :controller => 'projects', :action => 'destroy', :id => project }, :class => "button-small" %>
|
<%= 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>
|
<h2><%=l(:label_auth_source)%> (<%= @auth_source.auth_method_name %>)</h2>
|
||||||
|
|
||||||
<% form_tag({:action => 'update', :id => @auth_source}, :class => "tabular") do %>
|
<%= start_form_tag({:action => 'update', :id => @auth_source}, :class => "tabular") %>
|
||||||
<%= render :partial => 'form' %>
|
<%= render :partial => 'form' %>
|
||||||
<%= submit_tag l(:button_save) %>
|
<%= submit_tag l(:button_save) %>
|
||||||
<% end %>
|
<%= end_form_tag %>
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<div class="contextual">
|
<div class="contextual">
|
||||||
<%= link_to l(:label_auth_source_new), {:action => 'new'}, :class => 'icon icon-add' %>
|
<%= link_to l(:label_auth_source_new), {:action => 'new'}, :class => 'pic picAdd' %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2><%=l(:label_auth_source_plural)%></h2>
|
<h2><%=l(:label_auth_source_plural)%></h2>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<h2><%=l(:label_auth_source_new)%> (<%= @auth_source.auth_method_name %>)</h2>
|
<h2><%=l(:label_auth_source_new)%> (<%= @auth_source.auth_method_name %>)</h2>
|
||||||
|
|
||||||
<% form_tag({:action => 'create'}, :class => "tabular") do %>
|
<%= start_form_tag({:action => 'create'}, :class => "tabular") %>
|
||||||
<%= render :partial => 'form' %>
|
<%= render :partial => 'form' %>
|
||||||
<%= submit_tag l(:button_create) %>
|
<%= submit_tag l(:button_create) %>
|
||||||
<% end %>
|
<%= end_form_tag %>
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
<%= error_messages_for 'custom_field' %>
|
<%= error_messages_for 'custom_field' %>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script>
|
||||||
//<![CDATA[
|
|
||||||
function toggle_custom_field_format() {
|
function toggle_custom_field_format() {
|
||||||
format = $("custom_field_field_format");
|
format = $("custom_field_field_format");
|
||||||
p_length = $("custom_field_min_length");
|
p_length = $("custom_field_min_length");
|
||||||
@@ -11,47 +10,28 @@ function toggle_custom_field_format() {
|
|||||||
case "list":
|
case "list":
|
||||||
Element.hide(p_length.parentNode);
|
Element.hide(p_length.parentNode);
|
||||||
Element.hide(p_regexp.parentNode);
|
Element.hide(p_regexp.parentNode);
|
||||||
Element.show(p_values);
|
Element.show(p_values.parentNode);
|
||||||
break;
|
break;
|
||||||
case "int":
|
case "int":
|
||||||
case "string":
|
case "string":
|
||||||
case "text":
|
case "text":
|
||||||
Element.show(p_length.parentNode);
|
Element.show(p_length.parentNode);
|
||||||
Element.show(p_regexp.parentNode);
|
Element.show(p_regexp.parentNode);
|
||||||
Element.hide(p_values);
|
Element.hide(p_values.parentNode);
|
||||||
break;
|
break;
|
||||||
case "date":
|
case "date":
|
||||||
case "bool":
|
case "bool":
|
||||||
Element.hide(p_length.parentNode);
|
Element.hide(p_length.parentNode);
|
||||||
Element.hide(p_regexp.parentNode);
|
Element.hide(p_regexp.parentNode);
|
||||||
Element.hide(p_values);
|
Element.hide(p_values.parentNode);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Element.show(p_length.parentNode);
|
Element.show(p_length.parentNode);
|
||||||
Element.show(p_regexp.parentNode);
|
Element.show(p_regexp.parentNode);
|
||||||
Element.show(p_values);
|
Element.show(p_values.parentNode);
|
||||||
break;
|
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>
|
</script>
|
||||||
|
|
||||||
<!--[form:custom_field]-->
|
<!--[form:custom_field]-->
|
||||||
@@ -62,12 +42,7 @@ function deleteValueField(e) {
|
|||||||
<%= f.text_field :min_length, :size => 5, :no_label => true %> -
|
<%= 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>
|
<%= 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_field :regexp, :size => 50 %><br>(<%=l(:text_regexp_info)%>)</p>
|
||||||
<p id="custom_field_possible_values"><label><%= l(:field_possible_values) %> <%= image_to_function "add.png", "addValueField();return false" %></label>
|
<p><%= f.text_area :possible_values, :rows => 5, :cols => 60 %><br>(<%=l(:text_possible_values_info)%>)</p>
|
||||||
<% (@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>
|
</div>
|
||||||
<%= javascript_tag "toggle_custom_field_format();" %>
|
<%= javascript_tag "toggle_custom_field_format();" %>
|
||||||
<!--[eoform:custom_field]-->
|
<!--[eoform:custom_field]-->
|
||||||
|
|||||||
@@ -1,46 +1,38 @@
|
|||||||
<h2><%=l(:label_custom_field_plural)%></h2>
|
<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">
|
<table class="list">
|
||||||
<thead><tr>
|
<thead><tr>
|
||||||
<th width="30%"><%=l(:field_name)%></th>
|
<th><%=l(:field_name)%></th>
|
||||||
|
<th><%=l(:field_type)%></th>
|
||||||
<th><%=l(:field_field_format)%></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(:field_is_for_all)%></th>
|
||||||
<th><%=l(:label_used_by)%></th>
|
<th><%=l(:label_used_by)%></th>
|
||||||
<% end %>
|
<th></th>
|
||||||
<th width="10%"></th>
|
|
||||||
</tr></thead>
|
</tr></thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<% for custom_field in (@custom_fields_by_type[type] || []) %>
|
<% for custom_field in @custom_fields %>
|
||||||
<tr class="<%= cycle("odd", "even") %>">
|
<tr class="<%= cycle("odd", "even") %>">
|
||||||
<td><%= link_to custom_field.name, :action => 'edit', :id => custom_field %></td>
|
<td><%= link_to custom_field.name, :action => 'edit', :id => custom_field %></td>
|
||||||
|
<td align="center"><%= l(custom_field.type_name) %></td>
|
||||||
<td align="center"><%= l(CustomField::FIELD_FORMATS[custom_field.field_format][:name]) %></td>
|
<td align="center"><%= l(CustomField::FIELD_FORMATS[custom_field.field_format][:name]) %></td>
|
||||||
<td align="center"><%= image_tag 'true.png' if custom_field.is_required? %></td>
|
<td align="center"><%= image_tag 'true' if custom_field.is_required? %></td>
|
||||||
<% if type == 'IssueCustomField' %>
|
<td align="center"><%= image_tag 'true' if custom_field.is_for_all? %></td>
|
||||||
<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>
|
<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">
|
<td align="center">
|
||||||
<%= button_to l(:button_delete), { :action => 'destroy', :id => custom_field }, :confirm => l(:text_are_you_sure), :class => "button-small" %>
|
<%= button_to l(:button_delete), { :action => 'destroy', :id => custom_field }, :confirm => l(:text_are_you_sure), :class => "button-small" %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end; reset_cycle %>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<br />
|
|
||||||
<%= link_to l(:label_custom_field_new), {:action => 'new', :type => type}, :class => 'icon icon-add' %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
<%= javascript_tag "showTab('#{@tab}');" %>
|
<%= pagination_links_full @custom_field_pages %>
|
||||||
|
|
||||||
|
<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>
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
<p><%= link_to h(document.title), :controller => 'documents', :action => 'show', :id => document %><br />
|
<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>
|
<em><%= format_time(document.created_on) %></em></p>
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
<!--[eoform:document]-->
|
<!--[eoform:document]-->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% if Setting.text_formatting == 'textile' %>
|
<% unless $RDM_TEXTILE_DISABLED %>
|
||||||
<%= javascript_include_tag 'jstoolbar' %>
|
<%= javascript_include_tag 'jstoolbar' %>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
//<![CDATA[
|
//<![CDATA[
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<h2><%=l(:label_document)%></h2>
|
<h2><%=l(:label_document)%></h2>
|
||||||
|
|
||||||
<% form_tag({:action => 'edit', :id => @document}, :class => "tabular") do %>
|
<%= start_form_tag({:action => 'edit', :id => @document}, :class => "tabular") %>
|
||||||
<%= render :partial => 'form' %>
|
<%= render :partial => 'form' %>
|
||||||
<%= submit_tag l(:button_save) %>
|
<%= submit_tag l(:button_save) %>
|
||||||
<% end %>
|
<%= end_form_tag %>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<div class="contextual">
|
<div class="contextual">
|
||||||
<%= link_to_if_authorized l(:button_edit), {:controller => 'documents', :action => 'edit', :id => @document}, :class => 'icon icon-edit' %>
|
<%= 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), :method => :post, :class => 'icon icon-del' %>
|
<%= link_to_if_authorized l(:button_delete), {:controller => 'documents', :action => 'destroy', :id => @document}, :confirm => l(:text_are_you_sure), :post => true, :class => 'pic picDelete' %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2><%= @document.title %></h2>
|
<h2><%= @document.title %></h2>
|
||||||
@@ -15,10 +15,10 @@
|
|||||||
<% for attachment in @attachments %>
|
<% for attachment in @attachments %>
|
||||||
<li>
|
<li>
|
||||||
<div class="contextual">
|
<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), :method => :post, :class => 'icon icon-del' %>
|
<%= 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' %>
|
||||||
</div>
|
</div>
|
||||||
<%= link_to attachment.filename, :action => 'download', :id => @document, :attachment_id => attachment %>
|
<%= link_to attachment.filename, :action => 'download', :id => @document, :attachment_id => attachment %>
|
||||||
(<%= number_to_human_size attachment.filesize %>)<br />
|
(<%= human_size attachment.filesize %>)<br />
|
||||||
<em><%= attachment.author.display_name %>, <%= format_date(attachment.created_on) %></em><br />
|
<em><%= attachment.author.display_name %>, <%= format_date(attachment.created_on) %></em><br />
|
||||||
<%= lwr(:label_download, attachment.downloads) %>
|
<%= lwr(:label_download, attachment.downloads) %>
|
||||||
</li>
|
</li>
|
||||||
@@ -28,10 +28,10 @@
|
|||||||
|
|
||||||
|
|
||||||
<% if authorize_for('documents', 'add_attachment') %>
|
<% if authorize_for('documents', 'add_attachment') %>
|
||||||
<% form_tag ({ :controller => 'documents', :action => 'add_attachment', :id => @document }, :multipart => true, :class => "tabular") do %>
|
<%= 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)%>
|
<p id="attachments_p"><label for="attachment_file"><%=l(:label_attachment)%>
|
||||||
<%= image_to_function "add.png", "addFileField();return false" %></label>
|
<%= link_to_function image_tag('add'), "addFileField()" %></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>
|
<%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= human_size(Attachment.max_size) %>)</em></p>
|
||||||
<%= submit_tag l(:button_add) %>
|
<%= submit_tag l(:button_add) %>
|
||||||
<% end %>
|
<%= end_form_tag %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
<h2><%=l(:label_enumerations)%></h2>
|
<h2><%=l(:label_enumerations)%></h2>
|
||||||
|
|
||||||
<% form_tag({:action => 'update', :id => @enumeration}, :class => "tabular") do %>
|
<%= start_form_tag({:action => 'update', :id => @enumeration}, :class => "tabular") %>
|
||||||
<%= render :partial => 'form' %>
|
<%= render :partial => 'form' %>
|
||||||
<%= submit_tag l(:button_save) %>
|
<%= submit_tag l(:button_save) %>
|
||||||
<% end %>
|
<%= end_form_tag %>
|
||||||
|
|
||||||
<% form_tag({:action => 'destroy', :id => @enumeration}) do %>
|
<%= start_form_tag :action => 'destroy', :id => @enumeration %>
|
||||||
<%= submit_tag l(:button_delete) %>
|
<%= submit_tag l(:button_delete) %>
|
||||||
<% end %>
|
<%= end_form_tag %>
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
<li><%= link_to value.name, :action => 'edit', :id => value %></li>
|
<li><%= link_to value.name, :action => 'edit', :id => value %></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
<p><%= link_to l(:label_enumeration_new), { :action => 'new', :opt => option }, :class => "icon icon-add" %></p>
|
<p><%= link_to l(:label_enumeration_new), { :action => 'new', :opt => option }, :class => "pic picAdd" %></p>
|
||||||
|
|
||||||
<% else %>
|
<% else %>
|
||||||
<h3><%= link_to l(name), :opt => option %></h3>
|
<h3><%= link_to l(name), :opt => option %></h3>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<h2><%= l(@enumeration.option_name) %>: <%=l(:label_enumeration_new)%></h2>
|
<h2><%= l(@enumeration.option_name) %>: <%=l(:label_enumeration_new)%></h2>
|
||||||
|
|
||||||
<% form_tag({:action => 'create'}, :class => "tabular") do %>
|
<%= start_form_tag({:action => 'create'}, :class => "tabular") %>
|
||||||
<%= render :partial => 'form' %>
|
<%= render :partial => 'form' %>
|
||||||
<%= submit_tag l(:button_create) %>
|
<%= submit_tag l(:button_create) %>
|
||||||
<% end %>
|
<%= end_form_tag %>
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
xml.instruct!
|
xml.instruct!
|
||||||
xml.rss "version" => "2.0", "xmlns:dc" => "http://purl.org/dc/elements/1.1/" do
|
xml.rss "version" => "2.0", "xmlns:dc" => "http://purl.org/dc/elements/1.1/" do
|
||||||
xml.channel do
|
xml.channel do
|
||||||
xml.title "#{Setting.app_title}: #{l(:label_news_latest)}"
|
xml.title "#{$RDM_HEADER_TITLE}: #{l(:label_news_latest)}"
|
||||||
xml.link url_for(:controller => 'welcome', :only_path => false)
|
xml.link url_for(:controller => '', :only_path => false)
|
||||||
xml.pubDate CGI.rfc1123_date(@news.first.created_on)
|
xml.pubDate CGI.rfc1123_date(@news.first.created_on)
|
||||||
xml.description l(:label_news_latest)
|
xml.description "#{$RDM_HEADER_TITLE}: #{l(:label_news_latest)}"
|
||||||
@news.each do |news|
|
@news.each do |news|
|
||||||
xml.item do
|
xml.item do
|
||||||
xml.title "#{news.project.name}: #{news.title}"
|
xml.title "#{news.project.name}: #{news.title}"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<h2><%=l(:label_issue_category)%></h2>
|
<h2><%=l(:label_issue_category)%></h2>
|
||||||
|
|
||||||
<% form_tag({:action => 'edit', :id => @category}, :class => "tabular") do %>
|
<%= start_form_tag({:action => 'edit', :id => @category}, :class => "tabular") %>
|
||||||
<%= render :partial => 'form' %>
|
<%= render :partial => 'form' %>
|
||||||
<%= submit_tag l(:button_save) %>
|
<%= submit_tag l(:button_save) %>
|
||||||
<% end %>
|
<%= end_form_tag %>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<h2><%=l(:label_issue_status)%></h2>
|
<h2><%=l(:label_issue_status)%></h2>
|
||||||
|
|
||||||
<% form_tag({:action => 'update', :id => @issue_status}, :class => "tabular") do %>
|
<%= start_form_tag({:action => 'update', :id => @issue_status}, :class => "tabular") %>
|
||||||
<%= render :partial => 'form' %>
|
<%= render :partial => 'form' %>
|
||||||
<%= submit_tag l(:button_save) %>
|
<%= submit_tag l(:button_save) %>
|
||||||
<% end %>
|
<%= end_form_tag %>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<div class="contextual">
|
<div class="contextual">
|
||||||
<%= link_to l(:label_issue_status_new), {:action => 'new'}, :class => 'icon icon-add' %>
|
<%= link_to l(:label_issue_status_new), {:action => 'new'}, :class => 'pic picAdd' %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2><%=l(:label_issue_status_plural)%></h2>
|
<h2><%=l(:label_issue_status_plural)%></h2>
|
||||||
@@ -9,21 +9,14 @@
|
|||||||
<th><%=l(:field_status)%></th>
|
<th><%=l(:field_status)%></th>
|
||||||
<th><%=l(:field_is_default)%></th>
|
<th><%=l(:field_is_default)%></th>
|
||||||
<th><%=l(:field_is_closed)%></th>
|
<th><%=l(:field_is_closed)%></th>
|
||||||
<th><%=l(:button_sort)%></th>
|
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr></thead>
|
</tr></thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<% for status in @issue_statuses %>
|
<% for status in @issue_statuses %>
|
||||||
<tr class="<%= cycle("odd", "even") %>">
|
<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><div class="square" style="background:#<%= status.html_color %>;"></div> <%= link_to status.name, :action => 'edit', :id => status %></td>
|
||||||
<td align="center"><%= image_tag 'true.png' if status.is_default? %></td>
|
<td align="center"><%= image_tag 'true' if status.is_default? %></td>
|
||||||
<td align="center"><%= image_tag 'true.png' if status.is_closed? %></td>
|
<td align="center"><%= image_tag 'true' 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">
|
<td align="center">
|
||||||
<%= button_to l(:button_delete), { :action => 'destroy', :id => status }, :confirm => l(:text_are_you_sure), :class => "button-small" %>
|
<%= button_to l(:button_delete), { :action => 'destroy', :id => status }, :confirm => l(:text_are_you_sure), :class => "button-small" %>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<h2><%=l(:label_issue_status_new)%></h2>
|
<h2><%=l(:label_issue_status_new)%></h2>
|
||||||
|
|
||||||
<% form_tag({:action => 'create'}, :class => "tabular") do %>
|
<%= start_form_tag({:action => 'create'}, :class => "tabular") %>
|
||||||
<%= render :partial => 'form' %>
|
<%= render :partial => 'form' %>
|
||||||
<%= submit_tag l(:button_create) %>
|
<%= submit_tag l(:button_create) %>
|
||||||
<% end %>
|
<%= end_form_tag %>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<% if authorize_for('projects', 'add_issue') %>
|
<% if authorize_for('projects', 'add_issue') %>
|
||||||
<% form_tag({ :controller => 'projects', :action => 'add_issue', :id => @project }, :method => 'get') do %>
|
<%= start_form_tag({ :controller => 'projects', :action => 'add_issue', :id => @project }, :method => 'get') %>
|
||||||
<%= 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();}" %>
|
<%= 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 %>
|
<%= end_form_tag %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -92,7 +92,7 @@
|
|||||||
for attachment in issue.attachments
|
for attachment in issue.attachments
|
||||||
pdf.SetFont('Arial','',8)
|
pdf.SetFont('Arial','',8)
|
||||||
pdf.Cell(80,5, attachment.filename)
|
pdf.Cell(80,5, attachment.filename)
|
||||||
pdf.Cell(20,5, number_to_human_size(attachment.filesize),0,0,"R")
|
pdf.Cell(20,5, human_size(attachment.filesize),0,0,"R")
|
||||||
pdf.Cell(20,5, format_date(attachment.created_on),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.Cell(70,5, attachment.author.name,0,0,"R")
|
||||||
pdf.Ln
|
pdf.Ln
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
<%= 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>
|
<h2><%=l(:label_issue)%> #<%= @issue.id %>: <%=h @issue.subject %></h2>
|
||||||
|
|
||||||
<%= error_messages_for 'issue' %>
|
<%= error_messages_for 'issue' %>
|
||||||
<% form_tag({:action => 'change_status', :id => @issue}, :class => "tabular") do %>
|
<%= start_form_tag({:action => 'change_status', :id => @issue}, :class => "tabular") %>
|
||||||
|
|
||||||
<%= hidden_field_tag 'confirm', 1 %>
|
<%= hidden_field_tag 'confirm', 1 %>
|
||||||
<%= hidden_field_tag 'new_status_id', @new_status.id %>
|
<%= hidden_field_tag 'new_status_id', @new_status.id %>
|
||||||
@@ -34,4 +34,4 @@
|
|||||||
|
|
||||||
<%= hidden_field 'issue', 'lock_version' %>
|
<%= hidden_field 'issue', 'lock_version' %>
|
||||||
<%= submit_tag l(:button_save) %>
|
<%= submit_tag l(:button_save) %>
|
||||||
<% end %>
|
<%= end_form_tag %>
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
<%= submit_tag l(:button_save) %>
|
<%= submit_tag l(:button_save) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% if Setting.text_formatting == 'textile' %>
|
<% unless $RDM_TEXTILE_DISABLED %>
|
||||||
<%= javascript_include_tag 'jstoolbar' %>
|
<%= javascript_include_tag 'jstoolbar' %>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
//<![CDATA[
|
//<![CDATA[
|
||||||
@@ -46,11 +46,4 @@ if (document.getElementById) {
|
|||||||
}
|
}
|
||||||
//]]>
|
//]]>
|
||||||
</script>
|
</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 %>
|
<% end %>
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
<% pdf=IfpdfHelper::IFPDF.new
|
<% pdf=IfpdfHelper::IFPDF.new
|
||||||
pdf.SetTitle("#{@project.name} - ##{@issue.tracker.name} #{@issue.id}")
|
|
||||||
pdf.AliasNbPages
|
pdf.AliasNbPages
|
||||||
pdf.footer_date = format_date(Date.today)
|
pdf.footer_date = format_date(Date.today)
|
||||||
pdf.AddPage
|
pdf.AddPage
|
||||||
|
|||||||
+17
-21
@@ -1,5 +1,5 @@
|
|||||||
<div class="contextual">
|
<div class="contextual">
|
||||||
<%= l(:label_export_to) %><%= link_to 'PDF', {:action => 'export_pdf', :id => @issue}, :class => 'icon icon-pdf' %>
|
<%= l(:label_export_to) %><%= link_to 'PDF', {:action => 'export_pdf', :id => @issue}, :class => 'pic picPdf' %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2><%= @issue.tracker.name %> #<%= @issue.id %> - <%=h @issue.subject %></h2>
|
<h2><%= @issue.tracker.name %> #<%= @issue.id %> - <%=h @issue.subject %></h2>
|
||||||
@@ -7,8 +7,8 @@
|
|||||||
<div class="box">
|
<div class="box">
|
||||||
<table width="100%">
|
<table width="100%">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width:15%"><b><%=l(:field_status)%> :</b></td><td style="width:35%"><%= @issue.status.name %></td>
|
<td width="15%"><b><%=l(:field_status)%> :</b></td><td width="35%"><%= @issue.status.name %></td>
|
||||||
<td style="width:15%"><b><%=l(:field_priority)%> :</b></td><td style="width:35%"><%= @issue.priority.name %></td>
|
<td width="15%"><b><%=l(:field_priority)%> :</b></td><td width="35%"><%= @issue.priority.name %></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><b><%=l(:field_assigned_to)%> :</b></td><td><%= @issue.assigned_to ? @issue.assigned_to.name : "-" %></td>
|
<td><b><%=l(:field_assigned_to)%> :</b></td><td><%= @issue.assigned_to ? @issue.assigned_to.name : "-" %></td>
|
||||||
@@ -26,10 +26,6 @@
|
|||||||
<td><b><%=l(:field_updated_on)%> :</b></td><td><%= format_date(@issue.updated_on) %></td>
|
<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>
|
<td><b><%=l(:field_done_ratio)%> :</b></td><td><%= @issue.done_ratio %> %</td>
|
||||||
</tr>
|
</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>
|
<tr>
|
||||||
<% n = 0
|
<% n = 0
|
||||||
for custom_value in @custom_values %>
|
for custom_value in @custom_values %>
|
||||||
@@ -50,19 +46,19 @@ end %>
|
|||||||
<br />
|
<br />
|
||||||
|
|
||||||
<div class="contextual">
|
<div class="contextual">
|
||||||
<%= link_to_if_authorized l(:button_edit), {:controller => 'issues', :action => 'edit', :id => @issue}, :class => 'icon icon-edit' %>
|
<%= 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 => 'icon icon-move' %>
|
<%= 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), :method => :post, :class => 'icon icon-del' %>
|
<%= link_to_if_authorized l(:button_delete), {:controller => 'issues', :action => 'destroy', :id => @issue}, :confirm => l(:text_are_you_sure), :post => true, :class => 'pic picDelete' %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% if authorize_for('issues', 'change_status') and @status_options and !@status_options.empty? %>
|
<% if authorize_for('issues', 'change_status') and @status_options and !@status_options.empty? %>
|
||||||
<% form_tag ({:controller => 'issues', :action => 'change_status', :id => @issue}) do %>
|
<%= start_form_tag ({:controller => 'issues', :action => 'change_status', :id => @issue}) %>
|
||||||
<%=l(:label_change_status)%> :
|
<%=l(:label_change_status)%> :
|
||||||
<select name="new_status_id">
|
<select name="new_status_id">
|
||||||
<%= options_from_collection_for_select @status_options, "id", "name" %>
|
<%= options_from_collection_for_select @status_options, "id", "name" %>
|
||||||
</select>
|
</select>
|
||||||
<%= submit_tag l(:button_change) %>
|
<%= submit_tag l(:button_change) %>
|
||||||
<% end %>
|
<%= end_form_tag %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -81,31 +77,31 @@ end %>
|
|||||||
<table width="100%">
|
<table width="100%">
|
||||||
<% for attachment in @issue.attachments %>
|
<% for attachment in @issue.attachments %>
|
||||||
<tr>
|
<tr>
|
||||||
<td><%= link_to attachment.filename, { :action => 'download', :id => @issue, :attachment_id => attachment }, :class => 'icon icon-attachment' %> (<%= number_to_human_size(attachment.filesize) %>)</td>
|
<td><%= link_to attachment.filename, { :action => 'download', :id => @issue, :attachment_id => attachment }, :class => 'icon attachment' %> (<%= human_size(attachment.filesize) %>)</td>
|
||||||
<td><%= format_date(attachment.created_on) %></td>
|
<td><%= format_date(attachment.created_on) %></td>
|
||||||
<td><%= attachment.author.display_name %></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), :method => :post, :class => 'icon icon-del' %></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), :post => true, :class => 'pic picDelete' %></div></td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
</table>
|
</table>
|
||||||
<br />
|
<br />
|
||||||
<% if authorize_for('issues', 'add_attachment') %>
|
<% if authorize_for('issues', 'add_attachment') %>
|
||||||
<% form_tag ({ :controller => 'issues', :action => 'add_attachment', :id => @issue }, :multipart => true, :class => "tabular") do %>
|
<%= start_form_tag ({ :controller => 'issues', :action => 'add_attachment', :id => @issue }, :multipart => true, :class => "tabular") %>
|
||||||
<p id="attachments_p"><label><%=l(:label_attachment_new)%>
|
<p id="attachments_p"><label><%=l(:label_attachment_new)%>
|
||||||
<%= image_to_function "add.png", "addFileField();return false" %></label>
|
<%= link_to_function image_tag('add'), "addFileField()" %></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>
|
<%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= human_size(Attachment.max_size) %>)</em></p>
|
||||||
<%= submit_tag l(:button_add) %>
|
<%= submit_tag l(:button_add) %>
|
||||||
<% end %>
|
<%= end_form_tag %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% if authorize_for('issues', 'add_note') %>
|
<% if authorize_for('issues', 'add_note') %>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<h3><%= l(:label_add_note) %></h3>
|
<h3><%= l(:label_add_note) %></h3>
|
||||||
<% form_tag ({:controller => 'issues', :action => 'add_note', :id => @issue}, :class => "tabular" ) do %>
|
<%= start_form_tag ({:controller => 'issues', :action => 'add_note', :id => @issue}, :class => "tabular" ) %>
|
||||||
<p><label for="notes"><%=l(:field_notes)%></label>
|
<p><label for="notes"><%=l(:field_notes)%></label>
|
||||||
<%= text_area_tag 'notes', '', :cols => 60, :rows => 10 %></p>
|
<%= text_area_tag 'notes', '', :cols => 60, :rows => 10 %></p>
|
||||||
<%= submit_tag l(:button_add) %>
|
<%= submit_tag l(:button_add) %>
|
||||||
<% end %>
|
<%= end_form_tag %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
<!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">
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||||
<head>
|
<head>
|
||||||
<title><%= Setting.app_title + (@html_title ? ": #{@html_title}" : "") %></title>
|
<title><%= $RDM_HEADER_TITLE + (@html_title ? ": #{@html_title}" : "") %></title>
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||||
<meta name="description" content="redMine" />
|
<meta name="description" content="redMine" />
|
||||||
<meta name="keywords" content="issue,bug,tracker" />
|
<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 "application" %>
|
||||||
<%= stylesheet_link_tag "print", :media => "print" %>
|
<%= stylesheet_link_tag "print", :media => "print" %>
|
||||||
<%= javascript_include_tag :defaults %>
|
<%= javascript_include_tag :defaults %>
|
||||||
<%= javascript_include_tag 'menu' %>
|
<%= 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' %>
|
<%= stylesheet_link_tag 'jstoolbar' %>
|
||||||
<!-- page specific tags --><%= yield :header_tags %>
|
<!-- page specific tags -->
|
||||||
|
<%= yield :header_tags %>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
@@ -23,8 +23,8 @@
|
|||||||
|
|
||||||
<div id="header">
|
<div id="header">
|
||||||
<div style="float: left;">
|
<div style="float: left;">
|
||||||
<h1><%= Setting.app_title %></h1>
|
<h1><%= $RDM_HEADER_TITLE %></h1>
|
||||||
<h2><%= Setting.app_subtitle %></h2>
|
<h2><%= $RDM_HEADER_SUBTITLE %></h2>
|
||||||
</div>
|
</div>
|
||||||
<div style="float: right; padding-right: 1em; padding-top: 0.2em;">
|
<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 %>
|
<% if loggedin? %><small><%=l(:label_logged_as)%> <b><%= @logged_in_user.login %></b></small><% end %>
|
||||||
@@ -33,28 +33,28 @@
|
|||||||
|
|
||||||
<div id="navigation">
|
<div id="navigation">
|
||||||
<ul>
|
<ul>
|
||||||
<li><%= link_to l(:label_home), { :controller => 'welcome' }, :class => "icon icon-home" %></li>
|
<li class="selected"><%= link_to l(:label_home), { :controller => '' }, :class => "picHome" %></li>
|
||||||
<li><%= link_to l(:label_my_page), { :controller => 'my', :action => 'page'}, :class => "icon icon-mypage" %></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 => "icon icon-projects" %></li>
|
<li><%= link_to l(:label_project_plural), { :controller => 'projects' }, :class => "picProject" %></li>
|
||||||
|
|
||||||
<% unless @project.nil? || @project.id.nil? %>
|
<% unless @project.nil? || @project.id.nil? %>
|
||||||
<li class="submenu"><%= link_to @project.name, { :controller => 'projects', :action => 'show', :id => @project }, :class => "icon icon-projects", :onmouseover => "buttonMouseover(event, 'menuProject');" %></li>
|
<li class="submenu"><%= link_to @project.name, { :controller => 'projects', :action => 'show', :id => @project }, :class => "picProject", :onmouseover => "buttonMouseover(event, 'menuProject');" %></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% if loggedin? %>
|
<% if loggedin? %>
|
||||||
<li><%= link_to l(:label_my_account), { :controller => 'my', :action => 'account' }, :class => "icon icon-user" %></li>
|
<li><%= link_to l(:label_my_account), { :controller => 'my', :action => 'account' }, :class => "picUser" %></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% if admin_loggedin? %>
|
<% if admin_loggedin? %>
|
||||||
<li class="submenu"><%= link_to l(:label_administration), { :controller => 'admin' }, :class => "icon icon-admin", :onmouseover => "buttonMouseover(event, 'menuAdmin');" %></li>
|
<li class="submenu"><%= link_to l(:label_administration), { :controller => 'admin' }, :class => "picAdmin", :onmouseover => "buttonMouseover(event, 'menuAdmin');" %></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<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>
|
<li class="right"><%= link_to l(:label_help), { :controller => 'help', :ctrl => params[:controller], :page => params[:action] }, :target => "new", :class => "picHelp" %></li>
|
||||||
|
|
||||||
<% if loggedin? %>
|
<% if loggedin? %>
|
||||||
<li class="right"><%= link_to l(:label_logout), { :controller => 'account', :action => 'logout' }, :class => "icon icon-user" %></li>
|
<li class="right"><%= link_to l(:label_logout), { :controller => 'account', :action => 'logout' }, :class => "picUser" %></li>
|
||||||
<% else %>
|
<% else %>
|
||||||
<li class="right"><%= link_to l(:label_login), { :controller => 'account', :action => 'login' }, :class => "icon icon-user" %></li>
|
<li class="right"><%= link_to l(:label_login), { :controller => 'account', :action => 'login' }, :class => "picUser" %></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@@ -69,7 +69,6 @@
|
|||||||
<a class="menuItem" href="/enumerations"><%=l(:label_enumerations)%></a>
|
<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="/admin/mail_options"><%=l(:field_mail_notification)%></a>
|
||||||
<a class="menuItem" href="/auth_sources"><%=l(:label_authentication)%></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>
|
<a class="menuItem" href="/admin/info"><%=l(:label_information_plural)%></a>
|
||||||
</div>
|
</div>
|
||||||
<div id="menuTrackers" class="menu">
|
<div id="menuTrackers" class="menu">
|
||||||
@@ -84,12 +83,11 @@
|
|||||||
<div id="menuProject" class="menu" onmouseover="menuMouseover(event)">
|
<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_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_gantt), {:controller => 'projects', :action => 'gantt', :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_issue_plural), {:controller => 'projects', :action => 'list_issues', :id => @project }, :class => "menuItem" %>
|
||||||
<%= link_to l(:label_report_plural), {:controller => 'reports', :action => 'issue_report', :id => @project }, :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_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_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_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_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_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" %>
|
<%= link_to l(:label_attachment_plural), {:controller => 'projects', :action => 'list_files', :id => @project }, :class => "menuItem" %>
|
||||||
@@ -107,12 +105,11 @@
|
|||||||
<li><%= link_to l(:label_overview), :controller => 'projects', :action => 'show', :id => @project %></li>
|
<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_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_gantt), :controller => 'projects', :action => 'gantt', :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_issue_plural), :controller => 'projects', :action => 'list_issues', :id => @project %></li>
|
||||||
<li><%= link_to l(:label_report_plural), :controller => 'reports', :action => 'issue_report', :id => @project %></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_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_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_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_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_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>
|
<li><%= link_to l(:label_attachment_plural), :controller => 'projects', :action => 'list_files', :id => @project %></li>
|
||||||
@@ -137,7 +134,10 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
<p><a href="http://redmine.rubyforge.org/">redMine</a> <small><%= Redmine::VERSION %> © 2006-2007 Jean-Philippe Lang</small></p>
|
<p>
|
||||||
|
<%= auto_link $RDM_FOOTER_SIG %> |
|
||||||
|
<a href="http://redmine.rubyforge.org/" target="_new"><%= RDM_APP_NAME %></a> <%= RDM_APP_VERSION %>
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -4,4 +4,4 @@
|
|||||||
|
|
||||||
<%= issue.description %>
|
<%= issue.description %>
|
||||||
|
|
||||||
http://<%= Setting.host_name %>/issues/show/<%= issue.id %>
|
http://<%= $RDM_HOST_NAME %>/issues/show/<%= issue.id %>
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
<%= @added_to %>
|
|
||||||
<%= @attachments.size %> files(s) added.
|
|
||||||
<% @attachments.each do |attachment | %>
|
|
||||||
- <%= attachment.filename %><% end %>
|
|
||||||
|
|
||||||
<%= @url %>
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
<%= @added_to %>
|
|
||||||
<%= @attachments.size %> files(s) added.
|
|
||||||
<% @attachments.each do |attachment | %>
|
|
||||||
- <%= attachment.filename %><% end %>
|
|
||||||
|
|
||||||
<%= @url %>
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
<%= @added_to %>
|
|
||||||
<%= @attachments.size %> files(s) added.
|
|
||||||
<% @attachments.each do |attachment | %>
|
|
||||||
- <%= attachment.filename %><% end %>
|
|
||||||
|
|
||||||
<%= @url %>
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
<%= @added_to %>
|
|
||||||
<%= @attachments.size %> fichier(s) ajouté(s).
|
|
||||||
<% @attachments.each do |attachment | %>
|
|
||||||
- <%= attachment.filename %><% end %>
|
|
||||||
|
|
||||||
<%= @url %>
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
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 %>
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
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 %>
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
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 %>
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
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.
|
La demande #<%= @issue.id %> a été mise à jour.
|
||||||
<%= @journal.user.name %>
|
<%= @journal.user.name %> - <%= format_date(@journal.created_on) %>
|
||||||
<% for detail in @journal.details %>
|
<% for detail in @journal.details %>
|
||||||
<%= show_detail(detail, true) %>
|
<%= show_detail(detail, true) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= @journal.notes if @journal.notes? %>
|
<%= journal.notes if journal.notes? %>
|
||||||
----------------------------------------
|
----------------------------------------
|
||||||
<%= render :file => "_issue", :use_full_path => true, :locals => { :issue => @issue } %>
|
<%= render :file => "_issue", :use_full_path => true, :locals => { :issue => @issue } %>
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
To change your password, use the following link:
|
To change your password, use the following link:
|
||||||
|
|
||||||
http://<%= Setting.host_name %>/account/lost_password?token=<%= @token.value %>
|
http://<%= $RDM_HOST_NAME %>/account/lost_password?token=<%= @token.value %>
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
To change your password, use the following link:
|
To change your password, use the following link:
|
||||||
|
|
||||||
http://<%= Setting.host_name %>/account/lost_password?token=<%= @token.value %>
|
http://<%= $RDM_HOST_NAME %>/account/lost_password?token=<%= @token.value %>
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
To change your password, use the following link:
|
To change your password, use the following link:
|
||||||
|
|
||||||
http://<%= Setting.host_name %>/account/lost_password?token=<%= @token.value %>
|
http://<%= $RDM_HOST_NAME %>/account/lost_password?token=<%= @token.value %>
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
Pour changer votre mot de passe, utilisez le lien suivant:
|
Pour changer votre mot de passe, utilisez le lien suivant:
|
||||||
|
|
||||||
http://<%= Setting.host_name %>/account/lost_password?token=<%= @token.value %>
|
http://<%= $RDM_HOST_NAME %>/account/lost_password?token=<%= @token.value %>
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
To activate your redMine account, use the following link:
|
To activate your redMine account, use the following link:
|
||||||
|
|
||||||
http://<%= Setting.host_name %>/account/register?token=<%= @token.value %>
|
http://<%= $RDM_HOST_NAME %>/account/register?token=<%= @token.value %>
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
To activate your redMine account, use the following link:
|
To activate your redMine account, use the following link:
|
||||||
|
|
||||||
http://<%= Setting.host_name %>/account/register?token=<%= @token.value %>
|
http://<%= $RDM_HOST_NAME %>/account/register?token=<%= @token.value %>
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
To activate your redMine account, use the following link:
|
To activate your redMine account, use the following link:
|
||||||
|
|
||||||
http://<%= Setting.host_name %>/account/register?token=<%= @token.value %>
|
http://<%= $RDM_HOST_NAME %>/account/register?token=<%= @token.value %>
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
Pour activer votre compte sur redMine, utilisez le lien suivant:
|
Pour activer votre compte sur redMine, utilisez le lien suivant:
|
||||||
|
|
||||||
http://<%= Setting.host_name %>/account/register?token=<%= @token.value %>
|
http://<%= $RDM_HOST_NAME %>/account/register?token=<%= @token.value %>
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
<h2><%=l(:label_my_account)%></h2>
|
<h2><%=l(:label_my_account)%></h2>
|
||||||
|
|
||||||
<p><%=l(:field_login)%>: <strong><%= @user.login %></strong><br />
|
<p><%=l(:field_login)%>: <strong><%= @user.login %></strong><br />
|
||||||
<%=l(:field_created_on)%>: <%= format_time(@user.created_on) %></p>
|
<%=l(:field_created_on)%>: <%= format_time(@user.created_on) %>,
|
||||||
|
<%=l(:field_updated_on)%>: <%= format_time(@user.updated_on) %></p>
|
||||||
|
|
||||||
<%= error_messages_for 'user' %>
|
<%= error_messages_for 'user' %>
|
||||||
|
|
||||||
@@ -29,7 +30,7 @@
|
|||||||
<div class="box">
|
<div class="box">
|
||||||
<h3><%=l(:field_password)%></h3>
|
<h3><%=l(:field_password)%></h3>
|
||||||
|
|
||||||
<% form_tag({:action => 'change_password'}, :class => "tabular") do %>
|
<%= start_form_tag({:action => 'change_password'}, :class => "tabular") %>
|
||||||
|
|
||||||
<p><label for="password"><%=l(:field_password)%> <span class="required">*</span></label>
|
<p><label for="password"><%=l(:field_password)%> <span class="required">*</span></label>
|
||||||
<%= password_field_tag 'password', nil, :size => 25 %></p>
|
<%= password_field_tag 'password', nil, :size => 25 %></p>
|
||||||
@@ -41,6 +42,6 @@
|
|||||||
<%= password_field_tag 'new_password_confirmation', nil, :size => 25 %></p>
|
<%= password_field_tag 'new_password_confirmation', nil, :size => 25 %></p>
|
||||||
|
|
||||||
<center><%= submit_tag l(:button_save) %></center>
|
<center><%= submit_tag l(:button_save) %></center>
|
||||||
<% end %>
|
<%= end_form_tag %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% 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 }
|
@issues.each { |i| day_issues << i if i.start_date == day or i.due_date == day }
|
||||||
day_issues.each do |i| %>
|
day_issues.each do |i| %>
|
||||||
<%= if day == i.start_date and day == i.due_date
|
<%= if day == i.start_date and day == i.due_date
|
||||||
image_tag('arrow_bw.png')
|
image_tag('arrow_bw')
|
||||||
elsif day == i.start_date
|
elsif day == i.start_date
|
||||||
image_tag('arrow_from.png')
|
image_tag('arrow_from')
|
||||||
elsif day == i.due_date
|
elsif day == i.due_date
|
||||||
image_tag('arrow_to.png')
|
image_tag('arrow_to')
|
||||||
end %>
|
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 />
|
<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 %>
|
<% end %>
|
||||||
|
|||||||
@@ -5,8 +5,7 @@
|
|||||||
<h2><%=l(:label_my_page)%></h2>
|
<h2><%=l(:label_my_page)%></h2>
|
||||||
|
|
||||||
<div id="list-top">
|
<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">
|
<div class="mypage-box">
|
||||||
<%= render :partial => "my/blocks/#{b}", :locals => { :user => @user } %>
|
<%= render :partial => "my/blocks/#{b}", :locals => { :user => @user } %>
|
||||||
</div>
|
</div>
|
||||||
@@ -14,8 +13,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="list-left" class="splitcontentleft">
|
<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">
|
<div class="mypage-box">
|
||||||
<%= render :partial => "my/blocks/#{b}", :locals => { :user => @user } %>
|
<%= render :partial => "my/blocks/#{b}", :locals => { :user => @user } %>
|
||||||
</div>
|
</div>
|
||||||
@@ -23,8 +21,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="list-right" class="splitcontentright">
|
<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">
|
<div class="mypage-box">
|
||||||
<%= render :partial => "my/blocks/#{b}", :locals => { :user => @user } %>
|
<%= render :partial => "my/blocks/#{b}", :locals => { :user => @user } %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<script language="JavaScript">
|
<script language="JavaScript">
|
||||||
//<![CDATA[
|
|
||||||
function recreateSortables() {
|
function recreateSortables() {
|
||||||
Sortable.destroy('list-top');
|
Sortable.destroy('list-top');
|
||||||
Sortable.destroy('list-left');
|
Sortable.destroy('list-left');
|
||||||
@@ -31,47 +31,43 @@ function removeBlock(block) {
|
|||||||
$(block).parentNode.removeChild($(block));
|
$(block).parentNode.removeChild($(block));
|
||||||
updateSelect();
|
updateSelect();
|
||||||
}
|
}
|
||||||
//]]>
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="contextual">
|
<div class="contextual">
|
||||||
<span id="indicator" style="display:none"><%= image_tag "loading.gif", :align => "absmiddle" %></span>
|
<span id="indicator" style="display:none"><%= image_tag "loading.gif", :align => "absmiddle" %></span>
|
||||||
<% form_tag({:action => "add_block"}, :id => "block-form") do %>
|
<%= start_form_tag({:action => "add_block"}, :id => "block-form") %>
|
||||||
<%= select_tag 'block', "<option></option>" + options_for_select(@block_options), :id => "block-select" %>
|
<%= select_tag 'block', "<option></option>" + options_for_select(@block_options), :id => "block-select" %>
|
||||||
<%= link_to_remote l(:button_add),
|
<%= link_to_remote l(:button_add),
|
||||||
{:url => { :action => "add_block" },
|
:url => { :action => "add_block" },
|
||||||
:with => "Form.serialize('block-form')",
|
:with => "Form.serialize('block-form')",
|
||||||
:update => "list-top",
|
:update => "list-top",
|
||||||
:position => :top,
|
:position => :top,
|
||||||
:complete => "afterAddBlock();",
|
:complete => "afterAddBlock();",
|
||||||
:loading => "Element.show('indicator')",
|
:loading => "Element.show('indicator')",
|
||||||
:loaded => "Element.hide('indicator')"
|
:loaded => "Element.hide('indicator')"
|
||||||
}, :class => 'icon icon-add'
|
|
||||||
%>
|
%>
|
||||||
<% end %>
|
<%= end_form_tag %> |
|
||||||
<%= link_to l(:button_save), {:action => 'page_layout_save'}, :class => 'icon icon-save' %>
|
<%= link_to l(:button_save), :action => 'page_layout_save' %> |
|
||||||
<%= link_to l(:button_cancel), {:action => 'page'}, :class => 'icon icon-cancel' %>
|
<%= link_to l(:button_cancel), :action => 'page' %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2><%=l(:label_my_page)%></h2>
|
<h2><%=l(:label_my_page)%></h2>
|
||||||
|
|
||||||
<div id="list-top" class="block-receiver">
|
<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} %>
|
<%= render :partial => 'block', :locals => {:user => @user, :block_name => b} %>
|
||||||
<% end if @blocks['top'] %>
|
<% end if @blocks['top'] %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="list-left" class="splitcontentleft block-receiver">
|
<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} %>
|
<%= render :partial => 'block', :locals => {:user => @user, :block_name => b} %>
|
||||||
<% end if @blocks['left'] %>
|
<% end if @blocks['left'] %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="list-right" class="splitcontentright block-receiver">
|
<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} %>
|
<%= render :partial => 'block', :locals => {:user => @user, :block_name => b} %>
|
||||||
<% end if @blocks['right'] %>
|
<% end if @blocks['right'] %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<p><%= f.text_area :description, :required => true, :cols => 60, :rows => 15 %></p>
|
<p><%= f.text_area :description, :required => true, :cols => 60, :rows => 15 %></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% if Setting.text_formatting == 'textile' %>
|
<% unless $RDM_TEXTILE_DISABLED %>
|
||||||
<%= javascript_include_tag 'jstoolbar' %>
|
<%= javascript_include_tag 'jstoolbar' %>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
//<![CDATA[
|
//<![CDATA[
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<div class="contextual">
|
<div class="contextual">
|
||||||
<%= link_to_if_authorized l(:button_edit), {:controller => 'news', :action => 'edit', :id => @news}, :class => 'icon icon-edit' %>
|
<%= 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), :method => :post, :class => 'icon icon-del' %>
|
<%= link_to_if_authorized l(:button_delete), {:controller => 'news', :action => 'destroy', :id => @news}, :confirm => l(:text_are_you_sure), :post => true, :class => 'pic picDelete' %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2><%=h @news.title %></h2>
|
<h2><%=h @news.title %></h2>
|
||||||
@@ -12,22 +12,23 @@
|
|||||||
<br />
|
<br />
|
||||||
|
|
||||||
<div id="comments" style="margin-bottom:16px;">
|
<div id="comments" style="margin-bottom:16px;">
|
||||||
<h3 class="icon22 icon22-comment"><%= l(:label_comment_plural) %></h3>
|
<h3 class="icon comment"><%= l(:label_comment_plural) %></h3>
|
||||||
<% @news.comments.each do |comment| %>
|
<% @news.comments.each do |comment| %>
|
||||||
<% next if comment.new_record? %>
|
<% next if comment.new_record? %>
|
||||||
<h4><%= format_time(comment.created_on) %> - <%= comment.author.name %></h4>
|
<h4><%= format_time(comment.created_on) %> - <%= comment.author.name %></h4>
|
||||||
<div class="contextual">
|
<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), :method => :post, :class => 'icon icon-del' %>
|
<%= 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' %>
|
||||||
</div>
|
</div>
|
||||||
<%= simple_format(auto_link(h comment.comment))%>
|
<%= simple_format(auto_link(h comment.comment))%>
|
||||||
<% end if @news.comments_count > 0 %>
|
<% end if @news.comments_count > 0 %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% if authorize_for 'news', 'add_comment' %>
|
<% if authorize_for 'news', 'add_comment' %>
|
||||||
<% form_tag({:action => 'add_comment', :id => @news}) do %>
|
<h3><%= l(:label_comment_add) %></h3>
|
||||||
|
<%= start_form_tag :action => 'add_comment', :id => @news %>
|
||||||
<%= error_messages_for 'comment' %>
|
<%= error_messages_for 'comment' %>
|
||||||
<p><label for="comment_comment"><%= l(:label_comment_add) %></label><br />
|
<p><label for="comment_comment"><%= l(:field_comment) %></label><br />
|
||||||
<%= text_area 'comment', 'comment', :cols => 60, :rows => 6 %></p>
|
<%= text_area 'comment', 'comment', :cols => 60, :rows => 6 %></p>
|
||||||
<%= submit_tag l(:button_add) %>
|
<%= submit_tag l(:button_add) %>
|
||||||
<% end %>
|
<%= end_form_tag %>
|
||||||
<% end %>
|
<% end %>
|
||||||
@@ -35,10 +35,3 @@
|
|||||||
</div>
|
</div>
|
||||||
<%= javascript_tag "Element.hide('repository');" if @project.repository.nil? %>
|
<%= javascript_tag "Element.hide('repository');" if @project.repository.nil? %>
|
||||||
</div>
|
</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,19 +2,16 @@
|
|||||||
|
|
||||||
<div>
|
<div>
|
||||||
<div class="rightbox">
|
<div class="rightbox">
|
||||||
<% form_tag do %>
|
<%= start_form_tag %>
|
||||||
<p><%= select_month(@month, :prefix => "month", :discard_type => true) %>
|
<p><%= select_month(@month, :prefix => "month", :discard_type => true) %>
|
||||||
<%= select_year(@year, :prefix => "year", :discard_type => true) %></p>
|
<%= select_year(@year, :prefix => "year", :discard_type => true) %></p>
|
||||||
<p>
|
<%= check_box_tag 'show_issues', 1, @show_issues %><%= hidden_field_tag 'show_issues', 0 %> <%=l(:label_issue_plural)%><br />
|
||||||
<%= 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 %> <%=l(:label_news_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 %> <%=l(:label_attachment_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 %> <%=l(:label_document_plural)%><br />
|
||||||
<%= check_box_tag 'show_documents', 1, @show_documents %><%= hidden_field_tag 'show_documents', 0, :id => nil %> <%=l(:label_document_plural)%>
|
<p><center><%= submit_tag l(:button_apply), :class => 'button-small' %></center></p>
|
||||||
</p>
|
<%= end_form_tag %>
|
||||||
<p class="textcenter"><%= submit_tag l(:button_apply), :class => 'button-small' %></p>
|
</div>
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<% @events_by_day.keys.sort {|x,y| y <=> x }.each do |day| %>
|
<% @events_by_day.keys.sort {|x,y| y <=> x }.each do |day| %>
|
||||||
<h3><%= day_name(day.cwday) %> <%= day.day %></h3>
|
<h3><%= day_name(day.cwday) %> <%= day.day %></h3>
|
||||||
<ul>
|
<ul>
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
<h2><%=l(:label_document_new)%></h2>
|
<h2><%=l(:label_document_new)%></h2>
|
||||||
|
|
||||||
<% form_tag( { :action => 'add_document', :id => @project }, :class => "tabular", :multipart => true) do %>
|
<%= start_form_tag( { :action => 'add_document', :id => @project }, :class => "tabular", :multipart => true) %>
|
||||||
<%= render :partial => 'documents/form' %>
|
<%= render :partial => 'documents/form' %>
|
||||||
|
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<p id="attachments_p"><label for="attachment_file"><%=l(:label_attachment)%>
|
<p id="attachments_p"><label for="attachment_file"><%=l(:label_attachment)%>
|
||||||
<%= image_to_function "add.png", "addFileField();return false" %></label>
|
<%= link_to_function image_tag('add'), "addFileField()" %></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>
|
<%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= human_size(Attachment.max_size) %>)</em></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<%= submit_tag l(:button_create) %>
|
<%= submit_tag l(:button_create) %>
|
||||||
<% end %>
|
<%= end_form_tag %>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user