Commit 18ee1fef authored by Jean-Philippe Lang's avatar Jean-Philippe Lang

notice messages translation

git-svn-id: http://redmine.rubyforge.org/svn/trunk@17 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 2a96f569
...@@ -72,14 +72,19 @@ class AccountController < ApplicationController ...@@ -72,14 +72,19 @@ class AccountController < ApplicationController
# Change logged in user's password # Change logged in user's password
def change_password def change_password
@user = self.logged_in_user @user = self.logged_in_user
flash.now[:notice] = l(:notice_can_t_change_password) and render :action => 'my_account' and return if @user.auth_source_id flash[:notice] = l(:notice_can_t_change_password) and redirect_to :action => 'my_account' and return if @user.auth_source_id
if @user.check_password?(@params[:password]) if @user.check_password?(@params[:password])
@user.password, @user.password_confirmation = params[:new_password], params[:new_password_confirmation] @user.password, @user.password_confirmation = params[:new_password], params[:new_password_confirmation]
flash.now[:notice] = l(:notice_account_password_updated) if @user.save if @user.save
flash[:notice] = l(:notice_account_password_updated)
else
render :action => 'my_account'
return
end
else else
flash.now[:notice] = l(:notice_account_wrong_password) flash[:notice] = l(:notice_account_wrong_password)
end end
render :action => 'my_account' redirect_to :action => 'my_account'
end end
# Enable user to choose a new password # Enable user to choose a new password
......
...@@ -44,7 +44,7 @@ class AdminController < ApplicationController ...@@ -44,7 +44,7 @@ class AdminController < ApplicationController
a.mail_enabled = (params[:action_ids] || []).include? a.id.to_s a.mail_enabled = (params[:action_ids] || []).include? a.id.to_s
a.save a.save
} }
flash[:notice] = "Mail options were successfully updated." flash.now[:notice] = l(:notice_successful_update)
end end
end end
......
...@@ -55,7 +55,7 @@ class ApplicationController < ActionController::Base ...@@ -55,7 +55,7 @@ class ApplicationController < ActionController::Base
def require_login def require_login
unless self.logged_in_user unless self.logged_in_user
store_location store_location
redirect_to(:controller => "account", :action => "login") redirect_to :controller => "account", :action => "login"
return false return false
end end
true true
...@@ -64,8 +64,7 @@ class ApplicationController < ActionController::Base ...@@ -64,8 +64,7 @@ class ApplicationController < ActionController::Base
def require_admin def require_admin
return unless require_login return unless require_login
unless self.logged_in_user.admin? unless self.logged_in_user.admin?
flash[:notice] = "Acces denied" render :nothing => true, :status => 403
redirect_to:controller => ''
return false return false
end end
true true
...@@ -86,8 +85,7 @@ class ApplicationController < ActionController::Base ...@@ -86,8 +85,7 @@ class ApplicationController < ActionController::Base
if @user_membership and Permission.allowed_to_role( "%s/%s" % [ @params[:controller], @params[:action] ], @user_membership.role_id ) if @user_membership and Permission.allowed_to_role( "%s/%s" % [ @params[:controller], @params[:action] ], @user_membership.role_id )
return true return true
end end
flash[:notice] = "Acces denied" render :nothing => true, :status => 403
redirect_to :controller => ''
false false
end end
......
...@@ -42,6 +42,7 @@ class CustomFieldsController < ApplicationController ...@@ -42,6 +42,7 @@ class CustomFieldsController < ApplicationController
return return
end end
if request.post? and @custom_field.save if request.post? and @custom_field.save
flash[:notice] = l(:notice_successful_create)
redirect_to :action => 'list' redirect_to :action => 'list'
end end
@trackers = Tracker.find(:all) @trackers = Tracker.find(:all)
...@@ -53,7 +54,7 @@ class CustomFieldsController < ApplicationController ...@@ -53,7 +54,7 @@ class CustomFieldsController < ApplicationController
if @custom_field.is_a? IssueCustomField if @custom_field.is_a? IssueCustomField
@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] = 'Custom field was successfully updated.' flash[:notice] = l(:notice_successful_update)
redirect_to :action => 'list' redirect_to :action => 'list'
end end
@trackers = Tracker.find(:all) @trackers = Tracker.find(:all)
......
...@@ -25,7 +25,7 @@ class DocumentsController < ApplicationController ...@@ -25,7 +25,7 @@ class DocumentsController < ApplicationController
def edit def edit
@categories = Enumeration::get_values('DCAT') @categories = Enumeration::get_values('DCAT')
if request.post? and @document.update_attributes(params[:document]) if request.post? and @document.update_attributes(params[:document])
flash[:notice] = 'Document was successfully updated.' flash[:notice] = l(:notice_successful_update)
redirect_to :action => 'show', :id => @document redirect_to :action => 'show', :id => @document
end end
end end
......
...@@ -21,7 +21,7 @@ class IssueCategoriesController < ApplicationController ...@@ -21,7 +21,7 @@ class IssueCategoriesController < ApplicationController
def edit def edit
if request.post? and @category.update_attributes(params[:category]) if request.post? and @category.update_attributes(params[:category])
flash[:notice] = 'Issue category was successfully updated.' flash[:notice] = l(:notice_successful_update)
redirect_to :controller => 'projects', :action => 'settings', :id => @project redirect_to :controller => 'projects', :action => 'settings', :id => @project
end end
end end
......
...@@ -35,7 +35,7 @@ class IssueStatusesController < ApplicationController ...@@ -35,7 +35,7 @@ class IssueStatusesController < ApplicationController
def create def create
@issue_status = IssueStatus.new(params[:issue_status]) @issue_status = IssueStatus.new(params[:issue_status])
if @issue_status.save if @issue_status.save
flash[:notice] = 'IssueStatus was successfully created.' flash[:notice] = l(:notice_successful_create)
redirect_to :action => 'list' redirect_to :action => 'list'
else else
render :action => 'new' render :action => 'new'
...@@ -49,7 +49,7 @@ class IssueStatusesController < ApplicationController ...@@ -49,7 +49,7 @@ class IssueStatusesController < ApplicationController
def update def update
@issue_status = IssueStatus.find(params[:id]) @issue_status = IssueStatus.find(params[:id])
if @issue_status.update_attributes(params[:issue_status]) if @issue_status.update_attributes(params[:issue_status])
flash[:notice] = 'IssueStatus was successfully updated.' flash[:notice] = l(:notice_successful_update)
redirect_to :action => 'list' redirect_to :action => 'list'
else else
render :action => 'edit' render :action => 'edit'
......
...@@ -38,7 +38,7 @@ class IssuesController < ApplicationController ...@@ -38,7 +38,7 @@ class IssuesController < ApplicationController
@issue.custom_values = @custom_values @issue.custom_values = @custom_values
@issue.attributes = params[:issue] @issue.attributes = params[:issue]
if @issue.save if @issue.save
flash[:notice] = 'Issue was successfully updated.' flash[:notice] = l(:notice_successful_update)
redirect_to :action => 'show', :id => @issue redirect_to :action => 'show', :id => @issue
end end
end end
...@@ -56,7 +56,7 @@ class IssuesController < ApplicationController ...@@ -56,7 +56,7 @@ class IssuesController < ApplicationController
@issue.fixed_version_id = (params[:issue][:fixed_version_id]) @issue.fixed_version_id = (params[:issue][:fixed_version_id])
@issue.assigned_to_id = (params[:issue][:assigned_to_id]) @issue.assigned_to_id = (params[:issue][:assigned_to_id])
if @issue.save if @issue.save
flash[:notice] = 'Issue was successfully updated.' flash[:notice] = l(:notice_successful_update)
Mailer.deliver_issue_change_status(@issue) if Permission.find_by_controller_and_action(@params[:controller], @params[:action]).mail_enabled? Mailer.deliver_issue_change_status(@issue) if 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
......
...@@ -21,14 +21,14 @@ class MembersController < ApplicationController ...@@ -21,14 +21,14 @@ class MembersController < ApplicationController
def edit def edit
if request.post? and @member.update_attributes(params[:member]) if request.post? and @member.update_attributes(params[:member])
flash[:notice] = 'Member was successfully updated.' flash[:notice] = l(:notice_successful_update)
redirect_to :controller => 'projects', :action => 'settings', :id => @project redirect_to :controller => 'projects', :action => 'settings', :id => @project
end end
end end
def destroy def destroy
@member.destroy @member.destroy
flash[:notice] = 'Member was successfully removed.' flash[:notice] = l(:notice_successful_delete)
redirect_to :controller => 'projects', :action => 'settings', :id => @project redirect_to :controller => 'projects', :action => 'settings', :id => @project
end end
......
...@@ -24,7 +24,7 @@ class NewsController < ApplicationController ...@@ -24,7 +24,7 @@ class NewsController < ApplicationController
def edit def edit
if request.post? and @news.update_attributes(params[:news]) if request.post? and @news.update_attributes(params[:news])
flash[:notice] = 'News was successfully updated.' flash[:notice] = l(:notice_successful_update)
redirect_to :action => 'show', :id => @news redirect_to :action => 'show', :id => @news
end end
end end
......
...@@ -58,7 +58,7 @@ class ProjectsController < ApplicationController ...@@ -58,7 +58,7 @@ class ProjectsController < ApplicationController
@custom_values = ProjectCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x, :customized => @project, :value => params["custom_fields"][x.id.to_s]) } @custom_values = ProjectCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x, :customized => @project, :value => params["custom_fields"][x.id.to_s]) }
@project.custom_values = @custom_values @project.custom_values = @custom_values
if @project.save if @project.save
flash[:notice] = 'Project was successfully created.' flash[:notice] = l(:notice_successful_create)
redirect_to :controller => 'admin', :action => 'projects' redirect_to :controller => 'admin', :action => 'projects'
end end
end end
...@@ -92,7 +92,7 @@ class ProjectsController < ApplicationController ...@@ -92,7 +92,7 @@ class ProjectsController < ApplicationController
@project.custom_values = @custom_values @project.custom_values = @custom_values
end end
if @project.update_attributes(params[:project]) if @project.update_attributes(params[:project])
flash[:notice] = 'Project was successfully updated.' flash[:notice] = l(:notice_successful_update)
redirect_to :action => 'settings', :id => @project redirect_to :action => 'settings', :id => @project
else else
settings settings
...@@ -114,6 +114,7 @@ class ProjectsController < ApplicationController ...@@ -114,6 +114,7 @@ class ProjectsController < ApplicationController
if request.post? if request.post?
@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)
redirect_to :action => 'settings', :id => @project redirect_to :action => 'settings', :id => @project
else else
settings settings
...@@ -126,6 +127,7 @@ class ProjectsController < ApplicationController ...@@ -126,6 +127,7 @@ class ProjectsController < ApplicationController
def add_version def add_version
@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)
redirect_to :action => 'settings', :id => @project redirect_to :action => 'settings', :id => @project
end end
end end
...@@ -135,7 +137,7 @@ class ProjectsController < ApplicationController ...@@ -135,7 +137,7 @@ class ProjectsController < ApplicationController
@member = @project.members.build(params[:member]) @member = @project.members.build(params[:member])
if request.post? if request.post?
if @member.save if @member.save
flash[:notice] = 'Member was successfully added.' flash[:notice] = l(:notice_successful_create)
redirect_to :action => 'settings', :id => @project redirect_to :action => 'settings', :id => @project
else else
settings settings
...@@ -160,6 +162,7 @@ class ProjectsController < ApplicationController ...@@ -160,6 +162,7 @@ class ProjectsController < ApplicationController
@attachment.author_id = self.logged_in_user.id if self.logged_in_user @attachment.author_id = self.logged_in_user.id if self.logged_in_user
end end
if @document.save if @document.save
flash[:notice] = l(:notice_successful_create)
redirect_to :action => 'list_documents', :id => @project redirect_to :action => 'list_documents', :id => @project
end end
end end
...@@ -188,7 +191,7 @@ class ProjectsController < ApplicationController ...@@ -188,7 +191,7 @@ class ProjectsController < ApplicationController
@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]) } @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]) }
@issue.custom_values = @custom_values @issue.custom_values = @custom_values
if @issue.save if @issue.save
flash[:notice] = "Issue was successfully added." flash[:notice] = l(:notice_successful_create)
Mailer.deliver_issue_add(@issue) if Permission.find_by_controller_and_action(@params[:controller], @params[:action]).mail_enabled? Mailer.deliver_issue_add(@issue) if Permission.find_by_controller_and_action(@params[:controller], @params[:action]).mail_enabled?
redirect_to :action => 'list_issues', :id => @project redirect_to :action => 'list_issues', :id => @project
end end
...@@ -243,6 +246,7 @@ class ProjectsController < ApplicationController ...@@ -243,6 +246,7 @@ class ProjectsController < ApplicationController
@news.attributes = params[:news] @news.attributes = params[:news]
@news.author_id = self.logged_in_user.id if self.logged_in_user @news.author_id = self.logged_in_user.id if self.logged_in_user
if @news.save if @news.save
flash[:notice] = l(:notice_successful_create)
redirect_to :action => 'list_news', :id => @project redirect_to :action => 'list_news', :id => @project
end end
end end
...@@ -260,6 +264,7 @@ class ProjectsController < ApplicationController ...@@ -260,6 +264,7 @@ class ProjectsController < ApplicationController
@attachment = @project.versions.find(params[:version_id]).attachments.build(params[:attachment]) @attachment = @project.versions.find(params[:version_id]).attachments.build(params[:attachment])
@attachment.author_id = self.logged_in_user.id if self.logged_in_user @attachment.author_id = self.logged_in_user.id if self.logged_in_user
if @attachment.save if @attachment.save
flash[:notice] = l(:notice_successful_create)
redirect_to :controller => 'projects', :action => 'list_files', :id => @project redirect_to :controller => 'projects', :action => 'list_files', :id => @project
end end
end end
...@@ -285,8 +290,7 @@ private ...@@ -285,8 +290,7 @@ private
# used as a before_filter # used as a before_filter
def find_project def find_project
@project = Project.find(params[:id]) @project = Project.find(params[:id])
rescue rescue
flash[:notice] = 'Project not found.'
redirect_to :action => 'list' redirect_to :action => 'list'
end end
end end
...@@ -33,7 +33,7 @@ class RolesController < ApplicationController ...@@ -33,7 +33,7 @@ class RolesController < ApplicationController
if request.post? if request.post?
@role.permissions = Permission.find(@params[:permission_ids]) if @params[:permission_ids] @role.permissions = Permission.find(@params[:permission_ids]) if @params[:permission_ids]
if @role.save if @role.save
flash[:notice] = 'Role was successfully created.' flash[:notice] = l(:notice_successful_create)
redirect_to :action => 'list' redirect_to :action => 'list'
end end
end end
...@@ -45,7 +45,7 @@ class RolesController < ApplicationController ...@@ -45,7 +45,7 @@ class RolesController < ApplicationController
if request.post? and @role.update_attributes(params[:role]) if request.post? and @role.update_attributes(params[:role])
@role.permissions = Permission.find(@params[:permission_ids] || []) @role.permissions = Permission.find(@params[:permission_ids] || [])
Permission.allowed_to_role_expired Permission.allowed_to_role_expired
flash[:notice] = 'Role was successfully updated.' flash[:notice] = l(:notice_successful_update)
redirect_to :action => 'list' redirect_to :action => 'list'
end end
@permissions = Permission.find(:all, :conditions => ["is_public=?", false], :order => 'sort ASC') @permissions = Permission.find(:all, :conditions => ["is_public=?", false], :order => 'sort ASC')
...@@ -73,7 +73,7 @@ class RolesController < ApplicationController ...@@ -73,7 +73,7 @@ class RolesController < ApplicationController
} }
} }
if @role.save if @role.save
flash[:notice] = 'Workflow was successfully updated.' flash[:notice] = l(:notice_successful_update)
end end
end end
@roles = Role.find_all @roles = Role.find_all
......
...@@ -16,8 +16,8 @@ ...@@ -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 TrackersController < ApplicationController class TrackersController < ApplicationController
layout 'base' layout 'base'
before_filter :require_admin before_filter :require_admin
def index def index
list list
...@@ -34,7 +34,7 @@ class TrackersController < ApplicationController ...@@ -34,7 +34,7 @@ class TrackersController < ApplicationController
def new def new
@tracker = Tracker.new(params[:tracker]) @tracker = Tracker.new(params[:tracker])
if request.post? and @tracker.save if request.post? and @tracker.save
flash[:notice] = 'Tracker was successfully created.' flash[:notice] = l(:notice_successful_create)
redirect_to :action => 'list' redirect_to :action => 'list'
end end
end end
...@@ -42,7 +42,7 @@ class TrackersController < ApplicationController ...@@ -42,7 +42,7 @@ class TrackersController < ApplicationController
def edit def edit
@tracker = Tracker.find(params[:id]) @tracker = Tracker.find(params[:id])
if request.post? and @tracker.update_attributes(params[:tracker]) if request.post? and @tracker.update_attributes(params[:tracker])
flash[:notice] = 'Tracker was successfully updated.' flash[:notice] = l(:notice_successful_update)
redirect_to :action => 'list' redirect_to :action => 'list'
end end
end end
......
...@@ -53,7 +53,7 @@ class UsersController < ApplicationController ...@@ -53,7 +53,7 @@ class UsersController < ApplicationController
@custom_values = UserCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x, :customized => @user, :value => params["custom_fields"][x.id.to_s]) } @custom_values = UserCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x, :customized => @user, :value => params["custom_fields"][x.id.to_s]) }
@user.custom_values = @custom_values @user.custom_values = @custom_values
if @user.save if @user.save
flash[:notice] = 'User was successfully created.' flash[:notice] = l(:notice_successful_create)
redirect_to :action => 'list' redirect_to :action => 'list'
end end
end end
...@@ -72,7 +72,7 @@ class UsersController < ApplicationController ...@@ -72,7 +72,7 @@ class UsersController < ApplicationController
@user.custom_values = @custom_values @user.custom_values = @custom_values
end end
if @user.update_attributes(params[:user]) if @user.update_attributes(params[:user])
flash[:notice] = 'User was successfully updated.' flash[:notice] = l(:notice_successful_update)
redirect_to :action => 'list' redirect_to :action => 'list'
end end
end end
......
...@@ -16,41 +16,42 @@ ...@@ -16,41 +16,42 @@
# 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 VersionsController < ApplicationController class VersionsController < ApplicationController
layout 'base' layout 'base'
before_filter :find_project, :authorize before_filter :find_project, :authorize
def edit def edit
if request.post? and @version.update_attributes(params[:version]) if request.post? and @version.update_attributes(params[:version])
flash[:notice] = 'Version was successfully updated.' flash[:notice] = l(:notice_successful_update)
redirect_to :controller => 'projects', :action => 'settings', :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', :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', :id => @project redirect_to :controller => 'projects', :action => 'settings', :id => @project
end end
def download def download
@attachment = @version.attachments.find(params[:attachment_id]) @attachment = @version.attachments.find(params[:attachment_id])
@attachment.increment_download @attachment.increment_download
send_file @attachment.diskfile, :filename => @attachment.filename send_file @attachment.diskfile, :filename => @attachment.filename
rescue rescue
flash[:notice]="Requested file doesn't exist or has been deleted." flash[:notice] = l(:notice_file_not_found)
redirect_to :controller => 'projects', :action => 'list_files', :id => @project redirect_to :controller => 'projects', :action => 'list_files', :id => @project
end end
def destroy_file def destroy_file
@version.attachments.find(params[:attachment_id]).destroy @version.attachments.find(params[:attachment_id]).destroy
flash[:notice] = l(:notice_successful_delete)
redirect_to :controller => 'projects', :action => 'list_files', :id => @project redirect_to :controller => 'projects', :action => 'list_files', :id => @project
end end
private private
def find_project def find_project
@version = Version.find(params[:id]) @version = Version.find(params[:id])
@project = @version.project @project = @version.project
end end
end end
...@@ -92,6 +92,6 @@ module ApplicationHelper ...@@ -92,6 +92,6 @@ module ApplicationHelper
end end
def lang_options_for_select def lang_options_for_select
GLoc.valid_languages.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
end end
...@@ -20,24 +20,27 @@ module CustomFieldsHelper ...@@ -20,24 +20,27 @@ module CustomFieldsHelper
def custom_field_tag(custom_value) def custom_field_tag(custom_value)
custom_field = custom_value.custom_field custom_field = custom_value.custom_field
field_name = "custom_fields[#{custom_field.id}]" field_name = "custom_fields[#{custom_field.id}]"
field_id = "custom_fields_#{custom_field.id}"
case custom_field.field_format case custom_field.field_format
when "string", "int", "date" when "string", "int", "date"
text_field_tag field_name, custom_value.value text_field_tag field_name, custom_value.value, :id => field_id
when "text" when "text"
text_area_tag field_name, custom_value.value, :cols => 60, :rows => 3 text_area_tag field_name, custom_value.value, :id => field_id, :cols => 60, :rows => 3
when "bool" when "bool"
check_box_tag(field_name, "1", custom_value.value == "1") + check_box_tag(field_name, "1", custom_value.value == "1", :id => field_id) +
hidden_field_tag(field_name, "0") hidden_field_tag(field_name, "0")
when "list" when "list"
select_tag field_name, select_tag field_name,
"<option></option>" + options_for_select(custom_field.possible_values.split('|'), "<option></option>" + options_for_select(custom_field.possible_values.split('|'),
custom_value.value) custom_value.value), :id => field_id
end end
end end
def custom_field_label_tag(custom_value) def custom_field_label_tag(custom_value)
content_tag "label", custom_value.custom_field.name + content_tag "label", custom_value.custom_field.name +
(custom_value.custom_field.is_required? ? " <span class=\"required\">*</span>" : "") (custom_value.custom_field.is_required? ? " <span class=\"required\">*</span>" : ""),
:for => "custom_fields_#{custom_value.custom_field.id}"
end end
def custom_field_tag_with_label(custom_value) def custom_field_tag_with_label(custom_value)
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<div class="splitcontentleft"> <div class="splitcontentleft">
<div class="box"> <div class="box">
<h3><%=l(:label_information_plural)%></h3> <h3><%=l(:label_information_plural)%></h3>
&nbsp;
<%= start_form_tag :action => 'my_account' %> <%= start_form_tag :action => 'my_account' %>
<!--[form:user]--> <!--[form:user]-->
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<%= text_field 'user', 'lastname' %></p> <%= text_field 'user', 'lastname' %></p>
<p><label for="user_mail"><%=l(:field_mail)%> <span class="required">*</span></label><br/> <p><label for="user_mail"><%=l(:field_mail)%> <span class="required">*</span></label><br/>
<%= text_field 'user', 'mail' %></p> <%= text_field 'user', 'mail', :size => 40 %></p>
<p><label for="user_language"><%=l(:field_language)%></label><br/> <p><label for="user_language"><%=l(:field_language)%></label><br/>
<%= select("user", "language", lang_options_for_select) %></p> <%= select("user", "language", lang_options_for_select) %></p>
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
<% unless @user.auth_source_id %> <% unless @user.auth_source_id %>
<div class="box"> <div class="box">
<h3><%=l(:field_password)%></h3> <h3><%=l(:field_password)%></h3>
&nbsp;
<%= start_form_tag :action => 'change_password' %> <%= start_form_tag :action => 'change_password' %>
<p><label for="password"><%=l(:field_password)%> <span class="required">*</span></label><br/> <p><label for="password"><%=l(:field_password)%> <span class="required">*</span></label><br/>
......
...@@ -3,10 +3,19 @@ ...@@ -3,10 +3,19 @@
<p><%=l(:text_select_mail_notifications)%></p> <p><%=l(:text_select_mail_notifications)%></p>
<%= start_form_tag ({}, :id => 'mail_options_form')%> <%= start_form_tag ({}, :id => 'mail_options_form')%>
<% for action in @actions %>
<%= check_box_tag "action_ids[]", action.id, action.mail_enabled? %> <% actions = @actions.group_by {|p| p.group_id } %>
<%= action.description %><br /> <% actions.keys.sort.each do |group_id| %>
<fieldset style="margin-top: 6px;"><legend><strong><%= l(Permission::GROUPS[group_id]) %></strong></legend>
<% actions[group_id].each do |p| %>
<div style="width:170px;float:left;"><%= check_box_tag "action_ids[]", p.id, p.mail_enabled? %>
<%= l(p.description.to_sym) %>
</div>
<% end %>
</fieldset>
<% end %> <% end %>
<br /> <br />
<p> <p>
<a href="javascript:checkAll('mail_options_form', true)"><%=l(:button_check_all)%></a> | <a href="javascript:checkAll('mail_options_form', true)"><%=l(:button_check_all)%></a> |
......
...@@ -56,11 +56,9 @@ ...@@ -56,11 +56,9 @@
<div class="box"> <div class="box">
<h3><%=l(:label_news_latest)%></h3> <h3><%=l(:label_news_latest)%></h3>
<% for news in @news %> <% for news in @news %>
<p> <p><b><%= news.title %></b> <small>(<%= link_to_user news.author %> <%= format_time(news.created_on) %>)</small><br />
<b><%= news.title %></b> <small>(<%= link_to_user news.author %> <%= format_time(news.created_on) %>)</small><br />
<%= news.summary %> <%= news.summary %>
<small>[<%= link_to l(:label_read), :controller => 'news', :action => 'show', :id => news %>]</small> <small>[<%= link_to l(:label_read), :controller => 'news', :action => 'show', :id => news %>]</small></p>
</p>
<hr /> <hr />
<% end %> <% end %>
<center><small>[ <%= link_to l(:label_news_view_all), :controller => 'projects', :action => 'list_news', :id => @project %> ]</small></center> <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,16 +32,16 @@ activerecord_error_wrong_length: is the wrong length
activerecord_error_taken: has already been taken activerecord_error_taken: has already been taken
activerecord_error_not_a_number: is not a number activerecord_error_not_a_number: is not a number
general_fmt_age: %d yr general_fmt_age: %d año
general_fmt_age_plural: %d yrs general_fmt_age_plural: %d años
general_fmt_date: %%b %%d, %%Y (%%a) general_fmt_date: %%d/%%m/%%Y
general_fmt_datetime: %%b %%d, %%Y (%%a), %%I:%%M %%p general_fmt_datetime: %%d/%%m/%%Y %%H:%%M
general_fmt_datetime_short: %%b %%d, %%I:%%M %%p general_fmt_datetime_short: %%d/%%m %%H:%%M
general_fmt_time: %%I:%%M %%p general_fmt_time: %%H:%%M
general_text_No: 'No' general_text_No: 'No'
general_text_Yes: 'Yes' general_text_Yes: ''
general_text_no: 'no' general_text_no: 'no'
general_text_yes: 'yes' general_text_yes: ''
general_lang_es: 'Español' general_lang_es: 'Español'
notice_account_updated: Account was successfully updated. notice_account_updated: Account was successfully updated.
...@@ -60,7 +60,7 @@ notice_successful_connection: Successful connection. ...@@ -60,7 +60,7 @@ notice_successful_connection: Successful connection.
notice_file_not_found: Requested file doesn't exist or has been deleted. notice_file_not_found: Requested file doesn't exist or has been deleted.
gui_validation_error: 1 error gui_validation_error: 1 error
gui_validation_error_plural: %d errors gui_validation_error_plural: %d errores
field_name: Nombre field_name: Nombre
field_description: Descripción field_description: Descripción
...@@ -70,12 +70,12 @@ field_firstname: Nombre ...@@ -70,12 +70,12 @@ field_firstname: Nombre
field_lastname: Apellido field_lastname: Apellido
field_mail: Email field_mail: Email
field_filename: Fichero field_filename: Fichero
#field_filesize: Size field_filesize: Tamaño
field_downloads: Telecargas field_downloads: Telecargas
field_author: Autor field_author: Autor
field_created_on: Creado field_created_on: Creado
field_updated_on: Actualizado field_updated_on: Actualizado
#field_field_format: Format field_field_format: Formato
field_is_for_all: Para todos los proyectos field_is_for_all: Para todos los proyectos
field_possible_values: Valores posibles field_possible_values: Valores posibles
field_regexp: Expresión regular field_regexp: Expresión regular
...@@ -87,7 +87,7 @@ field_title: Título ...@@ -87,7 +87,7 @@ field_title: Título
field_project: Proyecto field_project: Proyecto
field_issue: Petición field_issue: Petición
field_status: Estatuto field_status: Estatuto
#field_notes: Notes field_notes: Notas
field_is_closed: Petición resuelta field_is_closed: Petición resuelta
field_is_default: Estatuto por defecto field_is_default: Estatuto por defecto
field_html_color: Color field_html_color: Color
...@@ -165,7 +165,7 @@ label_information: Informacion ...@@ -165,7 +165,7 @@ label_information: Informacion
label_information_plural: Informaciones label_information_plural: Informaciones
label_please_login: Conexión label_please_login: Conexión
#label_register: Register #label_register: Register
#label_password_lost: Lost password label_password_lost: ¿Olvidaste la contraseña?
label_home: Acogida label_home: Acogida
label_my_page: Mi página label_my_page: Mi página
label_my_account: Mi cuenta label_my_account: Mi cuenta
...@@ -222,7 +222,7 @@ label_version: Versión ...@@ -222,7 +222,7 @@ label_version: Versión
label_version_new: Nueva versión label_version_new: Nueva versión
label_version_plural: Versiónes label_version_plural: Versiónes
label_confirmation: Confirmación label_confirmation: Confirmación
#label_export_csv: Export to CSV label_export_csv: Exportar a CSV
label_read: Leer... label_read: Leer...
label_public_projects: Proyectos publicos label_public_projects: Proyectos publicos
label_open_issues: Abierta label_open_issues: Abierta
...@@ -265,9 +265,9 @@ text_min_max_length_info: 0 para ninguna restricción ...@@ -265,9 +265,9 @@ text_min_max_length_info: 0 para ninguna restricción
text_project_destroy_confirmation: ¿ Estás seguro de querer eliminar el proyecto ? text_project_destroy_confirmation: ¿ Estás seguro de querer eliminar el proyecto ?
text_workflow_edit: Seleccionar un workflow para actualizar text_workflow_edit: Seleccionar un workflow para actualizar
#default_role_manager: Manager default_role_manager: Manager
#default_role_developper: Developer default_role_developper: Desarrollador
#default_role_reporter: Reporter default_role_reporter: Informador
default_tracker_bug: Anomalía default_tracker_bug: Anomalía
default_tracker_feature: Evolución default_tracker_feature: Evolución
default_tracker_support: Asistencia default_tracker_support: Asistencia
......
...@@ -150,7 +150,7 @@ background-color:inherit; ...@@ -150,7 +150,7 @@ background-color:inherit;
} }
#content h2 a{font-weight:normal;} #content h2 a{font-weight:normal;}
#content h3{margin:0 0 5px 0; font-size:1.4em; letter-spacing:-1px;} #content h3{margin:0 0 12px 0; font-size:1.4em; letter-spacing:-1px;}
#content a:hover,#subcontent a:hover{text-decoration:underline;} #content a:hover,#subcontent a:hover{text-decoration:underline;}
#content ul,#content ol{margin:0 5px 16px 35px;} #content ul,#content ol{margin:0 5px 16px 35px;}
#content dl{margin:0 5px 10px 25px;} #content dl{margin:0 5px 10px 25px;}
...@@ -255,7 +255,7 @@ tr.even { ...@@ -255,7 +255,7 @@ tr.even {
background-color:#CEE1ED; background-color:#CEE1ED;
} }
hr { border:0px; border-bottom:1px dashed #000000; } hr { border:none; border-bottom: dotted 2px #c0c0c0; }
/**************** Sidebar styles ****************/ /**************** Sidebar styles ****************/
......
...@@ -39,10 +39,15 @@ class AccountTest < ActionController::IntegrationTest ...@@ -39,10 +39,15 @@ class AccountTest < ActionController::IntegrationTest
post "account/change_password", :password => 'jsmith', :new_password => "hello", :new_password_confirmation => "hello2" post "account/change_password", :password => 'jsmith', :new_password => "hello", :new_password_confirmation => "hello2"
assert_response :success assert_response :success
assert_template "account/my_account"
assert_tag :tag => "div", :attributes => { :class => "errorExplanation" } assert_tag :tag => "div", :attributes => { :class => "errorExplanation" }
post "account/change_password", :password => 'jsmithZZ', :new_password => "hello", :new_password_confirmation => "hello"
assert_redirected_to "account/my_account"
assert_equal 'Wrong password', flash[:notice]
post "account/change_password", :password => 'jsmith', :new_password => "hello", :new_password_confirmation => "hello" post "account/change_password", :password => 'jsmith', :new_password => "hello", :new_password_confirmation => "hello"
assert_response :success assert_redirected_to "account/my_account"
log_user('jsmith', 'hello') log_user('jsmith', 'hello')
end end
......
...@@ -47,7 +47,7 @@ class AdminTest < ActionController::IntegrationTest ...@@ -47,7 +47,7 @@ class AdminTest < ActionController::IntegrationTest
assert_template "projects/add" assert_template "projects/add"
post "projects/add", :project => { :name => "blog", :description => "weblog", :is_public => 1} post "projects/add", :project => { :name => "blog", :description => "weblog", :is_public => 1}
assert_redirected_to "admin/projects" assert_redirected_to "admin/projects"
assert_equal 'Project was successfully created.', flash[:notice] assert_equal 'Successful creation.', flash[:notice]
project = Project.find_by_name("blog") project = Project.find_by_name("blog")
assert_kind_of Project, project assert_kind_of Project, project
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment