Changeset 455
- Timestamp:
- 01/22/07 19:35:45 (2 years ago)
- Files:
-
- branches/workorder_report_rename/app/controllers/application.rb (modified) (4 diffs)
- branches/workorder_report_rename/app/controllers/asset_field_controller.rb (modified) (3 diffs)
- branches/workorder_report_rename/app/controllers/asset_permission_controller.rb (modified) (2 diffs)
- branches/workorder_report_rename/app/controllers/asset_tree_controller.rb (modified) (1 diff)
- branches/workorder_report_rename/app/controllers/data_permission_controller.rb (modified) (3 diffs)
- branches/workorder_report_rename/app/controllers/overview_controller.rb (modified) (2 diffs)
- branches/workorder_report_rename/app/controllers/search_controller.rb (modified) (1 diff)
- branches/workorder_report_rename/app/controllers/timeline_controller.rb (modified) (1 diff)
- branches/workorder_report_rename/app/controllers/work_order_controller.rb (modified) (6 diffs)
- branches/workorder_report_rename/app/controllers/work_order_type_controller.rb (modified) (1 diff)
- branches/workorder_report_rename/app/models/asset.rb (modified) (8 diffs)
- branches/workorder_report_rename/app/models/enumerated_value.rb (modified) (1 diff)
- branches/workorder_report_rename/app/models/open_document_file.rb (modified) (1 diff)
- branches/workorder_report_rename/app/models/work_order.rb (modified) (3 diffs)
- branches/workorder_report_rename/app/views/asset_permission/edit.rhtml (modified) (1 diff)
- branches/workorder_report_rename/app/views/data_permission/edit.rhtml (modified) (1 diff)
- branches/workorder_report_rename/app/views/data_permission/preview.rhtml (modified) (1 diff)
- branches/workorder_report_rename/app/views/keyring/online_help__general.rhtml (modified) (1 diff)
- branches/workorder_report_rename/app/views/online_help/_index.rhtml (modified) (1 diff)
- branches/workorder_report_rename/app/views/overview/executive_view.rhtml (modified) (1 diff)
- branches/workorder_report_rename/app/views/shared/_list_items.rhtml (modified) (2 diffs)
- branches/workorder_report_rename/app/views/timeline/_display_event.rhtml (modified) (2 diffs)
- branches/workorder_report_rename/app/views/timeline/online_help__index.rhtml (modified) (1 diff)
- branches/workorder_report_rename/app/views/work_order/view.rhtml (modified) (1 diff)
- branches/workorder_report_rename/config/environments/development.rb (modified) (1 diff)
- branches/workorder_report_rename/config/environments/production.rb (modified) (1 diff)
- branches/workorder_report_rename/config/environments/test.rb (modified) (1 diff)
- branches/workorder_report_rename/config/menu.rb (modified) (3 diffs)
- branches/workorder_report_rename/db/temp_models.rb (modified) (1 diff)
- branches/workorder_report_rename/lib/cmms_markup.rb (modified) (3 diffs)
- branches/workorder_report_rename/script/generate_asset_permissions.rb (modified) (10 diffs)
- branches/workorder_report_rename/test/fixtures/data_permission_profiles.yml (modified) (12 diffs)
- branches/workorder_report_rename/test/fixtures/data_permissions.yml (modified) (14 diffs)
- branches/workorder_report_rename/test/fixtures/open_document_files.yml (modified) (4 diffs)
- branches/workorder_report_rename/test/fixtures/selenium/data_permission_profiles.yml (modified) (690 diffs)
- branches/workorder_report_rename/test/fixtures/selenium/open_document_files.yml (modified) (1 diff)
- branches/workorder_report_rename/test/fixtures/timeline_events.yml (modified) (4 diffs)
- branches/workorder_report_rename/test/functional/asset_controller_test.rb (modified) (1 diff)
- branches/workorder_report_rename/test/functional/asset_permission_controller_test.rb (modified) (22 diffs)
- branches/workorder_report_rename/test/functional/attachment_controller_test.rb (modified) (1 diff)
- branches/workorder_report_rename/test/functional/data_permission_controller_test.rb (modified) (6 diffs)
- branches/workorder_report_rename/test/functional/search_controller_test.rb (modified) (2 diffs)
- branches/workorder_report_rename/test/functional/timeline_controller_test.rb (modified) (2 diffs)
- branches/workorder_report_rename/test/functional/work_order_controller_test.rb (modified) (1 diff)
- branches/workorder_report_rename/test/selenium/main_test.rb (modified) (1 diff)
- branches/workorder_report_rename/test/selenium/menu_test.rb (modified) (10 diffs)
- branches/workorder_report_rename/test/selenium/timeline_test.rb (modified) (1 diff)
- branches/workorder_report_rename/test/unit/asset_condition_analysis_test.rb (modified) (12 diffs)
- branches/workorder_report_rename/test/unit/asset_test.rb (modified) (18 diffs)
- branches/workorder_report_rename/test/unit/asset_type_test.rb (modified) (1 diff)
- branches/workorder_report_rename/test/unit/assets_user_group_test.rb (modified) (15 diffs)
- branches/workorder_report_rename/test/unit/cmms_markup_test.rb (modified) (3 diffs)
- branches/workorder_report_rename/test/unit/data_permission_profile_test.rb (modified) (8 diffs)
- branches/workorder_report_rename/test/unit/data_permission_test.rb (modified) (2 diffs)
- branches/workorder_report_rename/test/unit/protected_asset_data_test.rb (modified) (3 diffs)
- branches/workorder_report_rename/test/unit/protected_data_test.rb (modified) (18 diffs)
- branches/workorder_report_rename/test/unit/protected_join_model_test.rb (modified) (5 diffs)
- branches/workorder_report_rename/test/unit/work_order_template_test.rb (modified) (1 diff)
- branches/workorder_report_rename/test/unit/work_order_test.rb (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/workorder_report_rename/app/controllers/application.rb
r355 r455 84 84 protected_page_group :asset_change_type, 'asset', ['change_type'], 'change_type_protector' 85 85 protected_page_group :work_order_edit, 'work_order', ['edit'], 'edit_protector' 86 protected_page_group : report_edit, 'report', ['edit'], 'edit_protector'87 protected_page_group : report_type_wizard, 'report_type', [ 'create_step1',86 protected_page_group :form_edit, 'form', ['edit'], 'edit_protector' 87 protected_page_group :form_type_wizard, 'form_type', [ 'create_step1', 88 88 'create_step2', 89 89 'create_step3', … … 91 91 'create_step5', 92 92 'preview', 93 'update_ report_fields',94 'update_ report_field_groups',95 'add_ report_field_group',93 'update_form_fields', 94 'update_form_field_groups', 95 'add_form_field_group', 96 96 'add_enumerated_value', 97 97 'remove_enumerated_value'], 'wizard_protector' … … 299 299 def translate_urls_to_markup_links(text) 300 300 # Matches for the base of the url 301 report_url_match = url_for(:controller => 'report', :action => 'view')301 form_url_match = url_for(:controller => 'form', :action => 'view') 302 302 work_order_url_match = url_for(:controller => 'work_order', :action => 'view') 303 303 attachment_url_match = url_for(:controller => 'attachment', :action => 'view') … … 308 308 params_match = /([[:digit:]]+)[^[:space:]]*/ 309 309 310 # Reports311 output = text.gsub(/#{ report_url_match}\/#{params_match}/) { |m| "[#{$~[1]}]" }310 # Forms 311 output = text.gsub(/#{form_url_match}\/#{params_match}/) { |m| "[#{$~[1]}]" } 312 312 # Work orders 313 313 output = output.gsub(/#{work_order_url_match}\/#{params_match}/) { |m| "{#{$~[1]}}" } branches/workorder_report_rename/app/controllers/asset_field_controller.rb
r378 r455 28 28 AssetField::DATETIME => _('Datetime') 29 29 } ], 30 [_('User field in reporttemplate'), :full_user_field_name]30 [_('User field in form template'), :full_user_field_name] 31 31 ] 32 32 @actions = [ [_('Edit'), {:action=> 'edit', :asset_type_id => @asset_type.id, :image=>'16x16/edit'}] ] … … 43 43 [_('Name'), :text_field, 'name', { :size => 40, :maxlength => 40 } ], 44 44 [_('Type')], 45 [_('User field in reporttemplate'), :text_field_with_prefix, 'user_field_name', { :size => 17, :maxlength => 17, :prefix => 'cmms_asset_' } ]45 [_('User field in form template'), :text_field_with_prefix, 'user_field_name', { :size => 17, :maxlength => 17, :prefix => 'cmms_asset_' } ] 46 46 ] 47 47 fields[1][1..-1] = [:select, 'type_code', [ … … 65 65 [_('Name'), :text_field, 'name', { :size => 40, :maxlength => 40 } ], 66 66 [_('Type')], 67 [_('User field in reporttemplate'), :text_field_with_prefix, 'user_field_name', { :size => 17, :maxlength => 17, :prefix => 'cmms_asset_' } ]67 [_('User field in form template'), :text_field_with_prefix, 'user_field_name', { :size => 17, :maxlength => 17, :prefix => 'cmms_asset_' } ] 68 68 ] 69 69 fields[1][1..-1] = [:text, 'type_code_as_text'] branches/workorder_report_rename/app/controllers/asset_permission_controller.rb
r352 r455 156 156 all_user_groups = @asset.user_groups.find(:all, :readonly => true) 157 157 158 @ report_permission_profiles = @assets_user_group.report_permission_profiles.find(:all, :readonly => true)159 @ report_available_groups = (all_user_groups - @report_permission_profiles.map {|p| p.user_group }).map {|g| [g.name, g.id] }160 @ report_permission_profiles << ReportPermissionProfile.new(:other => true) if @report_permission_profiles.select { |profile| profile.other }.empty?158 @form_permission_profiles = @assets_user_group.form_permission_profiles.find(:all, :readonly => true) 159 @form_available_groups = (all_user_groups - @form_permission_profiles.map {|p| p.user_group }).map {|g| [g.name, g.id] } 160 @form_permission_profiles << FormPermissionProfile.new(:other => true) if @form_permission_profiles.select { |profile| profile.other }.empty? 161 161 @work_order_permission_profiles = @assets_user_group.work_order_permission_profiles.find(:all, :readonly => true) 162 162 @work_order_available_groups = (all_user_groups - @work_order_permission_profiles.map {|p| p.user_group }).map {|g| [g.name, g.id] } … … 207 207 return unless authorized_to_edit_assets_permissions(asset) 208 208 209 assets_user_group.update_permission_profiles(params[:profile], params[: report], params[:work_order], params[:attachment])209 assets_user_group.update_permission_profiles(params[:profile], params[:form], params[:work_order], params[:attachment]) 210 210 211 211 flash[:notice] = msg_changes_saved branches/workorder_report_rename/app/controllers/asset_tree_controller.rb
r315 r455 110 110 end 111 111 112 # If user was viewing a report, a work order or an attachment112 # If user was viewing a form, a work order or an attachment 113 113 # redirect to the appropriate list page. 114 return redirect_to(:controller => ' report', :action=> 'list') if request.env['HTTP_REFERER'] =~ /report\/.*$/x114 return redirect_to(:controller => 'form', :action=> 'list') if request.env['HTTP_REFERER'] =~ /form\/.*$/x 115 115 return redirect_to(:controller => 'work_order', :action=> 'list') if request.env['HTTP_REFERER'] =~ /work_order\/.*$/x 116 116 return redirect_to(:controller => 'attachment', :action=> 'list') if request.env['HTTP_REFERER'] =~ /attachment\/.*$/x branches/workorder_report_rename/app/controllers/data_permission_controller.rb
r352 r455 43 43 else 44 44 case @object.class.to_s 45 when ' Report'45 when 'Form' 46 46 redirect_with_error_message(msg_unauthorized_operation(_('read'), _('[%d]', @object.id)), 47 :controller => ' report', :action => 'index')47 :controller => 'form', :action => 'index') 48 48 when 'WorkOrder' 49 49 redirect_with_error_message(msg_unauthorized_operation(_('read'), _('{%d}', @object.id)), … … 67 67 68 68 case params[:datatype] 69 when 'Attachment', ' Report', 'WorkOrder'69 when 'Attachment', 'Form', 'WorkOrder' 70 70 protector = Asset.find params[:id] 71 71 when 'TypeAttachment' … … 116 116 117 117 def find_object(datatype, id) 118 raise "Invalid datatype" unless [' Report', 'WorkOrder', 'Attachment', 'TypeAttachment'].include?(datatype)118 raise "Invalid datatype" unless ['Form', 'WorkOrder', 'Attachment', 'TypeAttachment'].include?(datatype) 119 119 @object = Object.const_get(datatype).find(id) 120 120 end branches/workorder_report_rename/app/controllers/overview_controller.rb
r293 r455 26 26 def get_chart 27 27 case params[:type] 28 when ' reports_by_type'29 image = generate_ reports_by_type_chart28 when 'forms_by_type' 29 image = generate_forms_by_type_chart 30 30 when 'work_orders_by_status' 31 31 image = generate_work_orders_by_status_chart … … 43 43 44 44 protected 45 def generate_ reports_by_type_chart45 def generate_forms_by_type_chart 46 46 find_selected_assets 47 report_types = ReportType.find(:all, :readonly => true)48 report_counts = report_types.collect { |type|49 Report.count_authorized_to(:read, [@selected_assets_condition[0] + ' AND report_type_id = ?'] + [@selected_assets_condition[1], type.id])47 form_types = FormType.find(:all, :readonly => true) 48 form_counts = form_types.collect { |type| 49 Form.count_authorized_to(:read, [@selected_assets_condition[0] + ' AND form_type_id = ?'] + [@selected_assets_condition[1], type.id]) 50 50 } 51 51 52 return pie(300, 200, report_counts, report_types.collect { |type| type.name })52 return pie(300, 200, form_counts, form_types.collect { |type| type.name }) 53 53 end 54 54 branches/workorder_report_rename/app/controllers/search_controller.rb
r293 r455 19 19 search_string = params[:search_string].strip 20 20 21 # Search reports "[3432]" "[43242"21 # Search forms "[3432]" "[43242" 22 22 search_string.scan(/\[([[:digit:]]+)/) { |id| 23 23 id = id.first.to_i 24 unless Report.find_in_authorized_assets(:all, :conditions => ['id = ?', id], :readonly => true).empty?25 redirect_to :controller => ' report', :action => 'view', :id => id24 unless Form.find_in_authorized_assets(:all, :conditions => ['id = ?', id], :readonly => true).empty? 25 redirect_to :controller => 'form', :action => 'view', :id => id 26 26 return 27 27 else 28 flash[:notice] = _(' Report[%i] not found', id)28 flash[:notice] = _('Form [%i] not found', id) 29 29 end 30 30 } branches/workorder_report_rename/app/controllers/timeline_controller.rb
r293 r455 44 44 id_conditions = [] 45 45 46 for klass in [ Report, WorkOrder, Attachment]46 for klass in [Form, WorkOrder, Attachment] 47 47 ids = klass.find_authorized_to_read(:all, :select => select, :conditions => @selected_assets_condition).collect { |r| r.id } 48 48 next if ids.empty? branches/workorder_report_rename/app/controllers/work_order_controller.rb
r370 r455 214 214 @title = _('Create new work order') 215 215 @hide_subaction_links = true 216 @cause_ report_id = params[:cause_report_id] if params[:cause_report_id]216 @cause_form_id = params[:cause_form_id] if params[:cause_form_id] 217 217 @work_order_types = params[:tag_id].nil? ? WorkOrderType.find(:all, :order => 'name') : WorkOrderTag.find(params[:tag_id]).work_order_types 218 218 … … 231 231 @work_order = WorkOrder.new params[:work_order] 232 232 @work_order.asset = @selected_asset 233 @work_order.cause_ report_id = @cause_report_id if @cause_report_id233 @work_order.cause_form_id = @cause_form_id if @cause_form_id 234 234 @work_order.starting_time = nil unless params[:starting_time_enabled] 235 235 @work_order.deadline = nil unless params[:deadline_enabled] … … 271 271 end 272 272 273 # Get associated reports274 report_ids = work_order.associated_report_ids275 if report_ids276 reports = Report.find(report_ids, :readonly => true)273 # Get associated forms 274 form_ids = work_order.associated_form_ids 275 if form_ids 276 forms = Form.find(form_ids, :readonly => true) 277 277 end 278 278 … … 280 280 document = work_order_template.create_filled_version(work_order) 281 281 282 # Send the document if there are no associated reports283 if report_ids.empty?282 # Send the document if there are no associated forms 283 if form_ids.empty? 284 284 send_data(document.data, :filename => "work_order_#{work_order.id}.odt", :disposition => 'inline') 285 285 return … … 287 287 288 288 # Create sections 289 document.create_section_links_for_ reports(report_ids)290 291 # Generate documents for the reports292 report_documents = reports.collect { |report|293 [ report.id, report.report_type.report_template.create_filled_version(report, true, true)]289 document.create_section_links_for_forms(form_ids) 290 291 # Generate documents for the forms 292 form_documents = forms.collect { |form| 293 [form.id, form.form_type.form_template.create_filled_version(form, true, true)] 294 294 } 295 295 … … 304 304 zout.write(document.data) 305 305 306 # Write reports307 for id, report_document in report_documents308 zout.put_next_entry(dir_name + " report_#{id}.odt")309 zout.write( report_document.data)306 # Write forms 307 for id, form_document in form_documents 308 zout.put_next_entry(dir_name + "form_#{id}.odt") 309 zout.write(form_document.data) 310 310 end 311 311 branches/workorder_report_rename/app/controllers/work_order_type_controller.rb
r378 r455 63 63 @work_order_template = WorkOrderTemplate.find(:first) 64 64 if @work_order_template 65 image_base_url = url_for(:controller => ' report', :action => 'get_image', :id => @work_order_template.id) + '?filename='65 image_base_url = url_for(:controller => 'form', :action => 'get_image', :id => @work_order_template.id) + '?filename=' 66 66 @template_style, @template_body = @work_order_template.convert_to_html(image_base_url) if @work_order_template 67 67 end branches/workorder_report_rename/app/models/asset.rb
r368 r455 24 24 # Associations 25 25 belongs_to :asset_type 26 has_many : reports26 has_many :forms 27 27 has_many :work_orders 28 28 has_many :attachments … … 104 104 # ----------- 105 105 # operation - Symbol defining which permission is checked. Possible operations 106 # are :edit, :create_ report, :create_work_order, :attach_file,106 # are :edit, :create_form, :create_work_order, :attach_file, 107 107 # :create_subasset, :edit_permissions, :remove. 108 108 # … … 116 116 when :read 117 117 where_sql = sanitize_sql(['user_group_id IN (?)', group_ids]) 118 when :edit, :create_subasset, :edit_permissions, :remove, :create_ report, :create_work_order, :attach_file118 when :edit, :create_subasset, :edit_permissions, :remove, :create_form, :create_work_order, :attach_file 119 119 where_sql = sanitize_sql(["user_group_id IN (?) AND #{operation} = ?", group_ids, true]) 120 120 else … … 258 258 end 259 259 260 # Function: authorized_to_create_ report?260 # Function: authorized_to_create_form? 261 261 # ====================================== 262 262 # 263 # Returns true if the user is authorized to create reports to this asset264 def authorized_to_create_ report?265 authorized_to(:create_ report)263 # Returns true if the user is authorized to create forms to this asset 264 def authorized_to_create_form? 265 authorized_to(:create_form) 266 266 end 267 267 … … 349 349 def authorized_to_create?(datatype) 350 350 case datatype.to_s 351 when ' Report'352 return authorized_to_create_ report?351 when 'Form' 352 return authorized_to_create_form? 353 353 when 'WorkOrder' 354 354 return authorized_to_create_work_order? … … 458 458 459 459 case datatype.to_s 460 when ' Report'461 create_permission = 'create_ report'462 permission_profiles = : report_permission_profiles460 when 'Form' 461 create_permission = 'create_form' 462 permission_profiles = :form_permission_profiles 463 463 when 'WorkOrder' 464 464 create_permission = 'create_work_order' … … 567 567 # ----------- 568 568 # operation - Symbol defining which permission is checked. Possible operations 569 # are :edit, :create_ report, :create_work_order, :attach_file,569 # are :edit, :create_form, :create_work_order, :attach_file, 570 570 # :create_subasset, :edit_permissions, :remove. 571 571 def authorized_to(operation) … … 584 584 # ----------- 585 585 # operation - Symbol defining which permission is checked. Possible operations 586 # are :edit, :create_ report, :create_work_order, :attach_file,586 # are :edit, :create_form, :create_work_order, :attach_file, 587 587 # :create_subasset, :edit_permissions, :remove. 588 588 def branch_authorized_to(operation) branches/workorder_report_rename/app/models/enumerated_value.rb
r178 r455 1 1 class EnumeratedValue < ActiveRecord::Base 2 2 # Protection 3 attr_accessible :value, : report_field_id3 attr_accessible :value, :form_field_id 4 4 # Validation 5 validates_presence_of :value, : report_field6 validates_uniqueness_of :value, :scope => ' report_field_id'5 validates_presence_of :value, :form_field 6 validates_uniqueness_of :value, :scope => 'form_field_id' 7 7 validates_size_of :value, :maximum => 40 8 8 # Callbacks 9 9 # Associations 10 belongs_to : report_field11 has_one : report_field_value10 belongs_to :form_field 11 has_one :form_field_value 12 12 end branches/workorder_report_rename/app/models/open_document_file.rb
r398 r455 136 136 137 137 rescue => x 138 _error "Failed to convert OpenDocument report."138 _error "Failed to convert OpenDocument form." 139 139 raise x 140 140 end branches/workorder_report_rename/app/models/work_order.rb
r407 r455 4 4 class WorkOrder < ProtectedAssetData 5 5 # Protection 6 attr_protected :id, :asset_id, :responsible_user_id, :created_by, :created_at, :ready, :cause_ report_id6 attr_protected :id, :asset_id, :responsible_user_id, :created_by, :created_at, :ready, :cause_form_id 7 7 # Validation 8 8 validates_presence_of :short_description … … 13 13 belongs_to :work_order_type 14 14 belongs_to :responsible_user, :class_name => 'User', :foreign_key => 'responsible_user_id' 15 belongs_to :cause_ report, :class_name => 'Report', :foreign_key => 'cause_report_id' # reportwhich caused this work order16 has_one :effect_ report, :class_name => 'Report', :foreign_key => 'cause_work_order_id' # reportwhich was caused by this work order15 belongs_to :cause_form, :class_name => 'Form', :foreign_key => 'cause_form_id' # form which caused this work order 16 has_one :effect_form, :class_name => 'Form', :foreign_key => 'cause_work_order_id' # form which was caused by this work order 17 17 has_many :work_order_events, :dependent => :delete_all 18 18 has_many :data_permissions, :dependent => :delete_all, :class_name => 'WorkOrderPermission' … … 296 296 end 297 297 298 # Returns array of reportids found in the long description field.299 def associated_ report_ids298 # Returns array of form ids found in the long description field. 299 def associated_form_ids 300 300 return [] unless self.long_description 301 301 branches/workorder_report_rename/app/views/asset_permission/edit.rhtml
r53 r455 45 45 <h3><%= _('Default permissions for reports created by user group "%s"', h(@user_group.name)) %></h3> 46 46 <%= render(:partial => 'profiles', :object => @report_permission_profiles, 47 :locals => {:type => ' ReportPermissionProfile',47 :locals => {:type => 'FormPermissionProfile', 48 48 :available_groups => @report_available_groups, 49 49 :view_text => _('View report'), branches/workorder_report_rename/app/views/data_permission/edit.rhtml
r126 r455 1 1 <% 2 2 case @object.class.to_s 3 when ' Report'3 when 'Form' 4 4 view_text = _('View report') 5 5 edit_text = _('Edit report') branches/workorder_report_rename/app/views/data_permission/preview.rhtml
r2 r455 1 1 <% 2 2 case @datatype 3 when ' Report'3 when 'Form' 4 4 view_text = _('View report') 5 5 edit_text = _('Edit report') branches/workorder_report_rename/app/views/keyring/online_help__general.rhtml
r125 r455 3 3 4 4 <p> 5 <%= _("Keyrings are collections of keys. They enable you to control access to different functions of NorfelloCMMS in a higher level. By giving a keyring to user, you are giving the user the right to use the functions protected by that keyring. For example you could have a keyring named ' Reportcreator' which would include all the keys necessary to create a new report. You would then give this keyring to all users that need to create reports.") %>5 <%= _("Keyrings are collections of keys. They enable you to control access to different functions of NorfelloCMMS in a higher level. By giving a keyring to user, you are giving the user the right to use the functions protected by that keyring. For example you could have a keyring named 'Form creator' which would include all the keys necessary to create a new report. You would then give this keyring to all users that need to create reports.") %> 6 6 </p> 7 7 branches/workorder_report_rename/app/views/online_help/_index.rhtml
r125 r455 27 27 </ul> 28 28 <ul class="tree"> 29 <li><%= link_to(_(' Reportcategories'), :controller => 'online_help', :action => 'view', :kontroller => 'report_category', :page => 'general') %></li>29 <li><%= link_to(_('Form categories'), :controller => 'online_help', :action => 'view', :kontroller => 'report_category', :page => 'general') %></li> 30 30 </ul> 31 31 <ul class="tree"> 32 <li><%= link_to(_(' Reporttypes'), :controller => 'online_help', :action => 'view', :kontroller => 'report_type', :page => 'general') %></li>32 <li><%= link_to(_('Form types'), :controller => 'online_help', :action => 'view', :kontroller => 'report_type', :page => 'general') %></li> 33 33 </ul> 34 34 <ul class="tree"> 35 <li><%= link_to(_(' Reports'), :controller => 'online_help', :action => 'view', :kontroller => 'report', :page => 'general') %></li>35 <li><%= link_to(_('Forms'), :controller => 'online_help', :action => 'view', :kontroller => 'report', :page => 'general') %></li> 36 36 </ul> 37 37 <ul class="tree"> branches/workorder_report_rename/app/views/overview/executive_view.rhtml
r179 r455 2 2 <tr> 3 3 <th><%= _('Resource usage') %></th> 4 <th><%= _(' Reports by type') %></th>4 <th><%= _('Forms by type') %></th> 5 5 </tr> 6 6 <tr> branches/workorder_report_rename/app/views/shared/_list_items.rhtml
r343 r455 122 122 when 'WorkOrder' 123 123 link_to_work_order(value, true) 124 when ' Report'124 when 'Form' 125 125 link_to_report(value, true) 126 126 when 'Attachment' 127 127 link_to_attachment(value, true) 128 when ' ReportTemplate'128 when 'FormTemplate' 129 129 image_tag('16x16/download') + 130 130 link_to(_('Download'), :controller => 'report_type', :action => 'download_template', :id => value.id) … … 137 137 when 'AssetTypeIcon' 138 138 "<img src=\"#{url_for(:controller => 'asset_type_icon', :action => 'view', :id => value.id)}\" alt=\"\" />" 139 when ' ReportTag', 'WorkOrderTag'139 when 'FormTag', 'WorkOrderTag' 140 140 h(value.name) 141 141 when 'FalseClass' branches/workorder_report_rename/app/views/timeline/_display_event.rhtml
r370 r455 27 27 </span> 28 28 29 <% when ' ReportEvent' -%>29 <% when 'FormEvent' -%> 30 30 <%= link_to_asset(event.report.asset) if show_asset_link %> 31 31 <%= link_to_report(event.report) %> … … 34 34 <%= 35 35 case event.event_type 36 when ReportEvent.TYPES[:CREATED]36 when FormEvent.TYPES[:CREATED] 37 37 _('Created by %s', event.creator ? event.creator.login_and_name : _('Unknown')) 38 when ReportEvent.TYPES[:MODIFIED]38 when FormEvent.TYPES[:MODIFIED] 39 39 _('Modified by %s', event.creator ? event.creator.login_and_name : _('Unknown')) 40 40 end branches/workorder_report_rename/app/views/timeline/online_help__index.rhtml
r125 r455 9 9 <%= _('Timeline lists the following events:') %> 10 10 <ul> 11 <li><%= _(' Reportwas created</li>') %></li>12 <li><%= _(' Reportwas modified') %></li>11 <li><%= _('Form was created</li>') %></li> 12 <li><%= _('Form was modified') %></li> 13 13 <li><%= _('Work order was created') %></li> 14 14 <li><%= _('Work order was assigned to user') %></li> branches/workorder_report_rename/app/views/work_order/view.rhtml
r370 r455 63 63 {:action => 'download', :id => @work_order.id}) %></td> 64 64 <% if @work_order.is_closed? -%> 65 <% if @work_order.effect_report.is_a?( Report) -%>65 <% if @work_order.effect_report.is_a?(Form) -%> 66 66 <td><%= _('Effect report') + ': ' + link_to_report(@work_order.effect_report, true) %></td> 67 67 <% elsif work_order_tag = @work_order.work_order_tag and branches/workorder_report_rename/config/environments/development.rb
r2 r455 12 12 config.breakpoint_server = true 13 13 14 # Show full error reports and disable caching14 # Show full error forms and disable caching 15 15 config.action_controller.consider_all_requests_local = true 16 16 config.action_controller.perform_caching = false branches/workorder_report_rename/config/environments/production.rb
r2 r455 8 8 # config.logger = SyslogLogger.new 9 9 10 # Full error reports are disabled and caching is turned on10 # Full error forms are disabled and caching is turned on 11 11 config.action_controller.consider_all_requests_local = false 12 12 config.action_controller.perform_caching = true branches/workorder_report_rename/config/environments/test.rb
r2 r455 10 10 config.whiny_nils = true 11 11 12 # Show full error reports and disable caching12 # Show full error forms and disable caching 13 13 config.action_controller.consider_all_requests_local = true 14 14 config.action_controller.perform_caching = false branches/workorder_report_rename/config/menu.rb
r441 r455 35 35 ), 36 36 MenuButton.new(_('Forms'), '22x22/menu_form.gif', 37 MenuItem.new(_('List'), ' report', 'list', '16x16/list.gif'),38 MenuItem.new(_('Create'), ' report', 'select_report_type', '16x16/create.gif'),39 MenuItem.new(_('Search'), ' report', 'search', '16x16/search.gif'),40 Page.new(' report', 'view'),41 Page.new(' report', 'create'),42 Page.new(' report', 'edit')37 MenuItem.new(_('List'), 'form', 'list', '16x16/list.gif'), 38 MenuItem.new(_('Create'), 'form', 'select_form_type', '16x16/create.gif'), 39 MenuItem.new(_('Search'), 'form', 'search', '16x16/search.gif'), 40 Page.new('form', 'view'), 41 Page.new('form', 'create'), 42 Page.new('form', 'edit') 43 43 ), 44 44 MenuButton.new(_('Work orders'), '22x22/menu_work_order.gif', … … 97 97 ) 98 98 ), 99 MenuButton.new(_(' Report types'), '22x22/menu_report_type.gif',100 MenuButton.new(_(' Report types'), '22x22/menu_report_type.gif',101 MenuItem.new(_('List'), ' report_type', 'list', '16x16/list.gif'),102 MenuItem.new(_('Create'), ' report_type', 'create_step1', '16x16/create.gif'),103 Page.new(' report_type', 'create_step2'),104 Page.new(' report_type', 'create_step3'),105 Page.new(' report_type', 'create_step4'),106 Page.new(' report_type', 'update_report_fields'),107 Page.new(' report_type', 'update_report_field_groups'),108 Page.new(' report_type', 'add_report_field_group'),109 Page.new(' report_type', 'add_enumerated_value'),110 Page.new(' report_type', 'remove_enumerated_value'),111 Page.new(' report_type', 'preview'),112 Page.new(' report_type', 'edit'),113 Page.new(' report_type', 'change_template')99 MenuButton.new(_('Form types'), '22x22/menu_form_type.gif', 100 MenuButton.new(_('Form types'), '22x22/menu_form_type.gif', 101 MenuItem.new(_('List'), 'form_type', 'list', '16x16/list.gif'), 102 MenuItem.new(_('Create'), 'form_type', 'create_step1', '16x16/create.gif'), 103 Page.new('form_type', 'create_step2'), 104 Page.new('form_type', 'create_step3'), 105 Page.new('form_type', 'create_step4'), 106 Page.new('form_type', 'update_form_fields'), 107 Page.new('form_type', 'update_form_field_groups'), 108 Page.new('form_type', 'add_form_field_group'), 109 Page.new('form_type', 'add_enumerated_value'), 110 Page.new('form_type', 'remove_enumerated_value'), 111 Page.new('form_type', 'preview'), 112 Page.new('form_type', 'edit'), 113 Page.new('form_type', 'change_template') 114 114 ), 115 MenuButton.new(_(' Report categories'), '22x22/menu_report_category.gif',116 MenuItem.new(_('List'), ' report_category', 'list', '16x16/list.gif'),117 MenuItem.new(_('Tree'), ' report_category', 'view_as_tree', '16x16/view_tree.gif'),118 MenuItem.new(_('Create'), ' report_category', 'create', '16x16/create.gif'),119 Page.new(' report_category', 'edit')115 MenuButton.new(_('Form categories'), '22x22/menu_form_category.gif',