Changeset 710

Show
Ignore:
Timestamp:
10/26/07 13:15:15 (1 year ago)
Author:
markku
Message:

Customer interface: First working version - Styling needed. Closes #476 and #478

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/app/controllers/application.rb

    r707 r710  
    206206    login = session[:user].login if session[:user] 
    207207    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 
    210212    GetText.locale = session[:user].lang 
    211213  end 
     
    432434        info('Password reseted for %s %s' % [model_class.model_name, @model.login]) 
    433435        redirect_to(@redirect) 
     436        return 
    434437      else 
    435438        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') 
    441479  end 
    442480 
  • trunk/app/controllers/task_controller.rb

    r705 r710  
    4343              ] 
    4444 
    45     user_options = @selected_asset.users.collect { |user| [user.login_and_name, user.id] } 
    4645    asset_options = Asset.find_authorized_to(:create_task, [:all]).collect { |a| [a.full_code, a.id] } 
    4746    @actions = [] 
     
    6160    find_selected_assets 
    6261    conditions = @selected_assets_condition 
     62    conditions[0] = "(#{conditions[0]}) AND task_type_id != ?" 
     63    conditions.push(TaskType.get_service_request_type.id) 
    6364 
    6465    @items = items_for_page(Task, :finder_method => :find_authorized_to_read, :conditions => conditions, :readonly => true) 
     
    386387  end 
    387388 
     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 
    388427protected 
    389428 
  • trunk/app/controllers/user_controller.rb

    r707 r710  
    193193    if request.post? 
    194194      if user = UserAccount.authenticate(params[:user_login], params[:user_password]) 
    195         if user.is_a?(User) 
     195        if user.instance_of?(User) 
    196196          # Check that user has some keys 
    197197          if user.keyrings.empty? 
     
    225225          redirect_back_or_default :controller => 'asset', :action => "view" 
    226226 
    227        elsif user.is_a?(Customer) 
     227       elsif user.instance_of?(Customer) 
    228228          # Check that customer is authorized to read at least one asset. 
    229229          if user.assets.empty? 
     
    235235          end 
    236236 
    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') 
    241238        else 
    242239          # This should never happen 
     
    355352 
    356353  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'}) 
    374355  end 
    375356 
  • trunk/app/helpers/application_helper.rb

    r703 r710  
    621621 
    622622    return result 
    623   end 
    624  
    625   # Function: input_field_with_enable_check_box 
    626   # =========================================== 
    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>' 
    640623  end 
    641624 
  • trunk/app/models/asset.rb

    r707 r710  
    282282  # Returns true if the user is authorized to create tasks to this asset 
    283283  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 
    289286 
    290287    return authorized_to(:create_task) 
  • trunk/app/models/customer.rb

    r708 r710  
    3030  ACTION_KEYS = [ 
    3131                 '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' 
    3336                ] 
    3437 
  • trunk/app/models/protected_data.rb

    r707 r710  
    297297  # This is needed because some databases support microseconds (PostgreSQL >= 8.2) 
    298298  # 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 it 
    300   # doesn't if the 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. 
    301301  def round_created_at 
    302302    self.created_at = Time.at(self.created_at.to_i) 
  • trunk/app/models/task.rb

    r707 r710  
    1111  validates_presence_of :short_description 
    1212  validates_length_of :short_description, :maximum => 100 
     13  validates_presence_of :task_type 
    1314  # Callbacks 
    1415  after_find :save_original_state 
     16  before_validation_on_create :set_asset_if_customer 
     17  before_validation_on_create :set_task_type_if_customer 
    1518  # Associations 
    1619  belongs_to :task_type 
     
    292295    end 
    293296  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 
    294324end 
  • trunk/app/models/task_type.rb

    r707 r710  
    1515  # Callbacks 
    1616  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 
    1819  # Associations 
    1920  has_many :tasks 
     
    5455  end 
    5556 
    56   # Method: update_is_service_request_type 
    57   # ====================================== 
     57  # Method: update_service_request_type 
     58  # =================================== 
    5859  # Makes sure that only one record can have the is_service_request_type 
    5960  # attribute true. When the attribute is set to true for a record, it 
    6061  # will be set to false for all other records. 
    6162  # 
    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 
    6487    return true 
    6588  end 
  • trunk/app/models/timeline_event.rb

    r707 r710  
    88  # Callbacks 
    99  # Associations 
    10   belongs_to :creator, :class_name => 'User', :foreign_key => 'created_by' 
     10  belongs_to :creator, :class_name => 'UserAccount', :foreign_key => 'created_by' 
    1111 
    1212  # Like belongs_to association. In addition sets "asset model" for this data model 
     
    3131  end 
    3232 
     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 
    3341protected 
    3442 
  • trunk/app/views/shared/_create_or_edit.rhtml

    r530 r710  
    3131            </tr> 
    3232            <%= 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]) %> 
    3533          <% when :optional_select_tag %> 
    3634            <tr> 
     
    6159  <%= buttons_table(submit_text, cancel_url_options) %> 
    6260</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  
    11<%= error_messages_for 'user' %> 
    22 
    3 <%= form_tag :action => 'change_password' %> 
     3<%= form_tag(:action => 'change_password') %> 
    44  <table class="form"> 
    55    <tr> 
  • trunk/config/menu.rb

    r707 r710  
    4343                  MenuButton.new(_('Tasks'), '22x22/menu_task.gif', 
    4444                    MenuItem.new(_('List'), 'task', 'list', '16x16/list.gif'), 
     45                    MenuItem.new(_('List service requests'), 'task', 'list_service_requests', '16x16/list.gif'), 
    4546                    MenuItem.new(_('Create'), 'task', 'create', '16x16/create.gif'), 
    4647                    Page.new('task', 'move'), 
  • trunk/db/migrate/009_create_customers.rb

    r708 r710  
    6161    keyrings = TempKeyring.find(:all, :order => 'id', :readonly => true) 
    6262    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' 
    6464    puts 'administering functions. You should choose your administrative keyring.' 
    6565 
  • trunk/lib/graph.rb

    r485 r710  
    1616 
    1717 
    18   def pie(width, height, data, titles=[], draw_labels=true
     18  def Graph.pie(width, height, data, titles=[], draw_labels=true, legend_position=:bottom
    1919    # Remove zero values 
    2020    zero_indices = [] 
     
    4040 
    4141    # 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 
    4449 
    4550    draw.translate(x, y) 
     
    5560 
    5661      # 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) 
    5964 
    6065      # Calculate the angle 
     
    6469 
    6570      # 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) 
    6873 
    6974        if values[:angle] > Math::PI 
     
    139144 
    140145        # Calculate text coordinates. Center it on the slice. 
    141         text_x = (rw * cos(v[:start_angle] + v[:angle] / 2.0)).to_i 
    142         text_y = (rh * sin(v[:start_angle] + v[:angle] / 2.0) + 4).to_i 
     146        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 
    143148 
    144149        # Draw background 
     
    159164 
    160165    # 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 
    162171 
    163172    draw.draw img 
     
    167176 
    168177 
    169  
    170   def bar(width, height, data, titles=[], draw_labels=true) 
     178  def Graph.bar(width, height, data, titles=[], draw_labels=true) 
    171179    # Make the image 
    172180    img = Magick::Image.new(width, height) { 
     
    247255 
    248256 
    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) 
    251258    # Make the image 
    252259    img = Magick::Image.new(width, height) { 
     
    314321  end 
    315322 
    316  
    317323protected 
    318324 
    319   def draw_legend(width, height, titles, img) 
     325  def Graph.draw_legend(width, height, titles, img) 
    320326    draw = Magick::Draw.new 
    321327 
     
    373379 
    374380 
    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) 
    377427    # Find a good divisor 
    378428    divisors = [1, 5, 10, 20, 50, 100, 200, 500, 1000, 10000, 20000, 50000] 
     
    429479  end 
    430480 
    431 private 
    432481 
    433482  # Returns approximate point length for the string +text+. 
    434483  # 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) 
    436485    length = 0.0 
    437486    very_small = /[il]/ 
  • trunk/lib/localization.rb

    r617 r710  
    1111  # Returns the given date's or datetime's textual representation in the 
    1212  # 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
    1414    bindtextdomain('norfello_cmms') 
    1515    return _('(Not specified)') unless date_or_datetime 
     
    1919 
    2020    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]) 
    2223  end 
    2324 
  • trunk/po/fi_FI/norfello_cmms.po

    r709 r710  
    22msgstr "" 
    33"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" 
    66"Last-Translator: Markku Oksanen <markku.oksanen@norfello.com>\n" 
    77"Language-Team: Norfello Ltd. <contact@norfello.com>\n" 
     
    2626msgstr "Tiedot" 
    2727 
    28 #: app/models/task.rb:56 
     28#: app/models/task.rb:59 
    2929msgid "is not a positive number" 
    3030msgstr "ei ole kokonaisluku" 
    3131 
    32 #: app/models/task.rb:89 
     32#: app/models/task.rb:92 
    3333msgid "cannot be earlier than the starting time" 
    3434msgstr "ei saa olla aikaisempi kuin aloitusaika" 
    3535 
    36 #: app/models/task.rb:134 
     36#: app/models/task.rb:137 
    3737msgid "Task was assigned to you" 
    3838msgstr "Sinulle annettiin tehtÀvÀ" 
    3939 
    40 #: app/models/asset.rb:838 
    41 #: app/models/asset.rb:844 
    42 #: app/models/asset.rb:850 
     40#: app/models/asset.rb:835 
     41#: app/models/asset.rb:841 
     42#: app/models/asset.rb:847 
    4343#: app/models/protected_data.rb:448 
    4444msgid "Unauthorized to save %s" 
     
    113113 
    114114#: app/models/form_field.rb:41 
     115#: app/controllers/customer_interface_controller.rb:44 
    115116#: app/controllers/asset_field_controller.rb:113 
    116117msgid "Time" 
     
    290291 
    291292#: 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 
    292303#: app/views/task/_display_task_event.rhtml:6 
    293304#: app/views/task/_display_task_event.rhtml:8 
     
    642653msgstr "cmmspohja" 
    643654 
    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 
    701656#: app/helpers/application_helper.rb:428 
    702657#: app/controllers/form_controller.rb:461 
     
    704659msgstr "Lomake" 
    705660 
     661#: app/helpers/customer_interface_helper.rb:64 
    706662#: app/helpers/application_helper.rb:451 
    707663msgid "Task" 
    708664msgstr "TehtÀvÀ" 
    709665 
     666#: app/helpers/customer_interface_helper.rb:89 
    710667#: app/helpers/application_helper.rb:470 
    711668#: app/controllers/attachment_controller.rb:22 
     
    714671msgid "Attachment" 
    715672msgstr "Liitetiedosto" 
     673 
     674#: app/helpers/customer_interface_helper.rb:109 
     675#: app/views/timeline/_display_event.rhtml:37 
     676msgid "Filled out by %s" 
     677msgstr "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 
     681msgid "Modified by %s" 
     682msgstr "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 
     687msgid "Created by %s" 
     688msgstr "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 
     693msgid "Closed by %s" 
     694msgstr "Suljettu kÀyttÀjÀn %s toimesta" 
     695 
     696#: app/helpers/customer_interface_helper.rb:136 
     697#: app/views/timeline/_display_event.rhtml:18 
     698msgid "Assigned to %s by %s" 
     699msgstr "%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 
     704msgid "Accepted by %s" 
     705msgstr "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 
     710msgid "Reopened by %s" 
     711msgstr "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 
     716msgid "Comment added by %s" 
     717msgstr "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 
     721msgid "Uploaded by %s" 
     722msgstr "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 
     727msgid "New" 
     728msgstr "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 
     734msgid "Assigned" 
     735msgstr "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 
     741msgid "Accepted" 
     742msgstr "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 
     747msgid "Closed" 
     748msgstr "Suljettu" 
     749 
     750#: app/helpers/customer_interface_helper.rb:191 
     751#: app/views/customer_interface/_item_list.rhtml:48 
     752#: lib/localization.rb:17 
     753msgid "%Y-%m-%d" 
     754msgstr "%d.%m.%Y" 
     755 
     756#: app/helpers/customer_interface_helper.rb:191 
     757#: app/views/customer_interface/_item_list.rhtml:48 
     758msgid "%H:%M" 
     759msgstr "%H:%M" 
     760 
     761#: app/helpers/customer_interface_helper.rb:193 
     762msgid "by %s" 
     763msgstr "%s toimesta" 
     764 
     765#: app/helpers/application_helper.rb:63 
     766msgid "January" 
     767msgstr "tammikuu" 
     768 
     769#: app/helpers/application_helper.rb:64 
     770msgid "February" 
     771msgstr "helmikuu" 
     772 
     773#: app/helpers/application_helper.rb:65 
     774msgid "March" 
     775msgstr "maaliskuu" 
     776 
     777#: app/helpers/application_helper.rb:66 
     778msgid "April" 
     779msgstr "huhtikuu" 
     780 
     781#: app/helpers/application_helper.rb:67 
     782msgid "May" 
     783msgstr "toukokuu" 
     784 
     785#: app/helpers/application_helper.rb:68 
     786msgid "June" 
     787msgstr "kesÀkuu" 
     788 
     789#: app/helpers/application_helper.rb:69 
     790msgid "July" 
     791msgstr "heinÀkuu" 
     792 
     793#: app/helpers/application_helper.rb:70 
     794msgid "August" 
     795msgstr "elokuu" 
     796 
     797#: app/helpers/application_helper.rb:71 
     798msgid "September" 
     799msgstr "syyskuu" 
     800 
     801#: app/helpers/application_helper.rb:72 
     802msgid "October" 
     803msgstr "lokakuu" 
     804 
     805#: app/helpers/application_helper.rb:73 
     806msgid "November" 
     807msgstr "marraskuu" 
     808 
     809#: app/helpers/application_helper.rb:74 
     810msgid "December" 
     811msgstr "joulukuu" 
     812 
     813#: app/helpers/application_helper.rb:76 
     814#: app/views/asset_tree/_asset_tree.rhtml:38 
     815msgid "All" 
     816msgstr "Kaikki" 
     817 
     818#: app/helpers/application_helper.rb:118 
     819msgid "Popup calendar" 
     820msgstr "Popup-kalenteri" 
    716821 
    717822#: app/helpers/application_helper.rb:489 
     
    749854msgstr "Peru" 
    750855 
    751 #: app/helpers/application_helper.rb:668 
     856#: app/helpers/application_helper.rb:651 
    752857msgid "years" 
    753858msgstr "vuotta" 
    754859 
    755 #: app/helpers/application_helper.rb:670 
     860#: app/helpers/application_helper.rb:653 
    756861msgid "months" 
    757862msgstr "kuukautta" 
    758863 
    759 #: app/helpers/application_helper.rb:672 
     864#: app/helpers/application_helper.rb:655 
    760865msgid "days" 
    761866msgstr "pÀivÀÀ" 
    762867 
    763 #: app/helpers/application_helper.rb:674 
     868#: app/helpers/application_helper.rb:657 
    764869#: app/views/task/_form.rhtml:96 
    765870#: app/views/task/_form.rhtml:98 
     
    768873msgstr "tuntia" 
    769874 
    770 #: app/helpers/application_helper.rb:676 
     875#: app/helpers/application_helper.rb:659 
    771876msgid "minutes" 
    772877msgstr "minuuttia" 
     
    774879#: app/helpers/asset_field_helper.rb:52 
    775880#: 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 
    777883#: app/controllers/message_controller.rb:28 
    778884#: app/controllers/keyring_controller.rb:74 
    779885#: app/views/form_type/create_step4.rhtml:15 
    780886#: app/views/shared/_list_items.rhtml:6 
    781 #: config/menu.rb:61 
     887#: config/menu.rb:62 
    782888msgid "Remove" 
    783889msgstr "Poista" 
     
    809915#: app/controllers/data_permission_controller.rb:52 
    810916#: app/controllers/data_permission_controller.rb:55 
    811 #: app/controllers/task_controller.rb:81 
     917#: app/controllers/task_controller.rb:82 
    812918#: app/controllers/attachment_controller.rb:68 
    813919#: app/controllers/asset_tree_controller.rb:124 
     
    821927 
    822928#: app/controllers/asset_controller.rb:61 
     929#: app/controllers/customer_interface_controller.rb:45 
     930#: app/controllers/customer_interface_controller.rb:163 
    823931#: app/controllers/form_controller.rb:460 
    824932#: 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 
    827937#: app/controllers/attachment_controller.rb:26 
    828938#: app/views/attachment/view.rhtml:4 
     
    830940#: app/views/form/view.rhtml:13 
    831941#: app/views/notification_mailer/task_notification.rhtml:5 
    832 #: config/menu.rb:55 
     942#: config/menu.rb:56 
    833943msgid "Asset" 
    834944msgstr "Kohde" 
     
    860970#: app/controllers/user_controller.rb:98 
    861971#: app/controllers/user_controller.rb:110 
    862 #: app/controllers/user_controller.rb:282 
    863 #: app/controllers/user_controller.rb:319 
     972#: app/controllers/user_controller.rb:279 
     973#: app/controllers/user_controller.rb:316 
    864974#: app/controllers/form_type_controller.rb:21 
    865975