Changeset 710
- Timestamp:
- 10/26/07 13:15:15 (1 year ago)
- Files:
-
- trunk/app/controllers/application.rb (modified) (2 diffs)
- trunk/app/controllers/customer_interface_controller.rb (added)
- trunk/app/controllers/task_controller.rb (modified) (3 diffs)
- trunk/app/controllers/user_controller.rb (modified) (4 diffs)
- trunk/app/helpers/application_helper.rb (modified) (1 diff)
- trunk/app/helpers/customer_interface_helper.rb (added)
- trunk/app/models/asset.rb (modified) (1 diff)
- trunk/app/models/customer.rb (modified) (1 diff)
- trunk/app/models/protected_data.rb (modified) (1 diff)
- trunk/app/models/task.rb (modified) (2 diffs)
- trunk/app/models/task_type.rb (modified) (2 diffs)
- trunk/app/models/timeline_event.rb (modified) (2 diffs)
- trunk/app/views/customer_interface (added)
- trunk/app/views/customer_interface/_asset_list.rhtml (added)
- trunk/app/views/customer_interface/_edit_my_information.rhtml (added)
- trunk/app/views/customer_interface/_item_list.rhtml (added)
- trunk/app/views/customer_interface/_list_pagination.rhtml (added)
- trunk/app/views/customer_interface/edit_my_information.rhtml (added)
- trunk/app/views/customer_interface/index.rhtml (added)
- trunk/app/views/layouts/customer_interface.rhtml (added)
- trunk/app/views/shared/_create_or_edit.rhtml (modified) (2 diffs)
- trunk/app/views/shared/change_password.rhtml (moved) (moved from trunk/app/views/user/change_password.rhtml) (1 diff)
- trunk/config/menu.rb (modified) (1 diff)
- trunk/db/migrate/009_create_customers.rb (modified) (1 diff)
- trunk/db/migrate/010_customer_interface_data.rb (added)
- trunk/lib/graph.rb (modified) (11 diffs)
- trunk/lib/localization.rb (modified) (2 diffs)
- trunk/po/fi_FI/norfello_cmms.po (modified) (50 diffs)
- trunk/public/images/customer_interface (added)
- trunk/public/images/customer_interface/background_box_title.jpg (added)
- trunk/public/images/customer_interface/background_nav.jpg (added)
- trunk/public/images/customer_interface/header_customer_interface.jpg (added)
- trunk/public/images/customer_interface/logout.jpg (added)
- trunk/public/images/customer_interface/norfello_cmms_header.jpg (added)
- trunk/public/images/customer_interface/submit_service_request.jpg (added)
- trunk/public/stylesheets/customer_interface_assets.css (added)
- trunk/public/stylesheets/customer_interface_base.css (added)
- trunk/public/stylesheets/customer_interface_forms.css (added)
- trunk/public/stylesheets/customer_interface_lists.css (added)
- trunk/public/stylesheets/customer_interface_timeline.css (added)
- trunk/test/functional/customer_interface_controller_test.rb (added)
- trunk/test/functional/task_controller_test.rb (modified) (2 diffs)
- trunk/test/functional/user_controller_test.rb (modified) (3 diffs)
- trunk/test/test_helper.rb (modified) (1 diff)
- trunk/test/unit/asset_test.rb (modified) (2 diffs)
- trunk/test/unit/protected_data_test.rb (modified) (4 diffs)
- trunk/test/unit/task_test.rb (modified) (1 diff)
- trunk/test/unit/task_type_test.rb (modified) (1 diff)
- trunk/test/unit/timeline_event_test.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/app/controllers/application.rb
r707 r710 206 206 login = session[:user].login if session[:user] 207 207 ActiveRecord::Base.logged_information(login, request.remote_ip) 208 @message_count = session[:user].received_messages.count(:conditions => "unread = '1'") 209 @message_id = session[:user].received_messages.find(:first, :conditions => "unread = '1'").id if @message_count == 1 208 if UserAccount.current_user.is_a?(User) 209 @message_count = session[:user].received_messages.count(:conditions => "unread = '1'") 210 @message_id = session[:user].received_messages.find(:first, :conditions => "unread = '1'").id if @message_count == 1 211 end 210 212 GetText.locale = session[:user].lang 211 213 end … … 432 434 info('Password reseted for %s %s' % [model_class.model_name, @model.login]) 433 435 redirect_to(@redirect) 436 return 434 437 else 435 438 flash[:error] = _('Unable to reset password') 436 render(:template => 'shared/reset_password') 437 end 438 else 439 render(:template => 'shared/reset_password') 440 end 439 end 440 end 441 442 render(:template => 'shared/reset_password') 443 end 444 445 # Method: common_change_password 446 # ============================= 447 # Contains common code for all password changing actions of different 448 # controllers. The name of the actions has to be change_password. 449 # 450 # Parameters: 451 # ----------- 452 # model_class - The class object of the model whose instance's password 453 # should be changed. 454 # redirect - A dictionary specifying the url to which the client should 455 # be redirected when password is changed or changing 456 # is cancelled. 457 # 458 def common_change_password(model_class, redirect={:action => 'edit_my_information'}) 459 @title = _('Change password') 460 @user = model_class.find session[:user].id 461 462 if request.post? 463 if model_class.authenticate(@user.login, params[:password][:old_password]) == @user 464 @user.password = params[:password][:new_password] 465 @user.password_confirmation = params[:password][:new_password_confirmation] 466 if @user.save 467 flash[:notice] = _('Your password has been changed') 468 redirect_to(redirect) 469 return 470 else 471 flash[:error] = _('Unable to change your password') 472 end 473 else 474 flash[:error] = _('Invalid password') 475 end 476 end 477 478 render(:template => 'shared/change_password') 441 479 end 442 480 trunk/app/controllers/task_controller.rb
r705 r710 43 43 ] 44 44 45 user_options = @selected_asset.users.collect { |user| [user.login_and_name, user.id] }46 45 asset_options = Asset.find_authorized_to(:create_task, [:all]).collect { |a| [a.full_code, a.id] } 47 46 @actions = [] … … 61 60 find_selected_assets 62 61 conditions = @selected_assets_condition 62 conditions[0] = "(#{conditions[0]}) AND task_type_id != ?" 63 conditions.push(TaskType.get_service_request_type.id) 63 64 64 65 @items = items_for_page(Task, :finder_method => :find_authorized_to_read, :conditions => conditions, :readonly => true) … … 386 387 end 387 388 389 # Method: list_service_requests 390 # ============================= 391 # Shows a list of service requests task 392 # 393 def list_service_requests 394 define_priority_options 395 @fields = [ 396 [_('ID'), :self, 'id'], 397 [_('State'), {:name => :state}.merge(@state_to_text), 'state'], 398 [_('Description'), :short_description, 'short_description'], 399 [_('Created at'), :created_at, 'created_at'], 400 [_('Asset'), :asset, 'asset_id'] 401 ] 402 403 asset_options = Asset.find_authorized_to(:create_task, [:all]).collect { |a| [a.full_code, a.id] } 404 @actions = [] 405 @check_title = _('Select') 406 @list_actions = [ 407 { :name => _('Remove'), :url => {:action => 'remove'} }, 408 { :name => _('Move'), :url => {:action => 'move'}, 409 :fields => [ [_('Asset'), :our_select_tag, 'asset_id', asset_options] ] } 410 ] 411 412 if session[:select_branches] 413 @title = _('Service requests for selected assets in branch %s', @selected_asset.code_and_name) 414 else 415 @title = _('Service requests for asset %s', @selected_asset.code_and_name) 416 end 417 418 find_selected_assets 419 conditions = @selected_assets_condition 420 conditions[0] = "(#{conditions[0]}) AND task_type_id = ?" 421 conditions.push(TaskType.get_service_request_type.id) 422 423 @items = items_for_page(Task, :finder_method => :find_authorized_to_read, :conditions => conditions, :readonly => true) 424 common_list 425 end 426 388 427 protected 389 428 trunk/app/controllers/user_controller.rb
r707 r710 193 193 if request.post? 194 194 if user = UserAccount.authenticate(params[:user_login], params[:user_password]) 195 if user.i s_a?(User)195 if user.instance_of?(User) 196 196 # Check that user has some keys 197 197 if user.keyrings.empty? … … 225 225 redirect_back_or_default :controller => 'asset', :action => "view" 226 226 227 elsif user.i s_a?(Customer)227 elsif user.instance_of?(Customer) 228 228 # Check that customer is authorized to read at least one asset. 229 229 if user.assets.empty? … … 235 235 end 236 236 237 # FIXME: Remove the following two lines when the customer interface is ready to be used 238 render(:text => 'Customer login is NOT implemented yet!') 239 return 240 redirect_to(controller => 'customer_interface', :action => 'index') 237 redirect_to(:controller => 'customer_interface', :action => 'index') 241 238 else 242 239 # This should never happen … … 355 352 356 353 def change_password 357 @title = _('Change password') 358 @user = User.find session[:user].id 359 360 if request.post? 361 if User.authenticate(@user.login, params[:password][:old_password]) == @user 362 @user.password = params[:password][:new_password] 363 @user.password_confirmation = params[:password][:new_password_confirmation] 364 if @user.save 365 flash[:notice] = _('Your password has been changed') 366 redirect_to :action => 'edit_my_information' 367 else 368 flash[:error] = _('Unable to change your password') 369 end 370 else 371 flash[:error] = _('Invalid password') 372 end 373 end 354 common_change_password(User, {:action => 'edit_my_information'}) 374 355 end 375 356 trunk/app/helpers/application_helper.rb
r703 r710 621 621 622 622 return result 623 end624 625 # Function: input_field_with_enable_check_box626 # ===========================================627 #628 # Returns form input field row with enabling check_box, to be used in form table.629 #630 def input_field_with_enable_check_box(field_text, field, object_name, method, options, check_box_name, check_box_value = '1', check_box_options = {})631 object = self.instance_variable_get('@' + object_name.to_s)632 checked = (object.send(method) != nil)633 634 '<tr><th>' +635 check_box_tag(check_box_name, check_box_value, checked, check_box_options) +636 h(field_text) +637 '</th><td>' +638 send(field, object_name, method, options) +639 '</td></tr>'640 623 end 641 624 trunk/app/models/asset.rb
r707 r710 282 282 # Returns true if the user is authorized to create tasks to this asset 283 283 def authorized_to_create_task? 284 # Customer is authorized to create tasks to his assets if he has a service_request_type. 285 if UserAccount.current_user.class == Customer 286 return false unless UserAccount.current_user.service_request_type 287 return (self.customer == UserAccount.current_user) 288 end 284 # Customer is authorized to create tasks to his assets 285 return (self.customer == UserAccount.current_user) if UserAccount.current_user.class == Customer 289 286 290 287 return authorized_to(:create_task) trunk/app/models/customer.rb
r708 r710 30 30 ACTION_KEYS = [ 31 31 'customer_interface/index', 32 'customer_interface/submit_service_request' 32 'asset_type_icon/view', 33 'customer_interface/submit_service_request', 34 'customer_interface/edit_my_information', 35 'customer_interface/change_password' 33 36 ] 34 37 trunk/app/models/protected_data.rb
r707 r710 297 297 # This is needed because some databases support microseconds (PostgreSQL >= 8.2) 298 298 # and some don't. Also after saving a new record created_at always 299 # contains fractions of second and after finding a record it doesn't i t300 # doesn't ifthe database doesn't support them.299 # contains fractions of second and after finding a record it doesn't if 300 # the database doesn't support them. 301 301 def round_created_at 302 302 self.created_at = Time.at(self.created_at.to_i) trunk/app/models/task.rb
r707 r710 11 11 validates_presence_of :short_description 12 12 validates_length_of :short_description, :maximum => 100 13 validates_presence_of :task_type 13 14 # Callbacks 14 15 after_find :save_original_state 16 before_validation_on_create :set_asset_if_customer 17 before_validation_on_create :set_task_type_if_customer 15 18 # Associations 16 19 belongs_to :task_type … … 292 295 end 293 296 end 297 298 # Method: set_asset_if_customer 299 # ============================= 300 # Set the asset attribute when a <Customer> is creating a task which 301 # doesn't belong to an asset. Customer's first asset is used. 302 # 303 def set_asset_if_customer 304 return true unless UserAccount.current_user.is_a?(Customer) 305 return true if self.asset 306 asset = UserAccount.current_user.assets.find(:first, :order => 'id') 307 unless asset 308 _error("Customer '%' can't create tasks because she has no assets.") 309 return false 310 end 311 self.asset = asset 312 end 313 314 # Method: set_task_type_if_customer 315 # ================================= 316 # Set the task type to be the service request type. 317 # Makes sure that a <Customer> always creates a service request task. 318 # 319 def set_task_type_if_customer 320 return true unless UserAccount.current_user.is_a?(Customer) 321 self.task_type = TaskType.get_service_request_type 322 return true 323 end 294 324 end trunk/app/models/task_type.rb
r707 r710 15 15 # Callbacks 16 16 before_validation :check_notification_email 17 after_save :update_is_service_request_type 17 before_save :store_service_request_type_id 18 after_save :update_service_request_type 18 19 # Associations 19 20 has_many :tasks … … 54 55 end 55 56 56 # Method: update_ is_service_request_type57 # =================================== ===57 # Method: update_service_request_type 58 # =================================== 58 59 # Makes sure that only one record can have the is_service_request_type 59 60 # attribute true. When the attribute is set to true for a record, it 60 61 # will be set to false for all other records. 61 62 # 62 def update_is_service_request_type 63 TaskType.update_all(['is_service_request_type = ?', false], ['id != ? AND is_service_request_type = ?', self.id, true]) if self.is_service_request_type 63 # Updates the task type attribute for all existing open service requests 64 # when the service request type is changed. Makes sure all open service 65 # request have the same task type, i.e. the one returned by the 66 # TaskType.get_service_request_type class method. 67 # 68 def update_service_request_type 69 if self.is_service_request_type and self.id != @old_service_request_type_id 70 TaskType.update_all(['is_service_request_type = ?', false], ['id != ? AND is_service_request_type = ?', self.id, true]) 71 72 Task.update_all(['task_type_id = ?', self.id], ['task_type_id = ? AND state != ?', @old_service_request_type_id, Task.CLOSED]) if @old_service_request_type_id 73 end 74 return true 75 end 76 77 # Method: store_service_request_type_id 78 # ===================================== 79 # If this is the service request type, loads the current service request 80 # type and stores its id. 81 # 82 def store_service_request_type_id 83 if self.is_service_request_type 84 srt = TaskType.get_service_request_type 85 @old_service_request_type_id = srt.id if srt 86 end 64 87 return true 65 88 end trunk/app/models/timeline_event.rb
r707 r710 8 8 # Callbacks 9 9 # Associations 10 belongs_to :creator, :class_name => 'User ', :foreign_key => 'created_by'10 belongs_to :creator, :class_name => 'UserAccount', :foreign_key => 'created_by' 11 11 12 12 # Like belongs_to association. In addition sets "asset model" for this data model … … 31 31 end 32 32 33 # Method: asset 34 # ============= 35 # Returns the <Asset> this event belongs to. 36 # 37 def asset 38 return self.data_model.asset 39 end 40 33 41 protected 34 42 trunk/app/views/shared/_create_or_edit.rhtml
r530 r710 31 31 </tr> 32 32 <%= markup_text_area('model', *field[2..-1]) %> 33 <% when :input_field_with_enable_check_box -%>34 <%= input_field_with_enable_check_box(field[0], field[2], 'model', *field[3..-1]) %>35 33 <% when :optional_select_tag %> 36 34 <tr> … … 61 59 <%= buttons_table(submit_text, cancel_url_options) %> 62 60 </form> 63 64 <script type="text/javascript">65 Event.observe(window, 'load', update_field_enabled);66 </script>trunk/app/views/shared/change_password.rhtml
r511 r710 1 1 <%= error_messages_for 'user' %> 2 2 3 <%= form_tag :action => 'change_password'%>3 <%= form_tag(:action => 'change_password') %> 4 4 <table class="form"> 5 5 <tr> trunk/config/menu.rb
r707 r710 43 43 MenuButton.new(_('Tasks'), '22x22/menu_task.gif', 44 44 MenuItem.new(_('List'), 'task', 'list', '16x16/list.gif'), 45 MenuItem.new(_('List service requests'), 'task', 'list_service_requests', '16x16/list.gif'), 45 46 MenuItem.new(_('Create'), 'task', 'create', '16x16/create.gif'), 46 47 Page.new('task', 'move'), trunk/db/migrate/009_create_customers.rb
r708 r710 61 61 keyrings = TempKeyring.find(:all, :order => 'id', :readonly => true) 62 62 puts '' 63 puts 'Choose a keyring where you want add the new keys for the customer'63 puts 'Choose a keyring where you want to add the new keys for the customer' 64 64 puts 'administering functions. You should choose your administrative keyring.' 65 65 trunk/lib/graph.rb
r485 r710 16 16 17 17 18 def pie(width, height, data, titles=[], draw_labels=true)18 def Graph.pie(width, height, data, titles=[], draw_labels=true, legend_position=:bottom) 19 19 # Remove zero values 20 20 zero_indices = [] … … 40 40 41 41 # Calculate the coordinates and width and height 42 x, y = width / 2, height / 2 - height / 5 43 rw, rh = (x - 22).to_f, (height / 4).to_f 42 if legend_position == :right 43 x, y = (width - 180) / 2, height / 2 - 12 44 rw, rh = (x - 20).to_f, (y - 10).to_f 45 else # :bottom 46 x, y = width / 2, height / 2 - height / 5 47 rw, rh = (x - 22).to_f, (height / 4).to_f 48 end 44 49 45 50 draw.translate(x, y) … … 55 60 56 61 # Calculate the start coordinates on the circumference 57 values[:start_x] = rw * cos(last_angle)58 values[:start_y] = rh * sin(last_angle)62 values[:start_x] = rw * Math.cos(last_angle) 63 values[:start_y] = rh * Math.sin(last_angle) 59 64 60 65 # Calculate the angle … … 64 69 65 70 # Calculate the end coordinates on the circumference 66 values[:end_x] = rw * cos(last_angle)67 values[:end_y] = rh * sin(last_angle)71 values[:end_x] = rw * Math.cos(last_angle) 72 values[:end_y] = rh * Math.sin(last_angle) 68 73 69 74 if values[:angle] > Math::PI … … 139 144 140 145 # Calculate text coordinates. Center it on the slice. 141 text_x = (rw * cos(v[:start_angle] + v[:angle] / 2.0)).to_i142 text_y = (rh * sin(v[:start_angle] + v[:angle] / 2.0) + 4).to_i146 text_x = (rw * Math.cos(v[:start_angle] + v[:angle] / 2.0)).to_i 147 text_y = (rh * Math.sin(v[:start_angle] + v[:angle] / 2.0) + 4).to_i 143 148 144 149 # Draw background … … 159 164 160 165 # Draw the legend 161 draw_legend(width, height, titles, img) 166 if legend_position == :right 167 draw_legend_to_right_side(width - 178, titles, img) 168 else 169 draw_legend(width, height, titles, img) 170 end 162 171 163 172 draw.draw img … … 167 176 168 177 169 170 def bar(width, height, data, titles=[], draw_labels=true) 178 def Graph.bar(width, height, data, titles=[], draw_labels=true) 171 179 # Make the image 172 180 img = Magick::Image.new(width, height) { … … 247 255 248 256 249 250 def line(width, height, data, titles=[], draw_labels=true, filled=false) 257 def Graph.line(width, height, data, titles=[], draw_labels=true, filled=false) 251 258 # Make the image 252 259 img = Magick::Image.new(width, height) { … … 314 321 end 315 322 316 317 323 protected 318 324 319 def draw_legend(width, height, titles, img)325 def Graph.draw_legend(width, height, titles, img) 320 326 draw = Magick::Draw.new 321 327 … … 373 379 374 380 375 376 def prepare_graph(width, height, max, titles, img) 381 # Method; Graph.draw_legend_to_right_side 382 # ======================================= 383 # Draw a legend column to the right side of the given image. 384 # 385 # Parameters: 386 # ----------- 387 # x_position - x-coordinate for the legend column 388 # titles - Legend titles 389 # img - Image where to draw 390 # 391 def Graph.draw_legend_to_right_side(x_position, titles, img) 392 draw = Magick::Draw.new 393 394 # 395 # Draw the legend 396 # 397 draw.pointsize 10 398 draw.translate(x_position, 15) 399 draw.text_align Magick::LeftAlign 400 401 y = 0 402 403 for i in (0..titles.length - 1) 404 # Draw the color box 405 draw.fill(COLORS[i]) 406 draw.stroke(SHADES[i]) 407 draw.stroke_width(1) 408 draw.stroke_opacity('80%') 409 draw.rectangle(0, y, 10, y + 10) 410 411 # Draw the text 412 draw.stroke('none') 413 draw.fill('black') 414 415 draw.text(16, y + 10, titles[i]) 416 417 # Calculate the new coordinates 418 break if i == titles.length - 1 419 y += 15 420 end 421 422 draw.draw img 423 end 424 425 426 def Graph.prepare_graph(width, height, max, titles, img) 377 427 # Find a good divisor 378 428 divisors = [1, 5, 10, 20, 50, 100, 200, 500, 1000, 10000, 20000, 50000] … … 429 479 end 430 480 431 private432 481 433 482 # Returns approximate point length for the string +text+. 434 483 # FIXME: This is a dirty hack! Fails miserably if the text contains non-latin characters. 435 def text_length(text)484 def Graph.text_length(text) 436 485 length = 0.0 437 486 very_small = /[il]/ trunk/lib/localization.rb
r617 r710 11 11 # Returns the given date's or datetime's textual representation in the 12 12 # format specified for the current locale. 13 def self.format_date(date_or_datetime, date_format=nil, time_format=nil )13 def self.format_date(date_or_datetime, date_format=nil, time_format=nil, format_string=nil) 14 14 bindtextdomain('norfello_cmms') 15 15 return _('(Not specified)') unless date_or_datetime … … 19 19 20 20 time_format ||= _('%H:%M:%S') 21 return date_or_datetime.strftime("#{date_format} #{time_format}") 21 format_string ||= '%s %s' 22 return date_or_datetime.strftime(format_string % [date_format, time_format]) 22 23 end 23 24 trunk/po/fi_FI/norfello_cmms.po
r709 r710 2 2 msgstr "" 3 3 "Project-Id-Version: NorfelloCMMS SVN trunk\n" 4 "POT-Creation-Date: 2007-10- 03 18:09+0300\n"5 "PO-Revision-Date: 2007-10- 03 18:16+0200\n"4 "POT-Creation-Date: 2007-10-18 13:52+0300\n" 5 "PO-Revision-Date: 2007-10-18 14:05+0200\n" 6 6 "Last-Translator: Markku Oksanen <markku.oksanen@norfello.com>\n" 7 7 "Language-Team: Norfello Ltd. <contact@norfello.com>\n" … … 26 26 msgstr "Tiedot" 27 27 28 #: app/models/task.rb:5 628 #: app/models/task.rb:59 29 29 msgid "is not a positive number" 30 30 msgstr "ei ole kokonaisluku" 31 31 32 #: app/models/task.rb: 8932 #: app/models/task.rb:92 33 33 msgid "cannot be earlier than the starting time" 34 34 msgstr "ei saa olla aikaisempi kuin aloitusaika" 35 35 36 #: app/models/task.rb:13 436 #: app/models/task.rb:137 37 37 msgid "Task was assigned to you" 38 38 msgstr "Sinulle annettiin tehtÀvÀ" 39 39 40 #: app/models/asset.rb:83 841 #: app/models/asset.rb:84 442 #: app/models/asset.rb:8 5040 #: app/models/asset.rb:835 41 #: app/models/asset.rb:841 42 #: app/models/asset.rb:847 43 43 #: app/models/protected_data.rb:448 44 44 msgid "Unauthorized to save %s" … … 113 113 114 114 #: app/models/form_field.rb:41 115 #: app/controllers/customer_interface_controller.rb:44 115 116 #: app/controllers/asset_field_controller.rb:113 116 117 msgid "Time" … … 290 291 291 292 #: app/models/attachment_methods.rb:38 293 #: app/helpers/customer_interface_helper.rb:109 294 #: app/helpers/customer_interface_helper.rb:111 295 #: app/helpers/customer_interface_helper.rb:132 296 #: app/helpers/customer_interface_helper.rb:134 297 #: app/helpers/customer_interface_helper.rb:136 298 #: app/helpers/customer_interface_helper.rb:138 299 #: app/helpers/customer_interface_helper.rb:140 300 #: app/helpers/customer_interface_helper.rb:142 301 #: app/helpers/customer_interface_helper.rb:161 302 #: app/controllers/customer_interface_controller.rb:160 292 303 #: app/views/task/_display_task_event.rhtml:6 293 304 #: app/views/task/_display_task_event.rhtml:8 … … 642 653 msgstr "cmmspohja" 643 654 644 #: app/helpers/application_helper.rb:63 645 msgid "January" 646 msgstr "tammikuu" 647 648 #: app/helpers/application_helper.rb:64 649 msgid "February" 650 msgstr "helmikuu" 651 652 #: app/helpers/application_helper.rb:65 653 msgid "March" 654 msgstr "maaliskuu" 655 656 #: app/helpers/application_helper.rb:66 657 msgid "April" 658 msgstr "huhtikuu" 659 660 #: app/helpers/application_helper.rb:67 661 msgid "May" 662 msgstr "toukokuu" 663 664 #: app/helpers/application_helper.rb:68 665 msgid "June" 666 msgstr "kesÀkuu" 667 668 #: app/helpers/application_helper.rb:69 669 msgid "July" 670 msgstr "heinÀkuu" 671 672 #: app/helpers/application_helper.rb:70 673 msgid "August" 674 msgstr "elokuu" 675 676 #: app/helpers/application_helper.rb:71 677 msgid "September" 678 msgstr "syyskuu" 679 680 #: app/helpers/application_helper.rb:72 681 msgid "October" 682 msgstr "lokakuu" 683 684 #: app/helpers/application_helper.rb:73 685 msgid "November" 686 msgstr "marraskuu" 687 688 #: app/helpers/application_helper.rb:74 689 msgid "December" 690 msgstr "joulukuu" 691 692 #: app/helpers/application_helper.rb:76 693 #: app/views/asset_tree/_asset_tree.rhtml:38 694 msgid "All" 695 msgstr "Kaikki" 696 697 #: app/helpers/application_helper.rb:118 698 msgid "Popup calendar" 699 msgstr "Popup-kalenteri" 700 655 #: app/helpers/customer_interface_helper.rb:43 701 656 #: app/helpers/application_helper.rb:428 702 657 #: app/controllers/form_controller.rb:461 … … 704 659 msgstr "Lomake" 705 660 661 #: app/helpers/customer_interface_helper.rb:64 706 662 #: app/helpers/application_helper.rb:451 707 663 msgid "Task" 708 664 msgstr "TehtÀvÀ" 709 665 666 #: app/helpers/customer_interface_helper.rb:89 710 667 #: app/helpers/application_helper.rb:470 711 668 #: app/controllers/attachment_controller.rb:22 … … 714 671 msgid "Attachment" 715 672 msgstr "Liitetiedosto" 673 674 #: app/helpers/customer_interface_helper.rb:109 675 #: app/views/timeline/_display_event.rhtml:37 676 msgid "Filled out by %s" 677 msgstr "TÀytetty kÀyttÀjÀn %s toimesta" 678 679 #: app/helpers/customer_interface_helper.rb:111 680 #: app/views/timeline/_display_event.rhtml:39 681 msgid "Modified by %s" 682 msgstr "Muokattu kÀyttÀjÀn %s toimesta" 683 684 #: app/helpers/customer_interface_helper.rb:132 685 #: app/views/task/_display_task_event.rhtml:6 686 #: app/views/timeline/_display_event.rhtml:14 687 msgid "Created by %s" 688 msgstr "Luotu kÀyttÀjÀn %s toimesta" 689 690 #: app/helpers/customer_interface_helper.rb:134 691 #: app/views/task/_display_task_event.rhtml:8 692 #: app/views/timeline/_display_event.rhtml:16 693 msgid "Closed by %s" 694 msgstr "Suljettu kÀyttÀjÀn %s toimesta" 695 696 #: app/helpers/customer_interface_helper.rb:136 697 #: app/views/timeline/_display_event.rhtml:18 698 msgid "Assigned to %s by %s" 699 msgstr "%s asetettu vastuulliseksi kÀyttÀjÀn %s toimesta" 700 701 #: app/helpers/customer_interface_helper.rb:138 702 #: app/views/task/_display_task_event.rhtml:12 703 #: app/views/timeline/_display_event.rhtml:20 704 msgid "Accepted by %s" 705 msgstr "HyvÀksytty kÀyttÀjÀn %s toimesta" 706 707 #: app/helpers/customer_interface_helper.rb:140 708 #: app/views/task/_display_task_event.rhtml:14 709 #: app/views/timeline/_display_event.rhtml:22 710 msgid "Reopened by %s" 711 msgstr "Avattu uudestaan kÀyttÀjÀn %s toimesta" 712 713 #: app/helpers/customer_interface_helper.rb:142 714 #: app/views/task/_display_task_event.rhtml:16 715 #: app/views/timeline/_display_event.rhtml:24 716 msgid "Comment added by %s" 717 msgstr "Kommentti lisÀtty kÀyttÀjÀn %s toimesta" 718 719 #: app/helpers/customer_interface_helper.rb:161 720 #: app/views/timeline/_display_event.rhtml:52 721 msgid "Uploaded by %s" 722 msgstr "Tallennettu kÀyttÀjÀn %s toimesta" 723 724 #: app/helpers/customer_interface_helper.rb:173 725 #: app/controllers/task_controller.rb:452 726 #: app/controllers/overview_controller.rb:59 727 msgid "New" 728 msgstr "Uusi" 729 730 #: app/helpers/customer_interface_helper.rb:175 731 #: app/controllers/task_controller.rb:452 732 #: app/controllers/overview_controller.rb:59 733 #: app/controllers/overview_controller.rb:65 734 msgid "Assigned" 735 msgstr "Osoitettu työntekijÀlle" 736 737 #: app/helpers/customer_interface_helper.rb:177 738 #: app/controllers/task_controller.rb:452 739 #: app/controllers/overview_controller.rb:59 740 #: app/controllers/overview_controller.rb:65 741 msgid "Accepted" 742 msgstr "HyvÀksytty" 743 744 #: app/helpers/customer_interface_helper.rb:179 745 #: app/controllers/task_controller.rb:452 746 #: app/controllers/overview_controller.rb:65 747 msgid "Closed" 748 msgstr "Suljettu" 749 750 #: app/helpers/customer_interface_helper.rb:191 751 #: app/views/customer_interface/_item_list.rhtml:48 752 #: lib/localization.rb:17 753 msgid "%Y-%m-%d" 754 msgstr "%d.%m.%Y" 755 756 #: app/helpers/customer_interface_helper.rb:191 757 #: app/views/customer_interface/_item_list.rhtml:48 758 msgid "%H:%M" 759 msgstr "%H:%M" 760 761 #: app/helpers/customer_interface_helper.rb:193 762 msgid "by %s" 763 msgstr "%s toimesta" 764 765 #: app/helpers/application_helper.rb:63 766 msgid "January" 767 msgstr "tammikuu" 768 769 #: app/helpers/application_helper.rb:64 770 msgid "February" 771 msgstr "helmikuu" 772 773 #: app/helpers/application_helper.rb:65 774 msgid "March" 775 msgstr "maaliskuu" 776 777 #: app/helpers/application_helper.rb:66 778 msgid "April" 779 msgstr "huhtikuu" 780 781 #: app/helpers/application_helper.rb:67 782 msgid "May" 783 msgstr "toukokuu" 784 785 #: app/helpers/application_helper.rb:68 786 msgid "June" 787 msgstr "kesÀkuu" 788 789 #: app/helpers/application_helper.rb:69 790 msgid "July" 791 msgstr "heinÀkuu" 792 793 #: app/helpers/application_helper.rb:70 794 msgid "August" 795 msgstr "elokuu" 796 797 #: app/helpers/application_helper.rb:71 798 msgid "September" 799 msgstr "syyskuu" 800 801 #: app/helpers/application_helper.rb:72 802 msgid "October" 803 msgstr "lokakuu" 804 805 #: app/helpers/application_helper.rb:73 806 msgid "November" 807 msgstr "marraskuu" 808 809 #: app/helpers/application_helper.rb:74 810 msgid "December" 811 msgstr "joulukuu" 812 813 #: app/helpers/application_helper.rb:76 814 #: app/views/asset_tree/_asset_tree.rhtml:38 815 msgid "All" 816 msgstr "Kaikki" 817 818 #: app/helpers/application_helper.rb:118 819 msgid "Popup calendar" 820 msgstr "Popup-kalenteri" 716 821 717 822 #: app/helpers/application_helper.rb:489 … … 749 854 msgstr "Peru" 750 855 751 #: app/helpers/application_helper.rb:6 68856 #: app/helpers/application_helper.rb:651 752 857 msgid "years" 753 858 msgstr "vuotta" 754 859 755 #: app/helpers/application_helper.rb:6 70860 #: app/helpers/application_helper.rb:653 756 861 msgid "months" 757 862 msgstr "kuukautta" 758 863 759 #: app/helpers/application_helper.rb:6 72864 #: app/helpers/application_helper.rb:655 760 865 msgid "days" 761 866 msgstr "pÀivÀÀ" 762 867 763 #: app/helpers/application_helper.rb:6 74868 #: app/helpers/application_helper.rb:657 764 869 #: app/views/task/_form.rhtml:96 765 870 #: app/views/task/_form.rhtml:98 … … 768 873 msgstr "tuntia" 769 874 770 #: app/helpers/application_helper.rb:6 76875 #: app/helpers/application_helper.rb:659 771 876 msgid "minutes" 772 877 msgstr "minuuttia" … … 774 879 #: app/helpers/asset_field_helper.rb:52 775 880 #: app/helpers/asset_field_helper.rb:113 776 #: app/controllers/task_controller.rb:50 881 #: app/controllers/task_controller.rb:49 882 #: app/controllers/task_controller.rb:407 777 883 #: app/controllers/message_controller.rb:28 778 884 #: app/controllers/keyring_controller.rb:74 779 885 #: app/views/form_type/create_step4.rhtml:15 780 886 #: app/views/shared/_list_items.rhtml:6 781 #: config/menu.rb:6 1887 #: config/menu.rb:62 782 888 msgid "Remove" 783 889 msgstr "Poista" … … 809 915 #: app/controllers/data_permission_controller.rb:52 810 916 #: app/controllers/data_permission_controller.rb:55 811 #: app/controllers/task_controller.rb:8 1917 #: app/controllers/task_controller.rb:82 812 918 #: app/controllers/attachment_controller.rb:68 813 919 #: app/controllers/asset_tree_controller.rb:124 … … 821 927 822 928 #: app/controllers/asset_controller.rb:61 929 #: app/controllers/customer_interface_controller.rb:45 930 #: app/controllers/customer_interface_controller.rb:163 823 931 #: app/controllers/form_controller.rb:460 824 932 #: app/controllers/task_controller.rb:42 825 #: app/controllers/task_controller.rb:52 826 #: app/controllers/task_controller.rb:282 933 #: app/controllers/task_controller.rb:51 934 #: app/controllers/task_controller.rb:283 935 #: app/controllers/task_controller.rb:400 936 #: app/controllers/task_controller.rb:409 827 937 #: app/controllers/attachment_controller.rb:26 828 938 #: app/views/attachment/view.rhtml:4 … … 830 940 #: app/views/form/view.rhtml:13 831 941 #: app/views/notification_mailer/task_notification.rhtml:5 832 #: config/menu.rb:5 5942 #: config/menu.rb:56 833 943 msgid "Asset" 834 944 msgstr "Kohde" … … 860 970 #: app/controllers/user_controller.rb:98 861 971 #: app/controllers/user_controller.rb:110 862 #: app/controllers/user_controller.rb:2 82863 #: app/controllers/user_controller.rb:31 9972 #: app/controllers/user_controller.rb:279 973 #: app/controllers/user_controller.rb:316 864 974 #: app/controllers/form_type_controller.rb:21 865 975