##// END OF EJS Templates
notice messages translation...
Jean-Philippe Lang -
r15:18ee1fef4172
parent child
Show More
@@ -72,14 +72,19 class AccountController < ApplicationController
72 # Change logged in user's password
72 # Change logged in user's password
73 def change_password
73 def change_password
74 @user = self.logged_in_user
74 @user = self.logged_in_user
75 flash.now[:notice] = l(:notice_can_t_change_password) and render :action => 'my_account' and return if @user.auth_source_id
75 flash[:notice] = l(:notice_can_t_change_password) and redirect_to :action => 'my_account' and return if @user.auth_source_id
76 if @user.check_password?(@params[:password])
76 if @user.check_password?(@params[:password])
77 @user.password, @user.password_confirmation = params[:new_password], params[:new_password_confirmation]
77 @user.password, @user.password_confirmation = params[:new_password], params[:new_password_confirmation]
78 flash.now[:notice] = l(:notice_account_password_updated) if @user.save
78 if @user.save
79 flash[:notice] = l(:notice_account_password_updated)
80 else
81 render :action => 'my_account'
82 return
83 end
79 else
84 else
80 flash.now[:notice] = l(:notice_account_wrong_password)
85 flash[:notice] = l(:notice_account_wrong_password)
81 end
86 end
82 render :action => 'my_account'
87 redirect_to :action => 'my_account'
83 end
88 end
84
89
85 # Enable user to choose a new password
90 # Enable user to choose a new password
@@ -44,7 +44,7 class AdminController < ApplicationController
44 a.mail_enabled = (params[:action_ids] || []).include? a.id.to_s
44 a.mail_enabled = (params[:action_ids] || []).include? a.id.to_s
45 a.save
45 a.save
46 }
46 }
47 flash[:notice] = "Mail options were successfully updated."
47 flash.now[:notice] = l(:notice_successful_update)
48 end
48 end
49 end
49 end
50
50
@@ -55,7 +55,7 class ApplicationController < ActionController::Base
55 def require_login
55 def require_login
56 unless self.logged_in_user
56 unless self.logged_in_user
57 store_location
57 store_location
58 redirect_to(:controller => "account", :action => "login")
58 redirect_to :controller => "account", :action => "login"
59 return false
59 return false
60 end
60 end
61 true
61 true
@@ -64,8 +64,7 class ApplicationController < ActionController::Base
64 def require_admin
64 def require_admin
65 return unless require_login
65 return unless require_login
66 unless self.logged_in_user.admin?
66 unless self.logged_in_user.admin?
67 flash[:notice] = "Acces denied"
67 render :nothing => true, :status => 403
68 redirect_to:controller => ''
69 return false
68 return false
70 end
69 end
71 true
70 true
@@ -86,8 +85,7 class ApplicationController < ActionController::Base
86 if @user_membership and Permission.allowed_to_role( "%s/%s" % [ @params[:controller], @params[:action] ], @user_membership.role_id )
85 if @user_membership and Permission.allowed_to_role( "%s/%s" % [ @params[:controller], @params[:action] ], @user_membership.role_id )
87 return true
86 return true
88 end
87 end
89 flash[:notice] = "Acces denied"
88 render :nothing => true, :status => 403
90 redirect_to :controller => ''
91 false
89 false
92 end
90 end
93
91
@@ -42,6 +42,7 class CustomFieldsController < ApplicationController
42 return
42 return
43 end
43 end
44 if request.post? and @custom_field.save
44 if request.post? and @custom_field.save
45 flash[:notice] = l(:notice_successful_create)
45 redirect_to :action => 'list'
46 redirect_to :action => 'list'
46 end
47 end
47 @trackers = Tracker.find(:all)
48 @trackers = Tracker.find(:all)
@@ -53,7 +54,7 class CustomFieldsController < ApplicationController
53 if @custom_field.is_a? IssueCustomField
54 if @custom_field.is_a? IssueCustomField
54 @custom_field.trackers = params[:tracker_ids] ? Tracker.find(params[:tracker_ids]) : []
55 @custom_field.trackers = params[:tracker_ids] ? Tracker.find(params[:tracker_ids]) : []
55 end
56 end
56 flash[:notice] = 'Custom field was successfully updated.'
57 flash[:notice] = l(:notice_successful_update)
57 redirect_to :action => 'list'
58 redirect_to :action => 'list'
58 end
59 end
59 @trackers = Tracker.find(:all)
60 @trackers = Tracker.find(:all)
@@ -25,7 +25,7 class DocumentsController < ApplicationController
25 def edit
25 def edit
26 @categories = Enumeration::get_values('DCAT')
26 @categories = Enumeration::get_values('DCAT')
27 if request.post? and @document.update_attributes(params[:document])
27 if request.post? and @document.update_attributes(params[:document])
28 flash[:notice] = 'Document was successfully updated.'
28 flash[:notice] = l(:notice_successful_update)
29 redirect_to :action => 'show', :id => @document
29 redirect_to :action => 'show', :id => @document
30 end
30 end
31 end
31 end
@@ -21,7 +21,7 class IssueCategoriesController < ApplicationController
21
21
22 def edit
22 def edit
23 if request.post? and @category.update_attributes(params[:category])
23 if request.post? and @category.update_attributes(params[:category])
24 flash[:notice] = 'Issue category was successfully updated.'
24 flash[:notice] = l(:notice_successful_update)
25 redirect_to :controller => 'projects', :action => 'settings', :id => @project
25 redirect_to :controller => 'projects', :action => 'settings', :id => @project
26 end
26 end
27 end
27 end
@@ -35,7 +35,7 class IssueStatusesController < ApplicationController
35 def create
35 def create
36 @issue_status = IssueStatus.new(params[:issue_status])
36 @issue_status = IssueStatus.new(params[:issue_status])
37 if @issue_status.save
37 if @issue_status.save
38 flash[:notice] = 'IssueStatus was successfully created.'
38 flash[:notice] = l(:notice_successful_create)
39 redirect_to :action => 'list'
39 redirect_to :action => 'list'
40 else
40 else
41 render :action => 'new'
41 render :action => 'new'
@@ -49,7 +49,7 class IssueStatusesController < ApplicationController
49 def update
49 def update
50 @issue_status = IssueStatus.find(params[:id])
50 @issue_status = IssueStatus.find(params[:id])
51 if @issue_status.update_attributes(params[:issue_status])
51 if @issue_status.update_attributes(params[:issue_status])
52 flash[:notice] = 'IssueStatus was successfully updated.'
52 flash[:notice] = l(:notice_successful_update)
53 redirect_to :action => 'list'
53 redirect_to :action => 'list'
54 else
54 else
55 render :action => 'edit'
55 render :action => 'edit'
@@ -38,7 +38,7 class IssuesController < ApplicationController
38 @issue.custom_values = @custom_values
38 @issue.custom_values = @custom_values
39 @issue.attributes = params[:issue]
39 @issue.attributes = params[:issue]
40 if @issue.save
40 if @issue.save
41 flash[:notice] = 'Issue was successfully updated.'
41 flash[:notice] = l(:notice_successful_update)
42 redirect_to :action => 'show', :id => @issue
42 redirect_to :action => 'show', :id => @issue
43 end
43 end
44 end
44 end
@@ -56,7 +56,7 class IssuesController < ApplicationController
56 @issue.fixed_version_id = (params[:issue][:fixed_version_id])
56 @issue.fixed_version_id = (params[:issue][:fixed_version_id])
57 @issue.assigned_to_id = (params[:issue][:assigned_to_id])
57 @issue.assigned_to_id = (params[:issue][:assigned_to_id])
58 if @issue.save
58 if @issue.save
59 flash[:notice] = 'Issue was successfully updated.'
59 flash[:notice] = l(:notice_successful_update)
60 Mailer.deliver_issue_change_status(@issue) if Permission.find_by_controller_and_action(@params[:controller], @params[:action]).mail_enabled?
60 Mailer.deliver_issue_change_status(@issue) if Permission.find_by_controller_and_action(@params[:controller], @params[:action]).mail_enabled?
61 redirect_to :action => 'show', :id => @issue
61 redirect_to :action => 'show', :id => @issue
62 end
62 end
@@ -21,14 +21,14 class MembersController < ApplicationController
21
21
22 def edit
22 def edit
23 if request.post? and @member.update_attributes(params[:member])
23 if request.post? and @member.update_attributes(params[:member])
24 flash[:notice] = 'Member was successfully updated.'
24 flash[:notice] = l(:notice_successful_update)
25 redirect_to :controller => 'projects', :action => 'settings', :id => @project
25 redirect_to :controller => 'projects', :action => 'settings', :id => @project
26 end
26 end
27 end
27 end
28
28
29 def destroy
29 def destroy
30 @member.destroy
30 @member.destroy
31 flash[:notice] = 'Member was successfully removed.'
31 flash[:notice] = l(:notice_successful_delete)
32 redirect_to :controller => 'projects', :action => 'settings', :id => @project
32 redirect_to :controller => 'projects', :action => 'settings', :id => @project
33 end
33 end
34
34
@@ -24,7 +24,7 class NewsController < ApplicationController
24
24
25 def edit
25 def edit
26 if request.post? and @news.update_attributes(params[:news])
26 if request.post? and @news.update_attributes(params[:news])
27 flash[:notice] = 'News was successfully updated.'
27 flash[:notice] = l(:notice_successful_update)
28 redirect_to :action => 'show', :id => @news
28 redirect_to :action => 'show', :id => @news
29 end
29 end
30 end
30 end
@@ -58,7 +58,7 class ProjectsController < ApplicationController
58 @custom_values = ProjectCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x, :customized => @project, :value => params["custom_fields"][x.id.to_s]) }
58 @custom_values = ProjectCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x, :customized => @project, :value => params["custom_fields"][x.id.to_s]) }
59 @project.custom_values = @custom_values
59 @project.custom_values = @custom_values
60 if @project.save
60 if @project.save
61 flash[:notice] = 'Project was successfully created.'
61 flash[:notice] = l(:notice_successful_create)
62 redirect_to :controller => 'admin', :action => 'projects'
62 redirect_to :controller => 'admin', :action => 'projects'
63 end
63 end
64 end
64 end
@@ -92,7 +92,7 class ProjectsController < ApplicationController
92 @project.custom_values = @custom_values
92 @project.custom_values = @custom_values
93 end
93 end
94 if @project.update_attributes(params[:project])
94 if @project.update_attributes(params[:project])
95 flash[:notice] = 'Project was successfully updated.'
95 flash[:notice] = l(:notice_successful_update)
96 redirect_to :action => 'settings', :id => @project
96 redirect_to :action => 'settings', :id => @project
97 else
97 else
98 settings
98 settings
@@ -114,6 +114,7 class ProjectsController < ApplicationController
114 if request.post?
114 if request.post?
115 @issue_category = @project.issue_categories.build(params[:issue_category])
115 @issue_category = @project.issue_categories.build(params[:issue_category])
116 if @issue_category.save
116 if @issue_category.save
117 flash[:notice] = l(:notice_successful_create)
117 redirect_to :action => 'settings', :id => @project
118 redirect_to :action => 'settings', :id => @project
118 else
119 else
119 settings
120 settings
@@ -126,6 +127,7 class ProjectsController < ApplicationController
126 def add_version
127 def add_version
127 @version = @project.versions.build(params[:version])
128 @version = @project.versions.build(params[:version])
128 if request.post? and @version.save
129 if request.post? and @version.save
130 flash[:notice] = l(:notice_successful_create)
129 redirect_to :action => 'settings', :id => @project
131 redirect_to :action => 'settings', :id => @project
130 end
132 end
131 end
133 end
@@ -135,7 +137,7 class ProjectsController < ApplicationController
135 @member = @project.members.build(params[:member])
137 @member = @project.members.build(params[:member])
136 if request.post?
138 if request.post?
137 if @member.save
139 if @member.save
138 flash[:notice] = 'Member was successfully added.'
140 flash[:notice] = l(:notice_successful_create)
139 redirect_to :action => 'settings', :id => @project
141 redirect_to :action => 'settings', :id => @project
140 else
142 else
141 settings
143 settings
@@ -160,6 +162,7 class ProjectsController < ApplicationController
160 @attachment.author_id = self.logged_in_user.id if self.logged_in_user
162 @attachment.author_id = self.logged_in_user.id if self.logged_in_user
161 end
163 end
162 if @document.save
164 if @document.save
165 flash[:notice] = l(:notice_successful_create)
163 redirect_to :action => 'list_documents', :id => @project
166 redirect_to :action => 'list_documents', :id => @project
164 end
167 end
165 end
168 end
@@ -188,7 +191,7 class ProjectsController < ApplicationController
188 @custom_values = @project.custom_fields_for_issues(@tracker).collect { |x| CustomValue.new(:custom_field => x, :customized => @issue, :value => params["custom_fields"][x.id.to_s]) }
191 @custom_values = @project.custom_fields_for_issues(@tracker).collect { |x| CustomValue.new(:custom_field => x, :customized => @issue, :value => params["custom_fields"][x.id.to_s]) }
189 @issue.custom_values = @custom_values
192 @issue.custom_values = @custom_values
190 if @issue.save
193 if @issue.save
191 flash[:notice] = "Issue was successfully added."
194 flash[:notice] = l(:notice_successful_create)
192 Mailer.deliver_issue_add(@issue) if Permission.find_by_controller_and_action(@params[:controller], @params[:action]).mail_enabled?
195 Mailer.deliver_issue_add(@issue) if Permission.find_by_controller_and_action(@params[:controller], @params[:action]).mail_enabled?
193 redirect_to :action => 'list_issues', :id => @project
196 redirect_to :action => 'list_issues', :id => @project
194 end
197 end
@@ -243,6 +246,7 class ProjectsController < ApplicationController
243 @news.attributes = params[:news]
246 @news.attributes = params[:news]
244 @news.author_id = self.logged_in_user.id if self.logged_in_user
247 @news.author_id = self.logged_in_user.id if self.logged_in_user
245 if @news.save
248 if @news.save
249 flash[:notice] = l(:notice_successful_create)
246 redirect_to :action => 'list_news', :id => @project
250 redirect_to :action => 'list_news', :id => @project
247 end
251 end
248 end
252 end
@@ -260,6 +264,7 class ProjectsController < ApplicationController
260 @attachment = @project.versions.find(params[:version_id]).attachments.build(params[:attachment])
264 @attachment = @project.versions.find(params[:version_id]).attachments.build(params[:attachment])
261 @attachment.author_id = self.logged_in_user.id if self.logged_in_user
265 @attachment.author_id = self.logged_in_user.id if self.logged_in_user
262 if @attachment.save
266 if @attachment.save
267 flash[:notice] = l(:notice_successful_create)
263 redirect_to :controller => 'projects', :action => 'list_files', :id => @project
268 redirect_to :controller => 'projects', :action => 'list_files', :id => @project
264 end
269 end
265 end
270 end
@@ -285,8 +290,7 private
285 # used as a before_filter
290 # used as a before_filter
286 def find_project
291 def find_project
287 @project = Project.find(params[:id])
292 @project = Project.find(params[:id])
288 rescue
293 rescue
289 flash[:notice] = 'Project not found.'
290 redirect_to :action => 'list'
294 redirect_to :action => 'list'
291 end
295 end
292 end
296 end
@@ -33,7 +33,7 class RolesController < ApplicationController
33 if request.post?
33 if request.post?
34 @role.permissions = Permission.find(@params[:permission_ids]) if @params[:permission_ids]
34 @role.permissions = Permission.find(@params[:permission_ids]) if @params[:permission_ids]
35 if @role.save
35 if @role.save
36 flash[:notice] = 'Role was successfully created.'
36 flash[:notice] = l(:notice_successful_create)
37 redirect_to :action => 'list'
37 redirect_to :action => 'list'
38 end
38 end
39 end
39 end
@@ -45,7 +45,7 class RolesController < ApplicationController
45 if request.post? and @role.update_attributes(params[:role])
45 if request.post? and @role.update_attributes(params[:role])
46 @role.permissions = Permission.find(@params[:permission_ids] || [])
46 @role.permissions = Permission.find(@params[:permission_ids] || [])
47 Permission.allowed_to_role_expired
47 Permission.allowed_to_role_expired
48 flash[:notice] = 'Role was successfully updated.'
48 flash[:notice] = l(:notice_successful_update)
49 redirect_to :action => 'list'
49 redirect_to :action => 'list'
50 end
50 end
51 @permissions = Permission.find(:all, :conditions => ["is_public=?", false], :order => 'sort ASC')
51 @permissions = Permission.find(:all, :conditions => ["is_public=?", false], :order => 'sort ASC')
@@ -73,7 +73,7 class RolesController < ApplicationController
73 }
73 }
74 }
74 }
75 if @role.save
75 if @role.save
76 flash[:notice] = 'Workflow was successfully updated.'
76 flash[:notice] = l(:notice_successful_update)
77 end
77 end
78 end
78 end
79 @roles = Role.find_all
79 @roles = Role.find_all
@@ -16,8 +16,8
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17
17
18 class TrackersController < ApplicationController
18 class TrackersController < ApplicationController
19 layout 'base'
19 layout 'base'
20 before_filter :require_admin
20 before_filter :require_admin
21
21
22 def index
22 def index
23 list
23 list
@@ -34,7 +34,7 class TrackersController < ApplicationController
34 def new
34 def new
35 @tracker = Tracker.new(params[:tracker])
35 @tracker = Tracker.new(params[:tracker])
36 if request.post? and @tracker.save
36 if request.post? and @tracker.save
37 flash[:notice] = 'Tracker was successfully created.'
37 flash[:notice] = l(:notice_successful_create)
38 redirect_to :action => 'list'
38 redirect_to :action => 'list'
39 end
39 end
40 end
40 end
@@ -42,7 +42,7 class TrackersController < ApplicationController
42 def edit
42 def edit
43 @tracker = Tracker.find(params[:id])
43 @tracker = Tracker.find(params[:id])
44 if request.post? and @tracker.update_attributes(params[:tracker])
44 if request.post? and @tracker.update_attributes(params[:tracker])
45 flash[:notice] = 'Tracker was successfully updated.'
45 flash[:notice] = l(:notice_successful_update)
46 redirect_to :action => 'list'
46 redirect_to :action => 'list'
47 end
47 end
48 end
48 end
@@ -53,7 +53,7 class UsersController < ApplicationController
53 @custom_values = UserCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x, :customized => @user, :value => params["custom_fields"][x.id.to_s]) }
53 @custom_values = UserCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x, :customized => @user, :value => params["custom_fields"][x.id.to_s]) }
54 @user.custom_values = @custom_values
54 @user.custom_values = @custom_values
55 if @user.save
55 if @user.save
56 flash[:notice] = 'User was successfully created.'
56 flash[:notice] = l(:notice_successful_create)
57 redirect_to :action => 'list'
57 redirect_to :action => 'list'
58 end
58 end
59 end
59 end
@@ -72,7 +72,7 class UsersController < ApplicationController
72 @user.custom_values = @custom_values
72 @user.custom_values = @custom_values
73 end
73 end
74 if @user.update_attributes(params[:user])
74 if @user.update_attributes(params[:user])
75 flash[:notice] = 'User was successfully updated.'
75 flash[:notice] = l(:notice_successful_update)
76 redirect_to :action => 'list'
76 redirect_to :action => 'list'
77 end
77 end
78 end
78 end
@@ -16,41 +16,42
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17
17
18 class VersionsController < ApplicationController
18 class VersionsController < ApplicationController
19 layout 'base'
19 layout 'base'
20 before_filter :find_project, :authorize
20 before_filter :find_project, :authorize
21
21
22 def edit
22 def edit
23 if request.post? and @version.update_attributes(params[:version])
23 if request.post? and @version.update_attributes(params[:version])
24 flash[:notice] = 'Version was successfully updated.'
24 flash[:notice] = l(:notice_successful_update)
25 redirect_to :controller => 'projects', :action => 'settings', :id => @project
25 redirect_to :controller => 'projects', :action => 'settings', :id => @project
26 end
26 end
27 end
27 end
28
28
29 def destroy
29 def destroy
30 @version.destroy
30 @version.destroy
31 redirect_to :controller => 'projects', :action => 'settings', :id => @project
31 redirect_to :controller => 'projects', :action => 'settings', :id => @project
32 rescue
32 rescue
33 flash[:notice] = "Unable to delete version"
33 flash[:notice] = "Unable to delete version"
34 redirect_to :controller => 'projects', :action => 'settings', :id => @project
34 redirect_to :controller => 'projects', :action => 'settings', :id => @project
35 end
35 end
36
36
37 def download
37 def download
38 @attachment = @version.attachments.find(params[:attachment_id])
38 @attachment = @version.attachments.find(params[:attachment_id])
39 @attachment.increment_download
39 @attachment.increment_download
40 send_file @attachment.diskfile, :filename => @attachment.filename
40 send_file @attachment.diskfile, :filename => @attachment.filename
41 rescue
41 rescue
42 flash[:notice]="Requested file doesn't exist or has been deleted."
42 flash[:notice] = l(:notice_file_not_found)
43 redirect_to :controller => 'projects', :action => 'list_files', :id => @project
43 redirect_to :controller => 'projects', :action => 'list_files', :id => @project
44 end
44 end
45
45
46 def destroy_file
46 def destroy_file
47 @version.attachments.find(params[:attachment_id]).destroy
47 @version.attachments.find(params[:attachment_id]).destroy
48 flash[:notice] = l(:notice_successful_delete)
48 redirect_to :controller => 'projects', :action => 'list_files', :id => @project
49 redirect_to :controller => 'projects', :action => 'list_files', :id => @project
49 end
50 end
50
51
51 private
52 private
52 def find_project
53 def find_project
53 @version = Version.find(params[:id])
54 @version = Version.find(params[:id])
54 @project = @version.project
55 @project = @version.project
55 end
56 end
56 end
57 end
@@ -92,6 +92,6 module ApplicationHelper
92 end
92 end
93
93
94 def lang_options_for_select
94 def lang_options_for_select
95 GLoc.valid_languages.collect {|lang| [ l_lang_name(lang.to_s, lang), lang.to_s]}
95 (GLoc.valid_languages.sort {|x,y| x.to_s <=> y.to_s }).collect {|lang| [ l_lang_name(lang.to_s, lang), lang.to_s]}
96 end
96 end
97 end
97 end
@@ -20,24 +20,27 module CustomFieldsHelper
20 def custom_field_tag(custom_value)
20 def custom_field_tag(custom_value)
21 custom_field = custom_value.custom_field
21 custom_field = custom_value.custom_field
22 field_name = "custom_fields[#{custom_field.id}]"
22 field_name = "custom_fields[#{custom_field.id}]"
23 field_id = "custom_fields_#{custom_field.id}"
24
23 case custom_field.field_format
25 case custom_field.field_format
24 when "string", "int", "date"
26 when "string", "int", "date"
25 text_field_tag field_name, custom_value.value
27 text_field_tag field_name, custom_value.value, :id => field_id
26 when "text"
28 when "text"
27 text_area_tag field_name, custom_value.value, :cols => 60, :rows => 3
29 text_area_tag field_name, custom_value.value, :id => field_id, :cols => 60, :rows => 3
28 when "bool"
30 when "bool"
29 check_box_tag(field_name, "1", custom_value.value == "1") +
31 check_box_tag(field_name, "1", custom_value.value == "1", :id => field_id) +
30 hidden_field_tag(field_name, "0")
32 hidden_field_tag(field_name, "0")
31 when "list"
33 when "list"
32 select_tag field_name,
34 select_tag field_name,
33 "<option></option>" + options_for_select(custom_field.possible_values.split('|'),
35 "<option></option>" + options_for_select(custom_field.possible_values.split('|'),
34 custom_value.value)
36 custom_value.value), :id => field_id
35 end
37 end
36 end
38 end
37
39
38 def custom_field_label_tag(custom_value)
40 def custom_field_label_tag(custom_value)
39 content_tag "label", custom_value.custom_field.name +
41 content_tag "label", custom_value.custom_field.name +
40 (custom_value.custom_field.is_required? ? " <span class=\"required\">*</span>" : "")
42 (custom_value.custom_field.is_required? ? " <span class=\"required\">*</span>" : ""),
43 :for => "custom_fields_#{custom_value.custom_field.id}"
41 end
44 end
42
45
43 def custom_field_tag_with_label(custom_value)
46 def custom_field_tag_with_label(custom_value)
@@ -9,7 +9,7
9 <div class="splitcontentleft">
9 <div class="splitcontentleft">
10 <div class="box">
10 <div class="box">
11 <h3><%=l(:label_information_plural)%></h3>
11 <h3><%=l(:label_information_plural)%></h3>
12 &nbsp;
12
13 <%= start_form_tag :action => 'my_account' %>
13 <%= start_form_tag :action => 'my_account' %>
14
14
15 <!--[form:user]-->
15 <!--[form:user]-->
@@ -20,7 +20,7
20 <%= text_field 'user', 'lastname' %></p>
20 <%= text_field 'user', 'lastname' %></p>
21
21
22 <p><label for="user_mail"><%=l(:field_mail)%> <span class="required">*</span></label><br/>
22 <p><label for="user_mail"><%=l(:field_mail)%> <span class="required">*</span></label><br/>
23 <%= text_field 'user', 'mail' %></p>
23 <%= text_field 'user', 'mail', :size => 40 %></p>
24
24
25 <p><label for="user_language"><%=l(:field_language)%></label><br/>
25 <p><label for="user_language"><%=l(:field_language)%></label><br/>
26 <%= select("user", "language", lang_options_for_select) %></p>
26 <%= select("user", "language", lang_options_for_select) %></p>
@@ -38,7 +38,7
38 <% unless @user.auth_source_id %>
38 <% unless @user.auth_source_id %>
39 <div class="box">
39 <div class="box">
40 <h3><%=l(:field_password)%></h3>
40 <h3><%=l(:field_password)%></h3>
41 &nbsp;
41
42 <%= start_form_tag :action => 'change_password' %>
42 <%= start_form_tag :action => 'change_password' %>
43
43
44 <p><label for="password"><%=l(:field_password)%> <span class="required">*</span></label><br/>
44 <p><label for="password"><%=l(:field_password)%> <span class="required">*</span></label><br/>
@@ -3,10 +3,19
3 <p><%=l(:text_select_mail_notifications)%></p>
3 <p><%=l(:text_select_mail_notifications)%></p>
4
4
5 <%= start_form_tag ({}, :id => 'mail_options_form')%>
5 <%= start_form_tag ({}, :id => 'mail_options_form')%>
6 <% for action in @actions %>
6
7 <%= check_box_tag "action_ids[]", action.id, action.mail_enabled? %>
7 <% actions = @actions.group_by {|p| p.group_id } %>
8 <%= action.description %><br />
8 <% actions.keys.sort.each do |group_id| %>
9 <fieldset style="margin-top: 6px;"><legend><strong><%= l(Permission::GROUPS[group_id]) %></strong></legend>
10 <% actions[group_id].each do |p| %>
11 <div style="width:170px;float:left;"><%= check_box_tag "action_ids[]", p.id, p.mail_enabled? %>
12 <%= l(p.description.to_sym) %>
13 </div>
14 <% end %>
15 </fieldset>
9 <% end %>
16 <% end %>
17
18
10 <br />
19 <br />
11 <p>
20 <p>
12 <a href="javascript:checkAll('mail_options_form', true)"><%=l(:button_check_all)%></a> |
21 <a href="javascript:checkAll('mail_options_form', true)"><%=l(:button_check_all)%></a> |
@@ -56,11 +56,9
56 <div class="box">
56 <div class="box">
57 <h3><%=l(:label_news_latest)%></h3>
57 <h3><%=l(:label_news_latest)%></h3>
58 <% for news in @news %>
58 <% for news in @news %>
59 <p>
59 <p><b><%= news.title %></b> <small>(<%= link_to_user news.author %> <%= format_time(news.created_on) %>)</small><br />
60 <b><%= news.title %></b> <small>(<%= link_to_user news.author %> <%= format_time(news.created_on) %>)</small><br />
61 <%= news.summary %>
60 <%= news.summary %>
62 <small>[<%= link_to l(:label_read), :controller => 'news', :action => 'show', :id => news %>]</small>
61 <small>[<%= link_to l(:label_read), :controller => 'news', :action => 'show', :id => news %>]</small></p>
63 </p>
64 <hr />
62 <hr />
65 <% end %>
63 <% end %>
66 <center><small>[ <%= link_to l(:label_news_view_all), :controller => 'projects', :action => 'list_news', :id => @project %> ]</small></center>
64 <center><small>[ <%= link_to l(:label_news_view_all), :controller => 'projects', :action => 'list_news', :id => @project %> ]</small></center>
@@ -32,16 +32,16 activerecord_error_wrong_length: is the wrong length
32 activerecord_error_taken: has already been taken
32 activerecord_error_taken: has already been taken
33 activerecord_error_not_a_number: is not a number
33 activerecord_error_not_a_number: is not a number
34
34
35 general_fmt_age: %d yr
35 general_fmt_age: %d año
36 general_fmt_age_plural: %d yrs
36 general_fmt_age_plural: %d años
37 general_fmt_date: %%b %%d, %%Y (%%a)
37 general_fmt_date: %%d/%%m/%%Y
38 general_fmt_datetime: %%b %%d, %%Y (%%a), %%I:%%M %%p
38 general_fmt_datetime: %%d/%%m/%%Y %%H:%%M
39 general_fmt_datetime_short: %%b %%d, %%I:%%M %%p
39 general_fmt_datetime_short: %%d/%%m %%H:%%M
40 general_fmt_time: %%I:%%M %%p
40 general_fmt_time: %%H:%%M
41 general_text_No: 'No'
41 general_text_No: 'No'
42 general_text_Yes: 'Yes'
42 general_text_Yes: ''
43 general_text_no: 'no'
43 general_text_no: 'no'
44 general_text_yes: 'yes'
44 general_text_yes: 'sí'
45 general_lang_es: 'Español'
45 general_lang_es: 'Español'
46
46
47 notice_account_updated: Account was successfully updated.
47 notice_account_updated: Account was successfully updated.
@@ -60,7 +60,7 notice_successful_connection: Successful connection.
60 notice_file_not_found: Requested file doesn't exist or has been deleted.
60 notice_file_not_found: Requested file doesn't exist or has been deleted.
61
61
62 gui_validation_error: 1 error
62 gui_validation_error: 1 error
63 gui_validation_error_plural: %d errors
63 gui_validation_error_plural: %d errores
64
64
65 field_name: Nombre
65 field_name: Nombre
66 field_description: Descripción
66 field_description: Descripción
@@ -70,12 +70,12 field_firstname: Nombre
70 field_lastname: Apellido
70 field_lastname: Apellido
71 field_mail: Email
71 field_mail: Email
72 field_filename: Fichero
72 field_filename: Fichero
73 #field_filesize: Size
73 field_filesize: Tamaño
74 field_downloads: Telecargas
74 field_downloads: Telecargas
75 field_author: Autor
75 field_author: Autor
76 field_created_on: Creado
76 field_created_on: Creado
77 field_updated_on: Actualizado
77 field_updated_on: Actualizado
78 #field_field_format: Format
78 field_field_format: Formato
79 field_is_for_all: Para todos los proyectos
79 field_is_for_all: Para todos los proyectos
80 field_possible_values: Valores posibles
80 field_possible_values: Valores posibles
81 field_regexp: Expresión regular
81 field_regexp: Expresión regular
@@ -87,7 +87,7 field_title: Título
87 field_project: Proyecto
87 field_project: Proyecto
88 field_issue: Petición
88 field_issue: Petición
89 field_status: Estatuto
89 field_status: Estatuto
90 #field_notes: Notes
90 field_notes: Notas
91 field_is_closed: Petición resuelta
91 field_is_closed: Petición resuelta
92 field_is_default: Estatuto por defecto
92 field_is_default: Estatuto por defecto
93 field_html_color: Color
93 field_html_color: Color
@@ -165,7 +165,7 label_information: Informacion
165 label_information_plural: Informaciones
165 label_information_plural: Informaciones
166 label_please_login: Conexión
166 label_please_login: Conexión
167 #label_register: Register
167 #label_register: Register
168 #label_password_lost: Lost password
168 label_password_lost: ¿Olvidaste la contraseña?
169 label_home: Acogida
169 label_home: Acogida
170 label_my_page: Mi página
170 label_my_page: Mi página
171 label_my_account: Mi cuenta
171 label_my_account: Mi cuenta
@@ -222,7 +222,7 label_version: Versión
222 label_version_new: Nueva versión
222 label_version_new: Nueva versión
223 label_version_plural: Versiónes
223 label_version_plural: Versiónes
224 label_confirmation: Confirmación
224 label_confirmation: Confirmación
225 #label_export_csv: Export to CSV
225 label_export_csv: Exportar a CSV
226 label_read: Leer...
226 label_read: Leer...
227 label_public_projects: Proyectos publicos
227 label_public_projects: Proyectos publicos
228 label_open_issues: Abierta
228 label_open_issues: Abierta
@@ -265,9 +265,9 text_min_max_length_info: 0 para ninguna restricción
265 text_project_destroy_confirmation: ¿ Estás seguro de querer eliminar el proyecto ?
265 text_project_destroy_confirmation: ¿ Estás seguro de querer eliminar el proyecto ?
266 text_workflow_edit: Seleccionar un workflow para actualizar
266 text_workflow_edit: Seleccionar un workflow para actualizar
267
267
268 #default_role_manager: Manager
268 default_role_manager: Manager
269 #default_role_developper: Developer
269 default_role_developper: Desarrollador
270 #default_role_reporter: Reporter
270 default_role_reporter: Informador
271 default_tracker_bug: Anomalía
271 default_tracker_bug: Anomalía
272 default_tracker_feature: Evolución
272 default_tracker_feature: Evolución
273 default_tracker_support: Asistencia
273 default_tracker_support: Asistencia
@@ -150,7 +150,7 background-color:inherit;
150 }
150 }
151
151
152 #content h2 a{font-weight:normal;}
152 #content h2 a{font-weight:normal;}
153 #content h3{margin:0 0 5px 0; font-size:1.4em; letter-spacing:-1px;}
153 #content h3{margin:0 0 12px 0; font-size:1.4em; letter-spacing:-1px;}
154 #content a:hover,#subcontent a:hover{text-decoration:underline;}
154 #content a:hover,#subcontent a:hover{text-decoration:underline;}
155 #content ul,#content ol{margin:0 5px 16px 35px;}
155 #content ul,#content ol{margin:0 5px 16px 35px;}
156 #content dl{margin:0 5px 10px 25px;}
156 #content dl{margin:0 5px 10px 25px;}
@@ -255,7 +255,7 tr.even {
255 background-color:#CEE1ED;
255 background-color:#CEE1ED;
256 }
256 }
257
257
258 hr { border:0px; border-bottom:1px dashed #000000; }
258 hr { border:none; border-bottom: dotted 2px #c0c0c0; }
259
259
260
260
261 /**************** Sidebar styles ****************/
261 /**************** Sidebar styles ****************/
@@ -39,10 +39,15 class AccountTest < ActionController::IntegrationTest
39
39
40 post "account/change_password", :password => 'jsmith', :new_password => "hello", :new_password_confirmation => "hello2"
40 post "account/change_password", :password => 'jsmith', :new_password => "hello", :new_password_confirmation => "hello2"
41 assert_response :success
41 assert_response :success
42 assert_template "account/my_account"
42 assert_tag :tag => "div", :attributes => { :class => "errorExplanation" }
43 assert_tag :tag => "div", :attributes => { :class => "errorExplanation" }
43
44
45 post "account/change_password", :password => 'jsmithZZ', :new_password => "hello", :new_password_confirmation => "hello"
46 assert_redirected_to "account/my_account"
47 assert_equal 'Wrong password', flash[:notice]
48
44 post "account/change_password", :password => 'jsmith', :new_password => "hello", :new_password_confirmation => "hello"
49 post "account/change_password", :password => 'jsmith', :new_password => "hello", :new_password_confirmation => "hello"
45 assert_response :success
50 assert_redirected_to "account/my_account"
46 log_user('jsmith', 'hello')
51 log_user('jsmith', 'hello')
47 end
52 end
48
53
@@ -47,7 +47,7 class AdminTest < ActionController::IntegrationTest
47 assert_template "projects/add"
47 assert_template "projects/add"
48 post "projects/add", :project => { :name => "blog", :description => "weblog", :is_public => 1}
48 post "projects/add", :project => { :name => "blog", :description => "weblog", :is_public => 1}
49 assert_redirected_to "admin/projects"
49 assert_redirected_to "admin/projects"
50 assert_equal 'Project was successfully created.', flash[:notice]
50 assert_equal 'Successful creation.', flash[:notice]
51
51
52 project = Project.find_by_name("blog")
52 project = Project.find_by_name("blog")
53 assert_kind_of Project, project
53 assert_kind_of Project, project
General Comments 0
You need to be logged in to leave comments. Login now